DCD-1313: Parallelise branch testing, and also check for pipelines config freshness.

This commit is contained in:
Steve Smith 2021-07-15 10:04:10 +10:00
parent 8e234506b4
commit 41b7e85646
2 changed files with 62 additions and 48 deletions

View File

@ -344,31 +344,38 @@ pipelines:
###################################################################### ######################################################################
'**': '**':
- step: - step:
name: Run unit tests name: Check if pipelines config is up-to-date...
image: python:3.7-alpine3.9
services:
- docker
script: script:
- apk add --no-cache git - python3 pipelines-generator.py > bitbucket-piplines.yml.expected && diff bitbucket-pipelines.yml bitbucket-piplines.yml.expected
- git submodule update --init --recursive
- pip install -q -r shared-components/tests/requirements.txt - parallel:
- export PYTHONPATH=./shared-components/tests:$PYTHONPATH - step:
- export DOCKERFILE='Dockerfile' name: Run unit tests
- export DOCKERFILE_VERSION_ARG='CONFLUENCE_VERSION' image: python:3.7-alpine3.9
- export MAC_PRODUCT_KEY='confluence' services:
- py.test -v tests/ - docker
- py.test -v shared-components/tests/ script:
- step: - apk add --no-cache git
name: Run integration tests - git submodule update --init --recursive
services: - pip install -q -r shared-components/tests/requirements.txt
- docker - export PYTHONPATH=./shared-components/tests:$PYTHONPATH
script: - export DOCKERFILE='Dockerfile'
- apk add --no-cache git docker-compose jq curl - export DOCKERFILE_VERSION_ARG='CONFLUENCE_VERSION'
- git submodule update --init --recursive - export MAC_PRODUCT_KEY='confluence'
- export CONFLUENCE_VERSION=`curl -s https://marketplace.atlassian.com/rest/2/products/key/confluence/versions/latest | jq -r .name` - py.test -v tests/
- docker build --build-arg CONFLUENCE_VERSION=${CONFLUENCE_VERSION} -t test-image . - py.test -v shared-components/tests/
- export IS_RELEASE=false
- /usr/src/app/post_build.sh test-image $IS_RELEASE - 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:
###################################################################### ######################################################################

View File

@ -77,31 +77,38 @@ pipelines:
###################################################################### ######################################################################
'**': '**':
- step: - step:
name: Run unit tests name: Check if pipelines config is up-to-date...
image: python:3.7-alpine3.9
services:
- docker
script: script:
- apk add --no-cache git - python3 pipelines-generator.py > bitbucket-piplines.yml.expected && diff bitbucket-pipelines.yml bitbucket-piplines.yml.expected
- git submodule update --init --recursive
- pip install -q -r shared-components/tests/requirements.txt - parallel:
- export PYTHONPATH=./shared-components/tests:$PYTHONPATH - step:
- export DOCKERFILE='Dockerfile' name: Run unit tests
- export DOCKERFILE_VERSION_ARG='CONFLUENCE_VERSION' image: python:3.7-alpine3.9
- export MAC_PRODUCT_KEY='confluence' services:
- py.test -v tests/ - docker
- py.test -v shared-components/tests/ script:
- step: - apk add --no-cache git
name: Run integration tests - git submodule update --init --recursive
services: - pip install -q -r shared-components/tests/requirements.txt
- docker - export PYTHONPATH=./shared-components/tests:$PYTHONPATH
script: - export DOCKERFILE='Dockerfile'
- apk add --no-cache git docker-compose jq curl - export DOCKERFILE_VERSION_ARG='CONFLUENCE_VERSION'
- git submodule update --init --recursive - export MAC_PRODUCT_KEY='confluence'
- export CONFLUENCE_VERSION=`curl -s https://marketplace.atlassian.com/rest/2/products/key/confluence/versions/latest | jq -r .name` - py.test -v tests/
- docker build --build-arg CONFLUENCE_VERSION=${CONFLUENCE_VERSION} -t test-image . - py.test -v shared-components/tests/
- export IS_RELEASE=false
- /usr/src/app/post_build.sh test-image $IS_RELEASE - 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:
###################################################################### ######################################################################