DCD-686: Update pipelines config.

This commit is contained in:
Steve Smith
2019-10-04 11:39:43 +10:00
parent 6a940a7183
commit 5e85f71ae8
5 changed files with 43 additions and 63 deletions

View File

@@ -12,3 +12,12 @@ fi
ansible \ ansible \
python-boto3 \ python-boto3 \
python-botocore python-botocore
if [[ $1 == "--dev" ]]; then
./bin/pacapt install --noconfirm \
python-dev python-pip \
python3-dev python3-pip
pip install pipenv
pipenv sync --dev
fi

View File

@@ -1,6 +1,6 @@
--- ---
image: atlassian/default-image:2 image: ubuntu:disco
options: options:
size: 2x size: 2x
@@ -32,8 +32,7 @@ pipelines:
services: services:
- docker - docker
script: script:
- apt-get update && apt-get install -y virtualenv python-dev - ./bin/install-ansible --dev
- ./bin/install-ansible
- ./bin/run-tests-in-batches --batch 1 - ./bin/run-tests-in-batches --batch 1
- step: - step:
@@ -41,8 +40,7 @@ pipelines:
services: services:
- docker - docker
script: script:
- apt-get update && apt-get install -y virtualenv python-dev - ./bin/install-ansible --dev
- ./bin/install-ansible
- ./bin/run-tests-in-batches --batch 2 - ./bin/run-tests-in-batches --batch 2
- step: - step:
@@ -50,8 +48,7 @@ pipelines:
services: services:
- docker - docker
script: script:
- apt-get update && apt-get install -y virtualenv python-dev - ./bin/install-ansible --dev
- ./bin/install-ansible
- ./bin/run-tests-in-batches --batch 3 - ./bin/run-tests-in-batches --batch 3
- step: - step:
@@ -59,8 +56,7 @@ pipelines:
services: services:
- docker - docker
script: script:
- apt-get update && apt-get install -y virtualenv python-dev - ./bin/install-ansible --dev
- ./bin/install-ansible
- ./bin/run-tests-in-batches --batch 4 - ./bin/run-tests-in-batches --batch 4
- step: - step:
@@ -68,8 +64,7 @@ pipelines:
services: services:
- docker - docker
script: script:
- apt-get update && apt-get install -y virtualenv python-dev - ./bin/install-ansible --dev
- ./bin/install-ansible
- ./bin/run-tests-in-batches --batch 5 - ./bin/run-tests-in-batches --batch 5
- step: - step:
@@ -77,8 +72,7 @@ pipelines:
services: services:
- docker - docker
script: script:
- apt-get update && apt-get install -y virtualenv python-dev - ./bin/install-ansible --dev
- ./bin/install-ansible
- ./bin/run-tests-in-batches --batch 6 - ./bin/run-tests-in-batches --batch 6
- step: - step:
@@ -86,8 +80,7 @@ pipelines:
services: services:
- docker - docker
script: script:
- apt-get update && apt-get install -y virtualenv python-dev - ./bin/install-ansible --dev
- ./bin/install-ansible
- ./bin/run-tests-in-batches --batch 7 - ./bin/run-tests-in-batches --batch 7
- step: - step:
@@ -95,8 +88,7 @@ pipelines:
services: services:
- docker - docker
script: script:
- apt-get update && apt-get install -y virtualenv python-dev - ./bin/install-ansible --dev
- ./bin/install-ansible
- ./bin/run-tests-in-batches --batch 8 - ./bin/run-tests-in-batches --batch 8
- step: - step:
@@ -104,8 +96,7 @@ pipelines:
services: services:
- docker - docker
script: script:
- apt-get update && apt-get install -y virtualenv python-dev - ./bin/install-ansible --dev
- ./bin/install-ansible
- ./bin/run-tests-in-batches --batch 9 - ./bin/run-tests-in-batches --batch 9
- step: - step:
@@ -113,8 +104,7 @@ pipelines:
services: services:
- docker - docker
script: script:
- apt-get update && apt-get install -y virtualenv python-dev - ./bin/install-ansible --dev
- ./bin/install-ansible
- ./bin/run-tests-in-batches --batch 10 - ./bin/run-tests-in-batches --batch 10
- step: - step:
@@ -122,8 +112,7 @@ pipelines:
services: services:
- docker - docker
script: script:
- apt-get update && apt-get install -y virtualenv python-dev - ./bin/install-ansible --dev
- ./bin/install-ansible
- ./bin/run-tests-in-batches --batch 11 - ./bin/run-tests-in-batches --batch 11
- step: - step:
@@ -131,8 +120,7 @@ pipelines:
services: services:
- docker - docker
script: script:
- apt-get update && apt-get install -y virtualenv python-dev - ./bin/install-ansible --dev
- ./bin/install-ansible
- ./bin/run-tests-in-batches --batch 12 - ./bin/run-tests-in-batches --batch 12
- step: - step:
@@ -140,8 +128,7 @@ pipelines:
services: services:
- docker - docker
script: script:
- apt-get update && apt-get install -y virtualenv python-dev - ./bin/install-ansible --dev
- ./bin/install-ansible
- ./bin/run-tests-in-batches --batch 13 - ./bin/run-tests-in-batches --batch 13
- step: - step:
@@ -149,8 +136,7 @@ pipelines:
services: services:
- docker - docker
script: script:
- apt-get update && apt-get install -y virtualenv python-dev - ./bin/install-ansible --dev
- ./bin/install-ansible
- ./bin/run-tests-in-batches --batch 14 - ./bin/run-tests-in-batches --batch 14
- step: - step:
@@ -158,8 +144,7 @@ pipelines:
services: services:
- docker - docker
script: script:
- apt-get update && apt-get install -y virtualenv python-dev - ./bin/install-ansible --dev
- ./bin/install-ansible
- ./bin/run-tests-in-batches --batch 15 - ./bin/run-tests-in-batches --batch 15
- step: - step:
@@ -167,8 +152,7 @@ pipelines:
services: services:
- docker - docker
script: script:
- apt-get update && apt-get install -y virtualenv python-dev - ./bin/install-ansible --dev
- ./bin/install-ansible
- ./bin/run-tests-in-batches --batch 16 - ./bin/run-tests-in-batches --batch 16
- step: - step:
@@ -176,8 +160,7 @@ pipelines:
services: services:
- docker - docker
script: script:
- apt-get update && apt-get install -y virtualenv python-dev - ./bin/install-ansible --dev
- ./bin/install-ansible
- ./bin/run-tests-in-batches --batch 17 - ./bin/run-tests-in-batches --batch 17
- step: - step:
@@ -185,8 +168,7 @@ pipelines:
services: services:
- docker - docker
script: script:
- apt-get update && apt-get install -y virtualenv python-dev - ./bin/install-ansible --dev
- ./bin/install-ansible
- ./bin/run-tests-in-batches --batch 18 - ./bin/run-tests-in-batches --batch 18
- step: - step:
@@ -194,8 +176,7 @@ pipelines:
services: services:
- docker - docker
script: script:
- apt-get update && apt-get install -y virtualenv python-dev - ./bin/install-ansible --dev
- ./bin/install-ansible
- ./bin/run-tests-in-batches --batch 19 - ./bin/run-tests-in-batches --batch 19
- step: - step:
@@ -203,8 +184,7 @@ pipelines:
services: services:
- docker - docker
script: script:
- apt-get update && apt-get install -y virtualenv python-dev - ./bin/install-ansible --dev
- ./bin/install-ansible
- ./bin/run-tests-in-batches --batch 20 - ./bin/run-tests-in-batches --batch 20
- step: - step:
@@ -212,8 +192,7 @@ pipelines:
services: services:
- docker - docker
script: script:
- apt-get update && apt-get install -y virtualenv python-dev - ./bin/install-ansible --dev
- ./bin/install-ansible
- ./bin/run-tests-in-batches --batch 21 - ./bin/run-tests-in-batches --batch 21
- step: - step:
@@ -221,8 +200,7 @@ pipelines:
services: services:
- docker - docker
script: script:
- apt-get update && apt-get install -y virtualenv python-dev - ./bin/install-ansible --dev
- ./bin/install-ansible
- ./bin/run-tests-in-batches --batch 22 - ./bin/run-tests-in-batches --batch 22
- step: - step:
@@ -230,8 +208,7 @@ pipelines:
services: services:
- docker - docker
script: script:
- apt-get update && apt-get install -y virtualenv python-dev - ./bin/install-ansible --dev
- ./bin/install-ansible
- ./bin/run-tests-in-batches --batch 23 - ./bin/run-tests-in-batches --batch 23
- step: - step:
@@ -239,8 +216,7 @@ pipelines:
services: services:
- docker - docker
script: script:
- apt-get update && apt-get install -y virtualenv python-dev - ./bin/install-ansible --dev
- ./bin/install-ansible
- ./bin/run-tests-in-batches --batch 24 - ./bin/run-tests-in-batches --batch 24
- step: - step:
@@ -248,8 +224,7 @@ pipelines:
services: services:
- docker - docker
script: script:
- apt-get update && apt-get install -y virtualenv python-dev - ./bin/install-ansible --dev
- ./bin/install-ansible
- ./bin/run-tests-in-batches --batch 25 - ./bin/run-tests-in-batches --batch 25
- step: - step:
@@ -257,8 +232,7 @@ pipelines:
services: services:
- docker - docker
script: script:
- apt-get update && apt-get install -y virtualenv python-dev - ./bin/install-ansible --dev
- ./bin/install-ansible
- ./bin/run-tests-in-batches --batch 26 - ./bin/run-tests-in-batches --batch 26
- step: - step:
@@ -266,8 +240,7 @@ pipelines:
services: services:
- docker - docker
script: script:
- apt-get update && apt-get install -y virtualenv python-dev - ./bin/install-ansible --dev
- ./bin/install-ansible
- ./bin/run-tests-in-batches --batch 27 - ./bin/run-tests-in-batches --batch 27
- step: - step:
@@ -275,8 +248,7 @@ pipelines:
services: services:
- docker - docker
script: script:
- apt-get update && apt-get install -y virtualenv python-dev - ./bin/install-ansible --dev
- ./bin/install-ansible
- ./bin/run-tests-in-batches --batch 28 - ./bin/run-tests-in-batches --batch 28

View File

@@ -1,2 +1,2 @@
generate-pipeline: generate-pipeline:
@python pipeline.py @python3 pipeline.py

View File

@@ -46,14 +46,13 @@ class Step:
class ScriptCommand: class ScriptCommand:
INSTALL_PACKAGES_COMMAND = "apt-get update && apt-get install -y virtualenv python-dev" PACKAGE_INSTALL_COMMAND = "./bin/install-ansible --dev"
INSTALL_ANSIBLE_COMMAND = "./bin/install-ansible"
def __init__(self, test_command): def __init__(self, test_command):
self.test_command = test_command self.test_command = test_command
def all_commands(self): def all_commands(self):
return [self.INSTALL_PACKAGES_COMMAND, self.INSTALL_ANSIBLE_COMMAND, self.test_command] return [self.PACKAGE_INSTALL_COMMAND, self.test_command]
def main(): def main():

View File

@@ -1,6 +1,6 @@
--- ---
image: atlassian/default-image:2 image: ubuntu:disco
options: options:
size: 2x size: 2x
@@ -36,4 +36,4 @@ pipelines:
{% for scriptCommand in parallel_step.scriptCommands -%} {% for scriptCommand in parallel_step.scriptCommands -%}
- {{ scriptCommand }} - {{ scriptCommand }}
{% endfor %} {% endfor %}
{% endfor %} {% endfor %}