Skip to content

Commit

Permalink
feat(ci): post-process uaac updates in nix package
Browse files Browse the repository at this point in the history
# Issue

After renovate updates the Gemfile.lock for `uaac` the gemset.nix was
left updated.

# Fix

Add post-processing step regenerating it with `bundix`.
  • Loading branch information
silvestre committed Dec 3, 2024
1 parent 7ac946f commit 3aef3e1
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 10 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/dependency-updates-post-processing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ jobs:
name: "Dependency Updates Post-Processing"
if: "!contains(github.event.pull_request.labels.*.name, 'skip-dependency-postprocessing')"
runs-on: ubuntu-latest
container:
image: ghcr.io/cloudfoundry/app-autoscaler-release-tools:main
permissions:
pull-requests: write
contents: write
Expand Down Expand Up @@ -47,6 +45,16 @@ jobs:
echo "commit_author_name=${commit_author_name}" >> $GITHUB_OUTPUT
echo "commit_subject=${commit_subject}" >> $GITHUB_OUTPUT
- name: Install devbox
uses: jetify-com/devbox-install-action@a03caf5813591bc882139eba6ae947930a83a427 # v0.11.0
with:
enable-cache: 'true'
- name: Make devbox shellenv available
run: |
eval "$(devbox shellenv)"
printenv >> $GITHUB_ENV
- name: go-mod-tidy and make package-specs
shell: bash
env:
Expand Down Expand Up @@ -83,6 +91,7 @@ jobs:
# ⚠️ For this workflow to be successful, the subsequent line must not
# trigger again the creation of the generated files.
make package-specs
make update-uaac-nix-package
declare -i -r num_changed_files="$(git status --porcelain | wc --lines)"
if ((num_changed_files > 0))
Expand Down
12 changes: 4 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -310,18 +310,14 @@ changelog.go-mod-vendor:
changeloglockcleander.go-mod-vendor:
make --directory='${go-changeloglockcleander-dir}' go-mod-vendor



# https://github.com/golang/tools/blob/master/gopls/doc/workspace.md
.PHONY: workspace
workspace:
[ -e go.work ] || go work init
go work use $(addprefix ./src/,$(go_modules))

.PHONY: uuac
uaac:
which uaac || gem install cf-uaac

.PHONY: update-uaac-nix-package
update-uaac-nix-package:
make --directory='./nix/packages/uaac' gemset.nix

.PHONY: deploy-autoscaler deploy-register-cf deploy-autoscaler-bosh deploy-cleanup
deploy-autoscaler: go-mod-vendor uaac db scheduler deploy-autoscaler-bosh deploy-register-cf ## Deploy autoscaler to OSS dev environment
deploy-register-cf:
Expand Down
11 changes: 11 additions & 0 deletions nix/packages/uaac/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
SHELL := /bin/bash
.SHELLFLAGS := -eu -o pipefail -c ${SHELLFLAGS}
.ONESHELL:

.PHONY: gemset.nix
gemset.nix: Gemfile.lock ## Generate the gemset.nix file from the Gemfile.lock
bundix --lock

help: ## Show this help
@grep --extended-regexp --no-filename '\s##\s' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'

0 comments on commit 3aef3e1

Please sign in to comment.