docker-atlassian-confluence.../bitbucket-pipelines.yml
2022-03-08 17:14:56 +11:00

719 lines
29 KiB
YAML

---
# NOTE: This file is generated from `bitbucket-pipelines.yml.j2` via `pipelines-generator.py`:
#
# python3 pipelines-generator.py > bitbucket-pipelines.yml
image: atlassian/docker-release-maker:latest
definitions:
services:
docker:
memory: 4096
options:
size: 2x
pipelines:
branches:
######################################################################
# Master branch: Do full release for each image flavour
######################################################################
master:
- step:
name: Check if pipelines config is up-to-date...
script:
- python3 pipelines-generator.py > bitbucket-piplines.yml.expected && diff bitbucket-pipelines.yml bitbucket-piplines.yml.expected
- parallel:
- step:
name: JDK 11 - Batch 1
services:
- docker
script:
- git submodule update --init --recursive
- echo ${DOCKER_PASSWORD} | docker login --username ${DOCKER_USERNAME} --password-stdin
- >
python /usr/src/app/make-releases.py \
--update \
--start-version='7.4' \
--end-version='8' \
--default-release \
--dockerfile='Dockerfile' \
--dockerfile-buildargs='BASE_IMAGE=adoptopenjdk/openjdk11' \
--dockerfile-version-arg='CONFLUENCE_VERSION' \
--mac-product-key='confluence' \
--tag-suffixes='adoptopenjdk11,jdk11,ubuntu,ubuntu-18.04-adoptopenjdk11' \
--concurrent-builds='1' \
--job-offset='0' \
--jobs-total='12' \
--docker-repos='atlassian/confluence,atlassian/confluence-server' \
--push
- step:
name: JDK 11 - Batch 2
services:
- docker
script:
- git submodule update --init --recursive
- echo ${DOCKER_PASSWORD} | docker login --username ${DOCKER_USERNAME} --password-stdin
- >
python /usr/src/app/make-releases.py \
--update \
--start-version='7.4' \
--end-version='8' \
--default-release \
--dockerfile='Dockerfile' \
--dockerfile-buildargs='BASE_IMAGE=adoptopenjdk/openjdk11' \
--dockerfile-version-arg='CONFLUENCE_VERSION' \
--mac-product-key='confluence' \
--tag-suffixes='adoptopenjdk11,jdk11,ubuntu,ubuntu-18.04-adoptopenjdk11' \
--concurrent-builds='1' \
--job-offset='1' \
--jobs-total='12' \
--docker-repos='atlassian/confluence,atlassian/confluence-server' \
--push
- step:
name: JDK 11 - Batch 3
services:
- docker
script:
- git submodule update --init --recursive
- echo ${DOCKER_PASSWORD} | docker login --username ${DOCKER_USERNAME} --password-stdin
- >
python /usr/src/app/make-releases.py \
--update \
--start-version='7.4' \
--end-version='8' \
--default-release \
--dockerfile='Dockerfile' \
--dockerfile-buildargs='BASE_IMAGE=adoptopenjdk/openjdk11' \
--dockerfile-version-arg='CONFLUENCE_VERSION' \
--mac-product-key='confluence' \
--tag-suffixes='adoptopenjdk11,jdk11,ubuntu,ubuntu-18.04-adoptopenjdk11' \
--concurrent-builds='1' \
--job-offset='2' \
--jobs-total='12' \
--docker-repos='atlassian/confluence,atlassian/confluence-server' \
--push
- step:
name: JDK 11 - Batch 4
services:
- docker
script:
- git submodule update --init --recursive
- echo ${DOCKER_PASSWORD} | docker login --username ${DOCKER_USERNAME} --password-stdin
- >
python /usr/src/app/make-releases.py \
--update \
--start-version='7.4' \
--end-version='8' \
--default-release \
--dockerfile='Dockerfile' \
--dockerfile-buildargs='BASE_IMAGE=adoptopenjdk/openjdk11' \
--dockerfile-version-arg='CONFLUENCE_VERSION' \
--mac-product-key='confluence' \
--tag-suffixes='adoptopenjdk11,jdk11,ubuntu,ubuntu-18.04-adoptopenjdk11' \
--concurrent-builds='1' \
--job-offset='3' \
--jobs-total='12' \
--docker-repos='atlassian/confluence,atlassian/confluence-server' \
--push
- step:
name: JDK 11 - Batch 5
services:
- docker
script:
- git submodule update --init --recursive
- echo ${DOCKER_PASSWORD} | docker login --username ${DOCKER_USERNAME} --password-stdin
- >
python /usr/src/app/make-releases.py \
--update \
--start-version='7.4' \
--end-version='8' \
--default-release \
--dockerfile='Dockerfile' \
--dockerfile-buildargs='BASE_IMAGE=adoptopenjdk/openjdk11' \
--dockerfile-version-arg='CONFLUENCE_VERSION' \
--mac-product-key='confluence' \
--tag-suffixes='adoptopenjdk11,jdk11,ubuntu,ubuntu-18.04-adoptopenjdk11' \
--concurrent-builds='1' \
--job-offset='4' \
--jobs-total='12' \
--docker-repos='atlassian/confluence,atlassian/confluence-server' \
--push
- step:
name: JDK 11 - Batch 6
services:
- docker
script:
- git submodule update --init --recursive
- echo ${DOCKER_PASSWORD} | docker login --username ${DOCKER_USERNAME} --password-stdin
- >
python /usr/src/app/make-releases.py \
--update \
--start-version='7.4' \
--end-version='8' \
--default-release \
--dockerfile='Dockerfile' \
--dockerfile-buildargs='BASE_IMAGE=adoptopenjdk/openjdk11' \
--dockerfile-version-arg='CONFLUENCE_VERSION' \
--mac-product-key='confluence' \
--tag-suffixes='adoptopenjdk11,jdk11,ubuntu,ubuntu-18.04-adoptopenjdk11' \
--concurrent-builds='1' \
--job-offset='5' \
--jobs-total='12' \
--docker-repos='atlassian/confluence,atlassian/confluence-server' \
--push
- step:
name: JDK 11 - Batch 7
services:
- docker
script:
- git submodule update --init --recursive
- echo ${DOCKER_PASSWORD} | docker login --username ${DOCKER_USERNAME} --password-stdin
- >
python /usr/src/app/make-releases.py \
--update \
--start-version='7.4' \
--end-version='8' \
--default-release \
--dockerfile='Dockerfile' \
--dockerfile-buildargs='BASE_IMAGE=adoptopenjdk/openjdk11' \
--dockerfile-version-arg='CONFLUENCE_VERSION' \
--mac-product-key='confluence' \
--tag-suffixes='adoptopenjdk11,jdk11,ubuntu,ubuntu-18.04-adoptopenjdk11' \
--concurrent-builds='1' \
--job-offset='6' \
--jobs-total='12' \
--docker-repos='atlassian/confluence,atlassian/confluence-server' \
--push
- step:
name: JDK 11 - Batch 8
services:
- docker
script:
- git submodule update --init --recursive
- echo ${DOCKER_PASSWORD} | docker login --username ${DOCKER_USERNAME} --password-stdin
- >
python /usr/src/app/make-releases.py \
--update \
--start-version='7.4' \
--end-version='8' \
--default-release \
--dockerfile='Dockerfile' \
--dockerfile-buildargs='BASE_IMAGE=adoptopenjdk/openjdk11' \
--dockerfile-version-arg='CONFLUENCE_VERSION' \
--mac-product-key='confluence' \
--tag-suffixes='adoptopenjdk11,jdk11,ubuntu,ubuntu-18.04-adoptopenjdk11' \
--concurrent-builds='1' \
--job-offset='7' \
--jobs-total='12' \
--docker-repos='atlassian/confluence,atlassian/confluence-server' \
--push
- step:
name: JDK 11 - Batch 9
services:
- docker
script:
- git submodule update --init --recursive
- echo ${DOCKER_PASSWORD} | docker login --username ${DOCKER_USERNAME} --password-stdin
- >
python /usr/src/app/make-releases.py \
--update \
--start-version='7.4' \
--end-version='8' \
--default-release \
--dockerfile='Dockerfile' \
--dockerfile-buildargs='BASE_IMAGE=adoptopenjdk/openjdk11' \
--dockerfile-version-arg='CONFLUENCE_VERSION' \
--mac-product-key='confluence' \
--tag-suffixes='adoptopenjdk11,jdk11,ubuntu,ubuntu-18.04-adoptopenjdk11' \
--concurrent-builds='1' \
--job-offset='8' \
--jobs-total='12' \
--docker-repos='atlassian/confluence,atlassian/confluence-server' \
--push
- step:
name: JDK 11 - Batch 10
services:
- docker
script:
- git submodule update --init --recursive
- echo ${DOCKER_PASSWORD} | docker login --username ${DOCKER_USERNAME} --password-stdin
- >
python /usr/src/app/make-releases.py \
--update \
--start-version='7.4' \
--end-version='8' \
--default-release \
--dockerfile='Dockerfile' \
--dockerfile-buildargs='BASE_IMAGE=adoptopenjdk/openjdk11' \
--dockerfile-version-arg='CONFLUENCE_VERSION' \
--mac-product-key='confluence' \
--tag-suffixes='adoptopenjdk11,jdk11,ubuntu,ubuntu-18.04-adoptopenjdk11' \
--concurrent-builds='1' \
--job-offset='9' \
--jobs-total='12' \
--docker-repos='atlassian/confluence,atlassian/confluence-server' \
--push
- step:
name: JDK 11 - Batch 11
services:
- docker
script:
- git submodule update --init --recursive
- echo ${DOCKER_PASSWORD} | docker login --username ${DOCKER_USERNAME} --password-stdin
- >
python /usr/src/app/make-releases.py \
--update \
--start-version='7.4' \
--end-version='8' \
--default-release \
--dockerfile='Dockerfile' \
--dockerfile-buildargs='BASE_IMAGE=adoptopenjdk/openjdk11' \
--dockerfile-version-arg='CONFLUENCE_VERSION' \
--mac-product-key='confluence' \
--tag-suffixes='adoptopenjdk11,jdk11,ubuntu,ubuntu-18.04-adoptopenjdk11' \
--concurrent-builds='1' \
--job-offset='10' \
--jobs-total='12' \
--docker-repos='atlassian/confluence,atlassian/confluence-server' \
--push
- step:
name: JDK 11 - Batch 12
services:
- docker
script:
- git submodule update --init --recursive
- echo ${DOCKER_PASSWORD} | docker login --username ${DOCKER_USERNAME} --password-stdin
- >
python /usr/src/app/make-releases.py \
--update \
--start-version='7.4' \
--end-version='8' \
--default-release \
--dockerfile='Dockerfile' \
--dockerfile-buildargs='BASE_IMAGE=adoptopenjdk/openjdk11' \
--dockerfile-version-arg='CONFLUENCE_VERSION' \
--mac-product-key='confluence' \
--tag-suffixes='adoptopenjdk11,jdk11,ubuntu,ubuntu-18.04-adoptopenjdk11' \
--concurrent-builds='1' \
--job-offset='11' \
--jobs-total='12' \
--docker-repos='atlassian/confluence,atlassian/confluence-server' \
--push
- step:
name: Update README
image: python:3.7-alpine3.9
script:
- apk add --no-cache git
- git submodule update --init --recursive
- pip install -q requests
- export DOCKER_REPO='atlassian/confluence-server'
- python shared-components/image/push-readme.py
- export DOCKER_REPO='atlassian/confluence'
- python shared-components/image/push-readme.py
######################################################################
# All other branches & PRs; run unit tests & functional tests
# against latest app version
######################################################################
'**':
- step:
name: Check if pipelines config is up-to-date...
script:
- python3 pipelines-generator.py > bitbucket-piplines.yml.expected && diff bitbucket-pipelines.yml bitbucket-piplines.yml.expected
- parallel:
- step:
name: Run unit tests
image: python:3.7-alpine3.9
services:
- docker
script:
- apk add --no-cache git
- git submodule update --init --recursive
- pip install -q -r shared-components/tests/requirements.txt
- export PYTHONPATH=./shared-components/tests:$PYTHONPATH
- export DOCKERFILE='Dockerfile'
- export DOCKERFILE_VERSION_ARG='CONFLUENCE_VERSION'
- export MAC_PRODUCT_KEY='confluence'
- py.test -v tests/
- py.test -v shared-components/tests/
- step:
name: Run integration tests
services:
- docker
script:
- apk add --no-cache git docker-compose jq curl
- git submodule update --init --recursive
- export CONFLUENCE_VERSION=`curl -s https://marketplace.atlassian.com/rest/2/products/key/confluence/versions/latest | jq -r .name`
- docker build --build-arg CONFLUENCE_VERSION=${CONFLUENCE_VERSION} -t test-image .
- export IS_RELEASE=false
- /usr/src/app/post_build.sh test-image $IS_RELEASE
custom:
######################################################################
# Custom: Do full release for each image flavour
######################################################################
new-releases:
- parallel:
- step:
name: JDK 11 - Batch 1
services:
- docker
script:
- git submodule update --init --recursive
- echo ${DOCKER_PASSWORD} | docker login --username ${DOCKER_USERNAME} --password-stdin
- >
python /usr/src/app/make-releases.py \
--create \
--create-eap \
--start-version='7.4' \
--end-version='8' \
--default-release \
--dockerfile='Dockerfile' \
--dockerfile-buildargs='BASE_IMAGE=adoptopenjdk/openjdk11' \
--dockerfile-version-arg='CONFLUENCE_VERSION' \
--mac-product-key='confluence' \
--tag-suffixes='adoptopenjdk11,jdk11,ubuntu,ubuntu-18.04-adoptopenjdk11' \
--concurrent-builds='1' \
--job-offset='0' \
--jobs-total='12' \
--docker-repos='atlassian/confluence,atlassian/confluence-server' \
--push
- step:
name: JDK 11 - Batch 2
services:
- docker
script:
- git submodule update --init --recursive
- echo ${DOCKER_PASSWORD} | docker login --username ${DOCKER_USERNAME} --password-stdin
- >
python /usr/src/app/make-releases.py \
--create \
--create-eap \
--start-version='7.4' \
--end-version='8' \
--default-release \
--dockerfile='Dockerfile' \
--dockerfile-buildargs='BASE_IMAGE=adoptopenjdk/openjdk11' \
--dockerfile-version-arg='CONFLUENCE_VERSION' \
--mac-product-key='confluence' \
--tag-suffixes='adoptopenjdk11,jdk11,ubuntu,ubuntu-18.04-adoptopenjdk11' \
--concurrent-builds='1' \
--job-offset='1' \
--jobs-total='12' \
--docker-repos='atlassian/confluence,atlassian/confluence-server' \
--push
- step:
name: JDK 11 - Batch 3
services:
- docker
script:
- git submodule update --init --recursive
- echo ${DOCKER_PASSWORD} | docker login --username ${DOCKER_USERNAME} --password-stdin
- >
python /usr/src/app/make-releases.py \
--create \
--create-eap \
--start-version='7.4' \
--end-version='8' \
--default-release \
--dockerfile='Dockerfile' \
--dockerfile-buildargs='BASE_IMAGE=adoptopenjdk/openjdk11' \
--dockerfile-version-arg='CONFLUENCE_VERSION' \
--mac-product-key='confluence' \
--tag-suffixes='adoptopenjdk11,jdk11,ubuntu,ubuntu-18.04-adoptopenjdk11' \
--concurrent-builds='1' \
--job-offset='2' \
--jobs-total='12' \
--docker-repos='atlassian/confluence,atlassian/confluence-server' \
--push
- step:
name: JDK 11 - Batch 4
services:
- docker
script:
- git submodule update --init --recursive
- echo ${DOCKER_PASSWORD} | docker login --username ${DOCKER_USERNAME} --password-stdin
- >
python /usr/src/app/make-releases.py \
--create \
--create-eap \
--start-version='7.4' \
--end-version='8' \
--default-release \
--dockerfile='Dockerfile' \
--dockerfile-buildargs='BASE_IMAGE=adoptopenjdk/openjdk11' \
--dockerfile-version-arg='CONFLUENCE_VERSION' \
--mac-product-key='confluence' \
--tag-suffixes='adoptopenjdk11,jdk11,ubuntu,ubuntu-18.04-adoptopenjdk11' \
--concurrent-builds='1' \
--job-offset='3' \
--jobs-total='12' \
--docker-repos='atlassian/confluence,atlassian/confluence-server' \
--push
- step:
name: JDK 11 - Batch 5
services:
- docker
script:
- git submodule update --init --recursive
- echo ${DOCKER_PASSWORD} | docker login --username ${DOCKER_USERNAME} --password-stdin
- >
python /usr/src/app/make-releases.py \
--create \
--create-eap \
--start-version='7.4' \
--end-version='8' \
--default-release \
--dockerfile='Dockerfile' \
--dockerfile-buildargs='BASE_IMAGE=adoptopenjdk/openjdk11' \
--dockerfile-version-arg='CONFLUENCE_VERSION' \
--mac-product-key='confluence' \
--tag-suffixes='adoptopenjdk11,jdk11,ubuntu,ubuntu-18.04-adoptopenjdk11' \
--concurrent-builds='1' \
--job-offset='4' \
--jobs-total='12' \
--docker-repos='atlassian/confluence,atlassian/confluence-server' \
--push
- step:
name: JDK 11 - Batch 6
services:
- docker
script:
- git submodule update --init --recursive
- echo ${DOCKER_PASSWORD} | docker login --username ${DOCKER_USERNAME} --password-stdin
- >
python /usr/src/app/make-releases.py \
--create \
--create-eap \
--start-version='7.4' \
--end-version='8' \
--default-release \
--dockerfile='Dockerfile' \
--dockerfile-buildargs='BASE_IMAGE=adoptopenjdk/openjdk11' \
--dockerfile-version-arg='CONFLUENCE_VERSION' \
--mac-product-key='confluence' \
--tag-suffixes='adoptopenjdk11,jdk11,ubuntu,ubuntu-18.04-adoptopenjdk11' \
--concurrent-builds='1' \
--job-offset='5' \
--jobs-total='12' \
--docker-repos='atlassian/confluence,atlassian/confluence-server' \
--push
- step:
name: JDK 11 - Batch 7
services:
- docker
script:
- git submodule update --init --recursive
- echo ${DOCKER_PASSWORD} | docker login --username ${DOCKER_USERNAME} --password-stdin
- >
python /usr/src/app/make-releases.py \
--create \
--create-eap \
--start-version='7.4' \
--end-version='8' \
--default-release \
--dockerfile='Dockerfile' \
--dockerfile-buildargs='BASE_IMAGE=adoptopenjdk/openjdk11' \
--dockerfile-version-arg='CONFLUENCE_VERSION' \
--mac-product-key='confluence' \
--tag-suffixes='adoptopenjdk11,jdk11,ubuntu,ubuntu-18.04-adoptopenjdk11' \
--concurrent-builds='1' \
--job-offset='6' \
--jobs-total='12' \
--docker-repos='atlassian/confluence,atlassian/confluence-server' \
--push
- step:
name: JDK 11 - Batch 8
services:
- docker
script:
- git submodule update --init --recursive
- echo ${DOCKER_PASSWORD} | docker login --username ${DOCKER_USERNAME} --password-stdin
- >
python /usr/src/app/make-releases.py \
--create \
--create-eap \
--start-version='7.4' \
--end-version='8' \
--default-release \
--dockerfile='Dockerfile' \
--dockerfile-buildargs='BASE_IMAGE=adoptopenjdk/openjdk11' \
--dockerfile-version-arg='CONFLUENCE_VERSION' \
--mac-product-key='confluence' \
--tag-suffixes='adoptopenjdk11,jdk11,ubuntu,ubuntu-18.04-adoptopenjdk11' \
--concurrent-builds='1' \
--job-offset='7' \
--jobs-total='12' \
--docker-repos='atlassian/confluence,atlassian/confluence-server' \
--push
- step:
name: JDK 11 - Batch 9
services:
- docker
script:
- git submodule update --init --recursive
- echo ${DOCKER_PASSWORD} | docker login --username ${DOCKER_USERNAME} --password-stdin
- >
python /usr/src/app/make-releases.py \
--create \
--create-eap \
--start-version='7.4' \
--end-version='8' \
--default-release \
--dockerfile='Dockerfile' \
--dockerfile-buildargs='BASE_IMAGE=adoptopenjdk/openjdk11' \
--dockerfile-version-arg='CONFLUENCE_VERSION' \
--mac-product-key='confluence' \
--tag-suffixes='adoptopenjdk11,jdk11,ubuntu,ubuntu-18.04-adoptopenjdk11' \
--concurrent-builds='1' \
--job-offset='8' \
--jobs-total='12' \
--docker-repos='atlassian/confluence,atlassian/confluence-server' \
--push
- step:
name: JDK 11 - Batch 10
services:
- docker
script:
- git submodule update --init --recursive
- echo ${DOCKER_PASSWORD} | docker login --username ${DOCKER_USERNAME} --password-stdin
- >
python /usr/src/app/make-releases.py \
--create \
--create-eap \
--start-version='7.4' \
--end-version='8' \
--default-release \
--dockerfile='Dockerfile' \
--dockerfile-buildargs='BASE_IMAGE=adoptopenjdk/openjdk11' \
--dockerfile-version-arg='CONFLUENCE_VERSION' \
--mac-product-key='confluence' \
--tag-suffixes='adoptopenjdk11,jdk11,ubuntu,ubuntu-18.04-adoptopenjdk11' \
--concurrent-builds='1' \
--job-offset='9' \
--jobs-total='12' \
--docker-repos='atlassian/confluence,atlassian/confluence-server' \
--push
- step:
name: JDK 11 - Batch 11
services:
- docker
script:
- git submodule update --init --recursive
- echo ${DOCKER_PASSWORD} | docker login --username ${DOCKER_USERNAME} --password-stdin
- >
python /usr/src/app/make-releases.py \
--create \
--create-eap \
--start-version='7.4' \
--end-version='8' \
--default-release \
--dockerfile='Dockerfile' \
--dockerfile-buildargs='BASE_IMAGE=adoptopenjdk/openjdk11' \
--dockerfile-version-arg='CONFLUENCE_VERSION' \
--mac-product-key='confluence' \
--tag-suffixes='adoptopenjdk11,jdk11,ubuntu,ubuntu-18.04-adoptopenjdk11' \
--concurrent-builds='1' \
--job-offset='10' \
--jobs-total='12' \
--docker-repos='atlassian/confluence,atlassian/confluence-server' \
--push
- step:
name: JDK 11 - Batch 12
services:
- docker
script:
- git submodule update --init --recursive
- echo ${DOCKER_PASSWORD} | docker login --username ${DOCKER_USERNAME} --password-stdin
- >
python /usr/src/app/make-releases.py \
--create \
--create-eap \
--start-version='7.4' \
--end-version='8' \
--default-release \
--dockerfile='Dockerfile' \
--dockerfile-buildargs='BASE_IMAGE=adoptopenjdk/openjdk11' \
--dockerfile-version-arg='CONFLUENCE_VERSION' \
--mac-product-key='confluence' \
--tag-suffixes='adoptopenjdk11,jdk11,ubuntu,ubuntu-18.04-adoptopenjdk11' \
--concurrent-builds='1' \
--job-offset='11' \
--jobs-total='12' \
--docker-repos='atlassian/confluence,atlassian/confluence-server' \
--push
custom-release:
- variables:
- name: CONFLUENCE_VERSION
- name: DOCKER_TAG
- step:
services:
- docker
script:
- git submodule update --init --recursive
- echo ${DOCKER_PASSWORD} | docker login --username ${DOCKER_USERNAME} --password-stdin
- >
docker build -t atlassian/confluence:${DOCKER_TAG}
--build-arg CONFLUENCE_VERSION=${CONFLUENCE_VERSION} .
- snyk auth $SNYK_TOKEN
- snyk container test atlassian/confluence:${DOCKER_TAG} --severity-threshold=high
- docker push atlassian/confluence:${DOCKER_TAG}