From cabff008c5fb9d226b98c9412a72dbfd4a46a17e Mon Sep 17 00:00:00 2001 From: Brian Upton Date: Fri, 29 Oct 2021 17:06:12 -0700 Subject: [PATCH] Convert to standard go dependency bumper [#180054765] TAS-138 Add Golang autobumping and dependency autobumping to our Go repos --- ci/docker/Dockerfile | 2 +- ci/pipeline.yml | 12 +++++++++++- ci/tasks/bump-deps.sh | 19 ------------------- ci/tasks/bump-deps.yml | 16 ---------------- 4 files changed, 12 insertions(+), 37 deletions(-) delete mode 100755 ci/tasks/bump-deps.sh delete mode 100644 ci/tasks/bump-deps.yml diff --git a/ci/docker/Dockerfile b/ci/docker/Dockerfile index f3796482e..ad40b8d8c 100644 --- a/ci/docker/Dockerfile +++ b/ci/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1 +FROM bosh/golang-release RUN \ apt-get update \ diff --git a/ci/pipeline.yml b/ci/pipeline.yml index 2019dbd02..53aa6fae1 100644 --- a/ci/pipeline.yml +++ b/ci/pipeline.yml @@ -20,8 +20,13 @@ jobs: - get: weekly trigger: true - get: bosh-cli + - get: golang-release - task: bump-deps - file: bosh-cli/ci/tasks/bump-deps.yml + file: golang-release/ci/tasks/shared/bump-deps.yml + input_mapping: + input_repo: bosh-cli + output_mapping: + output_repo: bumped-bosh-cli - task: test-unit input_mapping: bosh-cli: bumped-bosh-cli @@ -267,6 +272,11 @@ resources: branch: main context: ci/published + - name: golang-release + type: git + source: + uri: https://github.com/bosh-packages/golang-release.git + - name: release-bucket-linux type: s3 source: diff --git a/ci/tasks/bump-deps.sh b/ci/tasks/bump-deps.sh deleted file mode 100755 index 8d46ffc57..000000000 --- a/ci/tasks/bump-deps.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -set -e - -git clone bosh-cli bumped-bosh-cli - -cd bumped-bosh-cli - -go get -u ./... -go mod tidy -go mod vendor - -if [ "$(git status --porcelain)" != "" ]; then - git status - git add vendor go.sum go.mod - git config user.name "CI Bot" - git config user.email "cf-bosh-eng@pivotal.io" - git commit -m "Update vendored dependencies" -fi diff --git a/ci/tasks/bump-deps.yml b/ci/tasks/bump-deps.yml deleted file mode 100644 index 94c285098..000000000 --- a/ci/tasks/bump-deps.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- -platform: linux - -image_resource: - type: docker-image - source: - repository: bosh/go-dep-bumper - -inputs: -- name: bosh-cli - -outputs: -- name: bumped-bosh-cli - -run: - path: bosh-cli/ci/tasks/bump-deps.sh