Skip to content

Commit

Permalink
automation to bump go version
Browse files Browse the repository at this point in the history
Here's the design:
- We track changes to github.com/cloudfoundry/bosh-package-golang-release/blob/main/packages/golang-1-linux/version
  which denotes the latest available golang version.
- On change to above, CI fires the task that revendors the package and
  pushes to the repo.
- This updates the package's spec.lock and triggers the usual good olde
  rootfs building...release process.
- The CATS will guard against go update errors.
  • Loading branch information
arjun024 authored and robdimsdale committed Nov 1, 2023
1 parent 2d216e3 commit 2730f41
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions pipelines/cflinuxfs4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,23 @@ resources:
uri: git@github.com:cloudfoundry/cflinuxfs4-release.git
private_key: ((cflinuxfs4-release-deploy-key.private_key))

- name: cflinuxfs4-release-golang-update-trigger
type: git
source:
branch: main
uri: git@github.com:cloudfoundry/cflinuxfs4-release.git
private_key: ((cflinuxfs4-release-deploy-key.private_key))
paths:
- packages/golang-1-linux/spec.lock

- name: bosh-package-golang-release-trigger
type: git
source:
uri: https://github.com/cloudfoundry/bosh-package-golang-release.git
branch: main
paths:
- packages/golang-1-linux/version

- name: capi-release
type: git
source:
Expand Down Expand Up @@ -216,6 +233,36 @@ resources:
url: ((concourse-job-failure-notifications-slack-webhook))

jobs:
- name: bump-golang-package
serial: true
public: true
plan:
- in_parallel:
- get: cflinuxfs4-release
- get: bosh-package-golang-release-trigger
trigger: true
- task: bump-golang-package
file: bosh-package-golang-release-trigger/ci/tasks/shared/bump-golang-package.yml
input_mapping:
golang-release: bosh-package-golang-release-trigger
input_repo: cflinuxfs4-release
output_mapping:
output_repo: golang-bumped-cflinuxfs4-release
params:
GIT_USER_NAME: cf-buildpacks-eng
GIT_USER_EMAIL: cf-buildpacks-eng@pivotal.io
PACKAGES: [golang-1-linux]
PRIVATE_YML: |
---
blobstore:
options:
access_key_id: ((cloudfoundry-s3-access-key))
secret_access_key: ((cloudfoundry-s3-secret-key))
- put: cflinuxfs4-release
params:
repository: golang-bumped-cflinuxfs4-release
rebase: true

- name: build-rootfs
serial: true
serial_groups: [ cflinuxfs4 ]
Expand All @@ -231,6 +278,8 @@ jobs:
resource: cflinuxfs4
- get: cflinuxfs4-build-trigger
trigger: true
- get: cflinuxfs4-release-golang-update-trigger
trigger: true
- get: version
params: { pre: rc }
- get: public-robots
Expand Down

0 comments on commit 2730f41

Please sign in to comment.