Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Periodically build and use testflight image #733

Merged
merged 6 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion ci/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
vars.yml
source.me
135 changes: 71 additions & 64 deletions ci/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ groups:
- minor
- major
- autobump-dependencies
- build-haproxy-testflight-image

jobs:
- name: unit-tests
Expand All @@ -22,16 +23,11 @@ jobs:
- do:
- get: git
trigger: true
- get: haproxy-boshrelease-testflight
- task: lint
image: haproxy-boshrelease-testflight
config:
platform: linux
image_resource:
type: docker-image
source:
repository: cf-routing.common.repositories.cloud.sap/haproxy-boshrelease-testflight
tag: latest
username: ((docker.username))
password: ((docker.password))
inputs:
- { name: git }
caches:
Expand All @@ -43,18 +39,11 @@ jobs:
params:
REPO_ROOT: git
- task: unit-tests
image: haproxy-boshrelease-testflight
config:
platform: linux
image_resource:
type: docker-image
source:
repository: cf-routing.common.repositories.cloud.sap/haproxy-boshrelease-testflight
tag: latest
username: ((docker.username))
password: ((docker.password))
inputs:
- { name: git }

caches:
- path: git/vendor/cache
- path: git/.bundle
Expand All @@ -69,29 +58,24 @@ jobs:
channel: "#haproxy-boshrelease"
username: ci-bot
icon_url: "((slack.icon))"
text: "((slack.fail_url)) haproxy-boshrelease : unit-tests job failed"
text: "((slack.fail_url)) haproxy-boshrelease : unit-tests job failed"

- name: unit-tests-pr
public: true
serial: true
plan:
- do:
- { get: git-pull-requests, trigger: true, version: every }
- get: haproxy-boshrelease-testflight
- put: git-pull-requests
params:
path: git-pull-requests
status: pending
context: unit-tests
- task: lint
image: haproxy-boshrelease-testflight
config:
platform: linux
image_resource:
type: docker-image
source:
repository: cf-routing.common.repositories.cloud.sap/haproxy-boshrelease-testflight
tag: latest
username: ((docker.username))
password: ((docker.password))
inputs:
- { name: git-pull-requests }
caches:
Expand All @@ -103,15 +87,9 @@ jobs:
params:
REPO_ROOT: git-pull-requests
- task: unit-tests
image: haproxy-boshrelease-testflight
config:
platform: linux
image_resource:
type: docker-image
source:
repository: cf-routing.common.repositories.cloud.sap/haproxy-boshrelease-testflight
tag: latest
username: ((docker.username))
password: ((docker.password))
inputs:
- { name: git-pull-requests }
caches:
Expand All @@ -135,7 +113,6 @@ jobs:
status: failure
context: unit-tests


- name: acceptance-tests
public: true
serial: true
Expand All @@ -146,17 +123,12 @@ jobs:
- { get: stemcell }
- { get: stemcell-bionic }
- { get: bpm }
- get: haproxy-boshrelease-testflight
- task: acceptance-tests
privileged: true
image: haproxy-boshrelease-testflight
config:
platform: linux
image_resource:
type: docker-image
source:
repository: cf-routing.common.repositories.cloud.sap/haproxy-boshrelease-testflight
tag: latest
username: ((docker.username))
password: ((docker.password))
inputs:
- { name: git }
- { name: stemcell }
Expand All @@ -173,7 +145,7 @@ jobs:
channel: "#haproxy-boshrelease"
username: ci-bot
icon_url: "((slack.icon))"
text: "((slack.fail_url)) haproxy-boshrelease : acceptance tests failed"
text: "((slack.fail_url)) haproxy-boshrelease : acceptance tests failed"

- name: acceptance-tests-pr
public: true
Expand All @@ -184,6 +156,7 @@ jobs:
- { get: stemcell }
- { get: stemcell-bionic }
- { get: bpm }
- get: haproxy-boshrelease-testflight
- put: git-pull-requests
params:
path: git-pull-requests
Expand All @@ -193,15 +166,9 @@ jobs:
list_changed_files: true
- task: acceptance-tests
privileged: true
image: haproxy-boshrelease-testflight
config:
platform: linux
image_resource:
type: docker-image
source:
repository: cf-routing.common.repositories.cloud.sap/haproxy-boshrelease-testflight
tag: latest
username: ((docker.username))
password: ((docker.password))
inputs:
- { name: git-pull-requests }
- { name: stemcell }
Expand Down Expand Up @@ -240,7 +207,7 @@ jobs:
channel: "#haproxy-boshrelease"
username: ci-bot
icon_url: "((slack.icon))"
text: "((slack.fail_url)) haproxy-boshrelease : rc job failed"
text: "((slack.fail_url)) haproxy-boshrelease : rc job failed"

- name: patch
public: true
Expand Down Expand Up @@ -292,16 +259,11 @@ jobs:
- in_parallel:
- { get: version, passed: [rc], params: {bump: final} }
- { get: git, passed: [rc] }
- get: haproxy-boshrelease-testflight
- task: release
image: haproxy-boshrelease-testflight
config:
platform: linux
image_resource:
type: docker-image
source:
repository: cf-routing.common.repositories.cloud.sap/haproxy-boshrelease-testflight
tag: latest
username: ((docker.username))
password: ((docker.password))
inputs:
- name: version
- name: git
Expand All @@ -323,7 +285,6 @@ jobs:
GIT_USER_NAME: ((github.bot_user))
GIT_USER_EMAIL: ((github.bot_email))
GCP_SERVICE_KEY: ((gcp.service_key))

- put: git
params:
rebase: true
Expand All @@ -349,7 +310,8 @@ jobs:
channel: "#haproxy-boshrelease"
username: ci-bot
icon_url: "((slack.icon))"
text: "((slack.fail_url)) haproxy-boshrelease : shipit job failed"
text: "((slack.fail_url)) haproxy-boshrelease : shipit job failed"

- name: autobump-dependencies
public: true
serial: true
Expand All @@ -358,18 +320,13 @@ jobs:
- get: daily
trigger: true
- get: git
- get: haproxy-boshrelease-testflight
- task: autobump-dependencies
image: haproxy-boshrelease-testflight
config:
inputs:
- name: git
platform: linux
image_resource:
type: docker-image
source:
repository: cf-routing.common.repositories.cloud.sap/haproxy-boshrelease-testflight
tag: latest
username: ((docker.username))
password: ((docker.password))
run:
dir: git
path: /usr/bin/python3
Expand All @@ -379,10 +336,39 @@ jobs:
PR_BASE: master
PR_ORG: cloudfoundry
PR_LABEL: run-ci

GCP_SERVICE_KEY: ((gcp.service_key))
GITHUB_COM_TOKEN: ((github.access_token))

- name: build-haproxy-testflight-image
public: true
serial: true
plan:
- in_parallel:
- get: git-ci
trigger: true
- get: daily
trigger: true
- get: docker-cpi-image
trigger: true
- task: create-daily-tag
image: docker-cpi-image
config:
outputs:
- name: tag
platform: linux
run:
path: sh
args:
- -exc
- date +%Y.%m.%d-%H%M%S | tee tag/today
- put: haproxy-boshrelease-testflight
params:
tag_as_latest: true
tag_file: tag/today
build: git-ci/ci
get_params:
skip_download: true

resource_types:
- name: slack-notification
type: docker-image
Expand Down Expand Up @@ -476,3 +462,24 @@ resources:
stop: 8:00 AM
location: Europe/Berlin
interval: 24h

- name: docker-cpi-image
type: docker-image
source:
repository: bosh/docker-cpi

- name: git-ci
type: git
source:
uri: https://github.com/cloudfoundry/haproxy-boshrelease.git
branch: master
paths:
- ci/Dockerfile
- ci/scripts/requirements.txt

- name: haproxy-boshrelease-testflight
type: docker-image
source:
repository: europe-west3-docker.pkg.dev/app-runtime-platform-wg/arp-wg-docker/haproxy-boshrelease-testflight
username: _json_key
password: ((gcp.docker_image_writer_service_key))
3 changes: 2 additions & 1 deletion ci/upload-to-concourse.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ fi

echo "Please follow https://github.com/cloudfoundry/routing-concourse/blob/main/README.md#authentication-to-concourse for login."

fly -t networking-extensions login -c https://concourse.arp.cloudfoundry.org/
! fly status -t networking-extensions >/dev/null && \
fly -t networking-extensions login -c https://concourse.arp.cloudfoundry.org/
fly -t networking-extensions validate-pipeline -c pipeline.yml
fly -t networking-extensions set-pipeline -p haproxy-boshrelease -c pipeline.yml --load-vars-from vars.yml
fly -t networking-extensions expose-pipeline -p haproxy-boshrelease
Expand Down