Skip to content

Commit

Permalink
[bug] bbr -v now displays final version
Browse files Browse the repository at this point in the history
[fixes #179654999]
  • Loading branch information
dlresende committed Sep 21, 2021
1 parent 5e34566 commit d0c1cf4
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
7 changes: 6 additions & 1 deletion ci/pipelines/bbr/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -565,12 +565,17 @@ jobs:
- get: release-candidate-version
params:
pre: rc
- get: next-release-version
resource: release-candidate-version
params:
bump: final
- task: build-bbr
file: main/ci/tasks/bbr-build/task.yml
params:
GITHUB_SDK_PRIVATE_KEY: ((github-sdk.key))
input_mapping:
version: release-candidate-version
release-version: next-release-version
release-candidate-version: release-candidate-version
bosh-backup-and-restore: main
- task: build-s3-config-validator
file: main/ci/tasks/bbr-s3-config-validator-build/task.yml
Expand Down
16 changes: 9 additions & 7 deletions ci/tasks/bbr-build/task.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@

set -eu

[ -d 'version' ]
[ -d 'bosh-backup-and-restore' ]
[ -d 'release-candidate-version' ]
[ -d 'release-version' ]

eval "$(ssh-agent)"
echo -e "${GITHUB_SDK_PRIVATE_KEY}" > "${PWD}/github-sdk.key"
chmod 400 "${PWD}/github-sdk.key"
ssh-add "${PWD}/github-sdk.key"

VERSION=$(cat version/number)
RELEASE_CANDIDATE_VERSION=$(cat release-candidate-version/number)
VERSION=$(cat release-version/number)
export VERSION

BBR_REPO="bosh-backup-and-restore"
Expand All @@ -25,22 +28,21 @@ echo "The release directory now contains the following files:"
ls -R bbr-release

echo "Creating release tarball..."
tar -C bbr-release -cf "bbr-build/bbr-$VERSION.tar" .

tar -C bbr-release -cf "bbr-build/bbr-$RELEASE_CANDIDATE_VERSION.tar" .
echo "Auto-delivered in
https://s3-eu-west-1.amazonaws.com/bosh-backup-and-restore-builds/bbr-$VERSION.tar
https://s3-eu-west-1.amazonaws.com/bosh-backup-and-restore-builds/bbr-$RELEASE_CANDIDATE_VERSION.tar
[Backup and Restore Bot]" > bbr-build/message

echo "Moving linux binary to the build directory..."

LINUX="bbr-$VERSION-linux-amd64"
LINUX="bbr-$RELEASE_CANDIDATE_VERSION-linux-amd64"
mv "$BBR_REPO"/releases/bbr bbr-build/"$LINUX"
cat "$BBR_REPO"/releases/checksum.sha256 | cut -d' ' -f1 | sed -n '1p' > bbr-build/"$LINUX".sha256

echo "Moving mac binary to the build directory..."

DARWIN="bbr-$VERSION-darwin-amd64"
DARWIN="bbr-$RELEASE_CANDIDATE_VERSION-darwin-amd64"
mv "$BBR_REPO"/releases/bbr-mac bbr-build/"$DARWIN"
cat "$BBR_REPO"/releases/checksum.sha256 | cut -d' ' -f1 | sed -n '2p' > bbr-build/"$DARWIN".sha256

Expand Down
3 changes: 2 additions & 1 deletion ci/tasks/bbr-build/task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ image_resource:

inputs:
- name: bosh-backup-and-restore
- name: version
- name: release-candidate-version
- name: release-version

params:
GITHUB_SDK_PRIVATE_KEY:
Expand Down

0 comments on commit d0c1cf4

Please sign in to comment.