Skip to content

Add autombump dependency concourse resources - #35

Open
benjaminguttmann-avtq wants to merge 1 commit into
masterfrom
add-autombump-dependency-concourse-resources
Open

Add autombump dependency concourse resources#35
benjaminguttmann-avtq wants to merge 1 commit into
masterfrom
add-autombump-dependency-concourse-resources

Conversation

@benjaminguttmann-avtq

Copy link
Copy Markdown
Contributor

No description provided.

@benjaminguttmann-avtq
benjaminguttmann-avtq force-pushed the add-autombump-dependency-concourse-resources branch 2 times, most recently from 8eba0ca to 71ad950 Compare June 12, 2025 12:19

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.sh to update config/blobs.yml/package references, upload blobs, and create a GitHub PR.
  • Adds a new autobump-dependencies Concourse job to ci/pipeline.yml.
  • Adds a node_exporter_release resource 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 thread ci/pipeline.yml
Comment on lines +161 to +164
- name: autobump-dependencies
public: true
serial: true
plan:
Comment thread ci/pipeline.yml
Comment on lines +176 to +178
inputs:
- name: git
platform: linux
Comment thread ci/pipeline.yml
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

2 participants