Skip to content

Commit

Permalink
Migrate to new image repositories
Browse files Browse the repository at this point in the history
  • Loading branch information
spikymonkey committed May 14, 2024
1 parent 3905cfe commit 117db45
Show file tree
Hide file tree
Showing 13 changed files with 124 additions and 51 deletions.
20 changes: 10 additions & 10 deletions ci/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#App Broker CI Pipeline
# App Broker CI Pipeline

## Running the acceptance tests on Cloud Foundry locally

Expand Down Expand Up @@ -36,7 +36,7 @@ The original pipeline was decomposed into different jobs so that we could recove

### Fly

The pipeline can be run using the following script:
The pipeline can be set using the following script on the most recent branch of the repository:

```$bash
$ ./scripts/set-pipelines.sh
Expand All @@ -49,22 +49,22 @@ If you don't want to click, you can trigger each job using the CLI:
To release a milestone:

```$bash
$ fly -t scs trigger-job -j release-test/stage-milestone
$ fly -t scs trigger-job -j release-test/promote-milestone
$ fly -t app-broker trigger-job -j release-test/stage-milestone
$ fly -t app-broker trigger-job -j release-test/promote-milestone
```

To release an RC:

```$bash
$ fly -t scs trigger-job -j release-test/stage-rc
$ fly -t scs trigger-job -j release-test/promote-rc
$ fly -t app-broker trigger-job -j release-test/stage-rc
$ fly -t app-broker trigger-job -j release-test/promote-rc
```

To release a GA:

```$bash
$ fly -t scs trigger-job -j release-test/stage-release
$ fly -t scs trigger-job -j release-test/promote-release
$ fly -t scs trigger-job -j release-test/distribute-release
$ fly -t scs trigger-job -j release-test/sync-to-maven-central
$ fly -t app-broker trigger-job -j release-test/stage-release
$ fly -t app-broker trigger-job -j release-test/promote-release
$ fly -t app-broker trigger-job -j release-test/distribute-release
$ fly -t app-broker trigger-job -j release-test/sync-to-maven-central
```
50 changes: 26 additions & 24 deletions ci/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,32 +22,26 @@ jobs:
trigger: true
- get: ci-images-git-repo
trigger: true
- task: generate-docker-credentials
file: ci-images-git-repo/ci/tasks/generate-docker-credentials.yml
input_mapping:
git-repo: ci-images-git-repo
vars:
registry: ((app-broker-dev-docker-registry))
registry-username: ((broadcom-jfrog-artifactory-robot-account.username))
registry-password: ((broadcom-jfrog-artifactory-robot-account.password))
- task: build-image
privileged: true
tags: [ btrfs ]
config:
platform: linux
image_resource:
type: registry-image
source:
repository: ((dockerhub-mirror-registry))/concourse/oci-build-task
tag: 0.10.0
inputs:
- name: source
outputs:
- name: image
run:
path: build
file: ci-images-git-repo/ci/tasks/build-oci-image.yml
input_mapping:
source: ci-images-git-repo
git-repo: ci-images-git-repo
params:
CONTEXT: source/ci/images/app-broker-ci
CONTEXT: git-repo/ci/images/app-broker-ci
- put: app-broker-ci-image
inputs: detect
params:
image: image/image.tar
get_params:
skip_download: true
no_get: true
on_failure: *slack-failure-notification

- name: build
Expand Down Expand Up @@ -232,13 +226,17 @@ resource_types:
- name: artifactory-resource
type: registry-image
source:
repository: ((dockerhub-mirror-registry))/springio/artifactory-resource
repository: ((app-broker-virtual-docker-registry))/springio/artifactory-resource
username: ((broadcom-jfrog-artifactory-robot-account.username))
password: ((broadcom-jfrog-artifactory-robot-account.password))
tag: 0.0.14

- name: slack-notification
type: registry-image
source:
repository: ((dockerhub-mirror-registry))/cfcommunity/slack-notification-resource
repository: ((app-broker-virtual-docker-registry))/cfcommunity/slack-notification-resource
username: ((broadcom-jfrog-artifactory-robot-account.username))
password: ((broadcom-jfrog-artifactory-robot-account.password))
tag: latest

- name: shepherd
Expand Down Expand Up @@ -297,14 +295,18 @@ resources:
source:
uri: ((github-repo))
branch: ((branch))
paths: ["ci/images/*"]
paths:
- ci/images/*
- ci/scripts/generate-docker-credentials.sh
- ci/tasks/build-oci-image.yml
- ci/tasks/generate-docker-credentials.yml

- name: app-broker-ci-image
type: registry-image
source:
repository: ((corporate-harbor-registry))/((dockerhub-organization))/app-broker-ci
username: ((corporate-harbor-robot-account.username))
password: ((corporate-harbor-robot-account.password))
repository: ((app-broker-dev-docker-registry))/ci/app-broker-ci
username: ((broadcom-jfrog-artifactory-robot-account.username))
password: ((broadcom-jfrog-artifactory-robot-account.password))
tag: ((ci-image-tag))

- name: artifactory-repo
Expand Down
4 changes: 3 additions & 1 deletion ci/pr-manager-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ resource_types:
- name: pull-request
type: registry-image
source:
repository: ((dockerhub-mirror-registry))/teliaoss/github-pr-resource
repository: ((app-broker-virtual-docker-registry))/teliaoss/github-pr-resource
username: ((broadcom-jfrog-artifactory-robot-account.username))
password: ((broadcom-jfrog-artifactory-robot-account.password))
tag: v0.23.0

resources:
Expand Down
8 changes: 6 additions & 2 deletions ci/pr-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,17 @@ resource_types:
- name: pull-request
type: registry-image
source:
repository: ((dockerhub-mirror-registry))/teliaoss/github-pr-resource
repository: ((app-broker-virtual-docker-registry))/teliaoss/github-pr-resource
username: ((broadcom-jfrog-artifactory-robot-account.username))
password: ((broadcom-jfrog-artifactory-robot-account.password))
tag: latest

- name: slack-notification
type: registry-image
source:
repository: ((dockerhub-mirror-registry))/cfcommunity/slack-notification-resource
repository: ((app-broker-virtual-docker-registry))/cfcommunity/slack-notification-resource
username: ((broadcom-jfrog-artifactory-robot-account.username))
password: ((broadcom-jfrog-artifactory-robot-account.password))
tag: latest

- name: shepherd
Expand Down
13 changes: 13 additions & 0 deletions ci/scripts/generate-docker-credentials.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh

set -eu

export TERM="xterm-256color"

readonly DOCKER_CONFIG_OUTPUT="${DOCKER_CONFIG_OUTPUT:?must be set}"

# Note that we don't use libs.sh here because that script requires bash, and
# we don't have bash in this container image

printf "%s" "$REGISTRY_PASSWORD" | docker login "$REGISTRY" --username "$REGISTRY_USERNAME" --password-stdin
cp -v ~/.docker/config.json "$DOCKER_CONFIG_OUTPUT/"
6 changes: 3 additions & 3 deletions ci/tasks/acceptance-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ platform: linux
image_resource:
type: registry-image
source:
repository: ((corporate-harbor-registry))/((dockerhub-organization))/app-broker-ci
username: ((corporate-harbor-robot-account.username))
password: ((corporate-harbor-robot-account.password))
repository: ((app-broker-dev-docker-registry))/ci/app-broker-ci
username: ((broadcom-jfrog-artifactory-robot-account.username))
password: ((broadcom-jfrog-artifactory-robot-account.password))
tag: ((ci-image-tag))
inputs:
- name: git-repo
Expand Down
23 changes: 23 additions & 0 deletions ci/tasks/build-oci-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
platform: linux

image_resource:
type: registry-image
source:
repository: ((app-broker-virtual-docker-registry))/concourse/oci-build-task
tag: 0.11.1
username: ((broadcom-jfrog-artifactory-robot-account.username))
password: ((broadcom-jfrog-artifactory-robot-account.password))

inputs:
- name: git-repo
- name: docker-config

outputs:
- name: image

run:
path: build

params:
DEBUG: true
DOCKER_CONFIG: docker-config
6 changes: 3 additions & 3 deletions ci/tasks/build-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ platform: linux
image_resource:
type: registry-image
source:
repository: ((corporate-harbor-registry))/((dockerhub-organization))/app-broker-ci
username: ((corporate-harbor-robot-account.username))
password: ((corporate-harbor-robot-account.password))
repository: ((app-broker-dev-docker-registry))/ci/app-broker-ci
username: ((broadcom-jfrog-artifactory-robot-account.username))
password: ((broadcom-jfrog-artifactory-robot-account.password))
tag: ((ci-image-tag))
inputs:
- name: git-repo
Expand Down
25 changes: 25 additions & 0 deletions ci/tasks/generate-docker-credentials.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
platform: linux

image_resource:
type: registry-image
source:
repository: ((app-broker-virtual-docker-registry))/docker
tag: 26-cli
username: ((broadcom-jfrog-artifactory-robot-account.username))
password: ((broadcom-jfrog-artifactory-robot-account.password))

inputs:
- name: git-repo

outputs:
- name: docker-config

run:
path: ci/scripts/generate-docker-credentials.sh
dir: git-repo

params:
DOCKER_CONFIG_OUTPUT: ../docker-config
REGISTRY: ((registry))
REGISTRY_USERNAME: ((registry-username))
REGISTRY_PASSWORD: ((registry-password))
6 changes: 3 additions & 3 deletions ci/tasks/list-prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ platform: linux
image_resource:
type: registry-image
source:
repository: ((corporate-harbor-registry))/((dockerhub-organization))/app-broker-ci
repository: ((app-broker-dev-docker-registry))/ci/app-broker-ci
username: ((broadcom-jfrog-artifactory-robot-account.username))
password: ((broadcom-jfrog-artifactory-robot-account.password))
tag: ((ci-image-tag))
username: ((corporate-harbor-robot-account.username))
password: ((corporate-harbor-robot-account.password))

inputs:
- name: git-repo
Expand Down
4 changes: 3 additions & 1 deletion ci/tasks/promote.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ platform: linux
image_resource:
type: registry-image
source:
repository: ((dockerhub-mirror-registry))/springio/concourse-release-scripts
repository: ((app-broker-virtual-docker-registry))/springio/concourse-release-scripts
username: ((broadcom-jfrog-artifactory-robot-account.username))
password: ((broadcom-jfrog-artifactory-robot-account.password))
tag: '0.3.4'
inputs:
- name: git-repo
Expand Down
6 changes: 3 additions & 3 deletions ci/tasks/stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ platform: linux
image_resource:
type: registry-image
source:
repository: ((corporate-harbor-registry))/((dockerhub-organization))/app-broker-ci
username: ((corporate-harbor-robot-account.username))
password: ((corporate-harbor-robot-account.password))
repository: ((app-broker-dev-docker-registry))/ci/app-broker-ci
username: ((broadcom-jfrog-artifactory-robot-account.username))
password: ((broadcom-jfrog-artifactory-robot-account.password))
tag: ((ci-image-tag))
inputs:
- name: git-repo
Expand Down
4 changes: 3 additions & 1 deletion ci/tasks/sync-to-maven-central.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ platform: linux
image_resource:
type: registry-image
source:
repository: ((dockerhub-mirror-registry))/springio/concourse-release-scripts
repository: ((app-broker-virtual-docker-registry))/springio/concourse-release-scripts
username: ((broadcom-jfrog-artifactory-robot-account.username))
password: ((broadcom-jfrog-artifactory-robot-account.password))
tag: '0.3.4'
inputs:
- name: git-repo
Expand Down

0 comments on commit 117db45

Please sign in to comment.