forked from Bialogs/SaraAlert
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
46 lines (43 loc) · 1.44 KB
/
.gitlab-ci.yml
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
---
stages:
- create-image-1
- create-image-2
build-push-development-test-image:
stage: create-image-1
only:
refs:
- develop
tags:
- shell-exec-required
except:
- schedules
script:
- docker build -f DevelopmentTest.Dockerfile --tag $ARTIFACTORY_HOST/$ARTIFACTORY_NAMESPACE_1/$ARTIFACTORY_NAMESPACE_2:development-test --build-arg cert="$(cat $MITRE_CERT_PATH)" .
- docker push $ARTIFACTORY_HOST/$ARTIFACTORY_NAMESPACE_1/$ARTIFACTORY_NAMESPACE_2:development-test
allow_failure: true
build-push-staging-image:
stage: create-image-1
tags:
- shell-exec-required
only:
refs:
- develop
except:
- schedules
script:
- docker build -f Production.Dockerfile --tag $ARTIFACTORY_HOST/$ARTIFACTORY_NAMESPACE_1/$ARTIFACTORY_NAMESPACE_2:latest --build-arg cert="$(cat $MITRE_CERT_PATH)" .
- docker push $ARTIFACTORY_HOST/$ARTIFACTORY_NAMESPACE_1/$ARTIFACTORY_NAMESPACE_2:latest
allow_failure: false
build-push-staging-nginx-image:
stage: create-image-2
tags:
- shell-exec-required
only:
refs:
- develop
except:
- schedules
script:
- docker build -f Nginx.Dockerfile --tag $ARTIFACTORY_HOST/$ARTIFACTORY_NAMESPACE_1/$ARTIFACTORY_NAMESPACE_3:latest --build-arg sara_alert_image="$ARTIFACTORY_HOST/$ARTIFACTORY_NAMESPACE_1/$ARTIFACTORY_NAMESPACE_2:latest" .
- docker push $ARTIFACTORY_HOST/$ARTIFACTORY_NAMESPACE_1/$ARTIFACTORY_NAMESPACE_3:latest
allow_failure: false