Add autombump dependency concourse resources - #35
Open
benjaminguttmann-avtq wants to merge 1 commit into
Open
Conversation
benjaminguttmann-avtq
force-pushed
the
add-autombump-dependency-concourse-resources
branch
2 times, most recently
from
June 12, 2025 12:19
8eba0ca to
71ad950
Compare
benjaminguttmann-avtq
force-pushed
the
add-autombump-dependency-concourse-resources
branch
from
June 12, 2025 12:21
71ad950 to
b655ef0
Compare
There was a problem hiding this comment.
Pull request overview
This PR adds Concourse automation to detect new upstream prometheus/node_exporter GitHub releases and open an automated PR that updates the BOSH release blob + package references accordingly.
Changes:
- Introduces
ci/scripts/autobump-dependencies.shto updateconfig/blobs.yml/package references, upload blobs, and create a GitHub PR. - Adds a new
autobump-dependenciesConcourse job toci/pipeline.yml. - Adds a
node_exporter_releaseresource intended to track upstream releases.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 11 comments.
| File | Description |
|---|---|
ci/scripts/autobump-dependencies.sh |
New automation script to bump node_exporter blob and open a PR. |
ci/pipeline.yml |
Adds an autobump job and a new upstream release resource. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+38
to
+41
| cd git | ||
| existing_prs="$(gh pr list --head $branch_name --json)" | ||
| if [ ${#key[@]} == 0 ]; then | ||
| git checkout -b $branch_name |
Comment on lines
+23
to
+26
| if [[ $LATEST_NODE_EXPORTER_VERSION != $USED_NODE_EXPORTER_VERSION ]]; then | ||
| /tmp/cache/bosh add-blob ../node_exporter_release/node_exporter-$LATEST_NODE_EXPORTER_VERSION.linux-amd64.tar.gz node_exporter/node_exporter-$LATEST_NODE_EXPORTER_VERSION.linux-amd64.tar.gz | ||
| /tmp/cache/bosh remove-blob node_exporter/node_exporter-$USED_NODE_EXPORTER_VERSION.linux-amd64.tar.gz | ||
| fi |
|
|
||
| popd | ||
|
|
||
| export USED_NODE_EXPORTER_VERSION=$(cat config/blobs.yml | egrep -o "node_exporter-[[:digit:]]+.[[:digit:]]+.[[:digit:]]+" | cut -d "-" -f 2) |
|
|
||
| export BOSH_VERSION=7.6.1 | ||
|
|
||
| pushd /tmp/cache && curl -sL https://github.com/cloudfoundry/bosh-cli/releases/download/v${BOSH_VERSION}/bosh-cli-${BOSH_VERSION}-linux-amd64 > bosh && chmod 777 bosh |
| git checkout -b $branch_name | ||
| git config user.name "$BOT_USER_NAME" | ||
| git config user.email "$BOT_USER_MAIL" | ||
| bosh upload-blobs --sha2 |
| git add packages/node_exporter | ||
| git commit --author="${BOT_USER_NAME} <${BOT_USER_MAIL}>" -m "Update blob reference for node_exporter to version ${LATEST_NODE_EXPORTER_VERSION}" | ||
| git push origin -u $branch_name | ||
| gh pr create --base $PR_BASE --head $branch_name --title "Bump node_exporter version to ${LATEST_NODE_EXPORTER_VERSION}" --body "Automatic bump from version ${USED_NODE_EXPORTER_VERSION} to version ${LATEST_NODE_EXPORTER_VERSION}, downloaded from ${LATEST_NODE_EXPORTER_DOWNLOAD_URL}.\nAfter merge, consider releasing a new version of node-exporter-boshrelease." --label $PR_LABEL |
Comment on lines
+161
to
+164
| - name: autobump-dependencies | ||
| public: true | ||
| serial: true | ||
| plan: |
Comment on lines
+176
to
+178
| inputs: | ||
| - name: git | ||
| platform: linux |
Comment on lines
+238
to
+242
| - name: node_exporter_release | ||
| type: github-release | ||
| source: | ||
| owner: prometheus | ||
| repository: node_exporter |
| echo -e "---\nblobstore:\n options:\n access_key_id: ${AWS_ACCESS_KEY}\n secret_access_key: ${AWS_SECRET_ACCESS_KEY}" > config/private.yml | ||
|
|
||
| branch_name="node_exporter-auto-bump-master" | ||
| if [ -z "$DRY_RUN" ]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.