Skip to content

Commit

Permalink
Merge pull request #2503 from Brian-McM/bm-add-pin-update-pipeline
Browse files Browse the repository at this point in the history
Add update pins pipelines
  • Loading branch information
Brian-McM committed Sep 21, 2020
2 parents 66004e2 + 12e947f commit 7299ad1
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 2 deletions.
8 changes: 8 additions & 0 deletions .semaphore/semaphore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ promotions:
pipeline_file: cleanup.yml
auto_promote:
when: "result = 'stopped'"
# Run the pin update process in case there were a backlog of pin update requests
- name: Update Pins
pipeline_file: update_pins.yml
auto_promote:
# If the block has passed and the branch is for master or a release branch then run the pin updates. Note that
# this doesn't try to restrict which release branches, as the presence of this auto promotion code means that
# it can handle updating the pins in this fashion.
when: "(result = 'passed') and ((branch = 'master') or (branch =~ 'release-v\d*\.\d*'))"

blocks:
- name: Build
Expand Down
33 changes: 33 additions & 0 deletions .semaphore/update_pins.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
version: v1.0
name: Trigger Pin Updates
agent:
machine:
type: e1-standard-2
os_image: ubuntu1804

global_job_config:
secrets:
# Mount the github SSH secret for repositories.
- name: private-repo
# Mount a secret for pulling images from GCR.
- name: tigera-dev-ci-pull-credentials
prologue:
commands:
# Correct permissions since they are too open by default:
- chmod 0600 ~/.keys/*
# Add the key to the ssh agent:
- ssh-add ~/.keys/*
# Login to docker in order to pull images.
- docker login --username casey@tigera.io -u _json_key -p "$(cat /home/semaphore/tigera-dev-ci.json)" https://gcr.io
- checkout

blocks:
- name: 'Auto pin update'
task:
secrets:
- name: marvin-github-token
jobs:
- name: 'Auto pin update'
commands:
- CONFIRM=true make git-config
- CONFIRM=true GITHUB_TOKEN=${MARVIN_GITHUB_TOKEN} make trigger-auto-pin-update-process
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
#
###############################################################################
PACKAGE_NAME?=github.com/projectcalico/felix
GO_BUILD_VER?=v0.45
GO_BUILD_VER?=v0.47

SEMAPHORE_PROJECT_ID=$(SEMAPHORE_FELIX_PROJECT_ID)

###############################################################################
# Download and include Makefile.common
Expand Down Expand Up @@ -128,7 +130,8 @@ clean:
go/docs/calc.pdf \
release-notes-* \
fv/infrastructure/crds/ \
vendor
vendor \
Makefile.common*
find . -name "junit.xml" -type f -delete
find . -name "*.coverprofile" -type f -delete
find . -name "coverage.xml" -type f -delete
Expand Down

0 comments on commit 7299ad1

Please sign in to comment.