-
Notifications
You must be signed in to change notification settings - Fork 12
/
.gitlab-ci.yml
116 lines (112 loc) · 5.82 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
image: node:18
# deploy_dev:
# stage: deploy
# before_script:
# - apt-get update
# - apt-get install -yq gconf-service libasound2 libatk1.0-0 libc6 libcairo2
# libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4
# libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0
# libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1
# libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1
# libxss1 libxtst6 ca-certificates fonts-liberation libnss3 lsb-release
# xdg-utils wget libnss3 libatk-bridge2.0-0 libcups2 libdrm2 libxkbcommon0
# libxdamage1 libxcomposite1 libxfixes3 libxrandr2 libgbm1
# - wget -O /etc/ca-certificates/mtls-ca-validators.crt https://certs.corp.redhat.com/certs/mtls-ca-validators.crt
# script:
# - |
# npm install -g @spaship/cli react-app-rewired
# npm ci
# NODE_EXTRA_CA_CERTS=/etc/ca-certificates/mtls-ca-validators.crt HYDRA_SYNC_ACTIVE=false JWT_FETCH_URL=$DEV_JWT_FETCH_URL CLIENT_ID=$DEV_CLIENT_ID CLIENT_SECRET=$DEV_CLIENT_SECRET INDEX_URL=$DEV_INDEX_URL SITEMAP_BASE_URL=https://developers.dev.redhat.com/api-catalog npm run sitemap
# REACT_APP_ENV=development npm run build
# npm run prerender
# spaship deploy --env=$SPASHIP_DEV_WEB_PROPERTY --apikey=$SPASHIP_DEV_API_KEY
# rules:
# - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
# when: always
# tags:
# - shared
# - docker
# deploy_stage:
# stage: deploy
# before_script:
# - apt-get update
# - apt-get install -yq gconf-service libasound2 libatk1.0-0 libc6 libcairo2
# libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4
# libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0
# libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1
# libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1
# libxss1 libxtst6 ca-certificates fonts-liberation libnss3 lsb-release
# xdg-utils wget libnss3 libatk-bridge2.0-0 libcups2 libdrm2 libxkbcommon0
# libxdamage1 libxcomposite1 libxfixes3 libxrandr2 libgbm1
# - wget -O /etc/ca-certificates/mtls-ca-validators.crt https://certs.corp.redhat.com/certs/mtls-ca-validators.crt
# script:
# - |
# npm install -g @spaship/cli react-app-rewired
# npm ci
# NODE_EXTRA_CA_CERTS=/etc/ca-certificates/mtls-ca-validators.crt HYDRA_SYNC_ACTIVE=true JWT_FETCH_URL=$STAGE_JWT_FETCH_URL CLIENT_ID=$STAGE_CLIENT_ID CLIENT_SECRET=$STAGE_CLIENT_SECRET INDEX_URL=$STAGE_INDEX_URL SITEMAP_BASE_URL=https://developers.stage.redhat.com/api-catalog npm run sitemap
# REACT_APP_ENV=staging npm run build
# npm run prerender
# spaship deploy --env=$SPASHIP_STAGE_WEB_PROPERTY --apikey=$SPASHIP_STAGE_API_KEY
# rules:
# - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
# when: always
# allow_failure: true
# tags:
# - shared
# - docker
# deploy_qa:
# stage: deploy
# before_script:
# - apt-get update
# - apt-get install -yq gconf-service libasound2 libatk1.0-0 libc6 libcairo2
# libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4
# libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0
# libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1
# libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1
# libxss1 libxtst6 ca-certificates fonts-liberation libnss3 lsb-release
# xdg-utils wget libnss3 libatk-bridge2.0-0 libcups2 libdrm2 libxkbcommon0
# libxdamage1 libxcomposite1 libxfixes3 libxrandr2 libgbm1
# - wget -O /etc/ca-certificates/mtls-ca-validators.crt https://certs.corp.redhat.com/certs/mtls-ca-validators.crt
# script:
# - |
# npm install -g @spaship/cli react-app-rewired
# npm ci
# NODE_EXTRA_CA_CERTS=/etc/ca-certificates/mtls-ca-validators.crt HYDRA_SYNC_ACTIVE=true JWT_FETCH_URL=$QA_JWT_FETCH_URL CLIENT_ID=$QA_CLIENT_ID CLIENT_SECRET=$QA_CLIENT_SECRET INDEX_URL=$QA_INDEX_URL SITEMAP_BASE_URL=https://developers.qa.redhat.com/api-catalog npm run sitemap
# REACT_APP_ENV=qa npm run build
# npm run prerender
# spaship deploy --env=$SPASHIP_QA_WEB_PROPERTY --apikey=$SPASHIP_QA_API_KEY
# rules:
# - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
# when: always
# allow_failure: true
# tags:
# - shared
# - docker
# deploy_prod:
# stage: deploy
# before_script:
# - apt-get update
# - apt-get install -yq gconf-service libasound2 libatk1.0-0 libc6 libcairo2
# libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4
# libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0
# libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1
# libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1
# libxss1 libxtst6 ca-certificates fonts-liberation libnss3 lsb-release
# xdg-utils wget libnss3 libatk-bridge2.0-0 libcups2 libdrm2 libxkbcommon0
# libxdamage1 libxcomposite1 libxfixes3 libxrandr2 libgbm1
# script:
# - |
# echo "Deploying $CI_COMMIT_TAG to Production"
# npm install -g @spaship/cli react-app-rewired
# npm ci
# HYDRA_SYNC_ACTIVE=true JWT_FETCH_URL=$PROD_JWT_FETCH_URL CLIENT_ID=$PROD_CLIENT_ID CLIENT_SECRET=$PROD_CLIENT_SECRET INDEX_URL=$PROD_INDEX_URL SITEMAP_BASE_URL=https://developers.redhat.com/api-catalog npm run sitemap
# REACT_APP_ENV=production REACT_APP_PENDO_ENABLED=true REACT_APP_PENDO_API_KEY=4c10d138-7686-497b-5938-3a40b35ac4aa npm run build
# npm run prerender
# spaship deploy --env=$SPASHIP_PROD_WEB_PROPERTY --apikey=$SPASHIP_PROD_API_KEY
# rules:
# - if: $CI_COMMIT_TAG =~ /^v\d+/
# when: always
# allow_failure: true
# tags:
# - shared
# - docker