-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.gitlab-ci.yml
83 lines (79 loc) · 2.58 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
stages:
- build_app
- build_oauth2_proxy
- build_reverse_proxy
before_script:
- export HTTP_PROXY=${HTTP_PROXY}
- export HTTPS_PROXY=${HTTP_PROXY}
- export NO_PROXY="${NO_PROXY}"
- echo "{\"auths\":{\"${NEXUS_URL}:5000\":{\"auth\":\"$(echo -n $NEXUS_USER:$NEXUS_PASSWORD | base64)\"}}}" > /kaniko/.docker/config.json
- export $(grep -v "^#" ./env/.env.build | xargs)
- >
if [[ ${CI_COMMIT_REF_NAME} = "preprod" ]]; then
export APP_CERTIFICATE_PASSWORD=${PREPROD__APP_CERTIFICATE_PASSWORD}
else
export APP_CERTIFICATE_PASSWORD=${DEV__APP_CERTIFICATE_PASSWORD}
fi
job:build:app:dev:
stage: build_app
image:
name: ${NEXUS_URL}:5001/kaniko-executor:v1.9.0-debug
entrypoint: [""]
script:
- /kaniko/executor
--insecure-registry "${NEXUS_URL}:5000"
--skip-tls-verify
--context "dir://app"
--dockerfile "Dockerfile"
--build-arg HTTP_PROXY=${HTTP_PROXY}
--build-arg VITE_API_BASE_URL=${VITE_API_BASE_URL}
--build-arg VITE_LOGOUT_URL=${VITE_LOGOUT_URL}
--build-arg VITE_MATOMO_SITE_ID=${VITE_MATOMO_SITE_ID}
--build-arg VITE_MATOMO_URL=${VITE_MATOMO_URL}
--build-arg VITE_APP_URL=${APP_URL}
--destination "${NEXUS_URL}:5000/${NEXUS_REPOSITORY}/front/app:${APP_IMAGE_TAG}"
when: manual
only:
- dev@champollion/front-it
- preprod@champollion/front-it
tags:
- CHAM
job:build:oauth2-proxy:dev:
stage: build_oauth2_proxy
image:
name: ${NEXUS_URL}:5001/kaniko-executor:v1.9.0-debug
entrypoint: [""]
script:
- /kaniko/executor
--insecure-registry "${NEXUS_URL}:5000"
--skip-tls-verify
--context "dir://oauth2-proxy"
--dockerfile "Dockerfile"
--destination "${NEXUS_URL}:5000/${NEXUS_REPOSITORY}/front/oauth2-proxy:${OAUTH2_PROXY_IMAGE_TAG}"
when: manual
only:
- dev@champollion/front-it
- preprod@champollion/front-it
tags:
- CHAM
job:build:reverse-proxy:dev:
stage: build_reverse_proxy
image:
name: ${NEXUS_URL}:5001/kaniko-executor:v1.9.0-debug
entrypoint: [""]
script:
- /kaniko/executor
--insecure-registry "${NEXUS_URL}:5000"
--skip-tls-verify
--context "dir://reverse-proxy"
--dockerfile "Dockerfile"
--build-arg HTTP_PROXY=${HTTP_PROXY}
--build-arg APP_CERTIFICATE_FILE=${APP_CERTIFICATE_FILE}
--build-arg APP_CERTIFICATE_PASSWORD=${APP_CERTIFICATE_PASSWORD}
--destination "${NEXUS_URL}:5000/${NEXUS_REPOSITORY}/front/reverse-proxy:${REVERSE_PROXY_IMAGE_TAG}"
when: manual
only:
- dev@champollion/front-it
- preprod@champollion/front-it
tags:
- CHAM