-
Notifications
You must be signed in to change notification settings - Fork 1
/
acceptance-tests.gocd.yaml
67 lines (67 loc) · 1.88 KB
/
acceptance-tests.gocd.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
format_version: 3
pipelines:
acceptance-tests:
group: demo
label_template: ${COUNT}
lock_behavior: unlockWhenFinished
materials:
git:
git: https://github.com/gocd-demo/k8s-webinar.git
shallow_clone: true
auto_update: true
branch: master
upstream:
pipeline: ci-build-and-test
stage: defaultStage
name: upstream
stages:
- defaultStage:
fetch_materials: true
keep_artifacts: false
clean_workspace: false
approval:
type: success
jobs:
defaultJob:
timeout: 0
elastic_profile_id: demo-app
tasks:
- fetch:
artifact_id: frontend
pipeline: ci-build-and-test
stage: defaultStage
job: defaultJob
artifact_origin: external
run_if: passed
- exec:
arguments:
- network
- create
- mynet
command: docker
run_if: passed
- exec:
arguments:
- -c
- docker run -itd --name guestbook-demo --net mynet $ARTIFACT_IMAGE
command: /bin/bash
run_if: passed
- exec:
arguments:
- -c
- docker run --net mynet gocddemo/demo_acceptance_tests:v1
command: /bin/bash
run_if: passed
- exec:
arguments:
- -c
- docker stop $(docker ps -aq); docker rm $(docker ps -aq);
command: /bin/bash
run_if: passed
- exec:
arguments:
- network
- rm
- mynet
command: docker
run_if: passed