@catladder/pipeline 1.170.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bash/BashExpression.d.ts +2 -6
- package/dist/bash/BashExpression.js +5 -15
- package/dist/bash/bashEscape.d.ts +34 -0
- package/dist/bash/bashEscape.js +114 -0
- package/dist/bash/bashYaml.js +25 -2
- package/dist/bash/getInjectVarsScript.js +4 -2
- package/dist/bash/index.d.ts +2 -0
- package/dist/bash/index.js +26 -0
- package/dist/build/base/createAppBuildJob.js +3 -3
- package/dist/build/base/writeDotEnv.js +6 -4
- package/dist/build/custom/testJob.js +12 -12
- package/dist/build/docker.d.ts +3 -3
- package/dist/build/node/buildJob.js +1 -1
- package/dist/build/node/cache.d.ts +2 -4
- package/dist/build/node/cache.js +3 -24
- package/dist/build/node/testJob.js +11 -11
- package/dist/build/rails/build.js +1 -1
- package/dist/build/rails/test.js +8 -8
- package/dist/build/types.d.ts +0 -10
- package/dist/constants.js +1 -1
- package/dist/context/createComponentContext.js +0 -1
- package/dist/context/getEnvConfig.js +2 -1
- package/dist/context/getEnvironment.js +1 -2
- package/dist/context/getEnvironmentVariables.d.ts +5 -6
- package/dist/context/getEnvironmentVariables.js +50 -38
- package/dist/deploy/base/deploy.js +3 -3
- package/dist/deploy/cloudRun/createJobs/getCloudRunDeployScripts.js +2 -2
- package/dist/deploy/cloudRun/index.js +2 -2
- package/dist/deploy/cloudRun/utils/getServiceName.d.ts +1 -1
- package/dist/deploy/kubernetes/cloudSql/index.d.ts +2 -2
- package/dist/deploy/kubernetes/cloudSql/index.js +3 -14
- package/dist/deploy/kubernetes/deployJob.js +1 -3
- package/dist/deploy/kubernetes/index.js +2 -2
- package/dist/deploy/kubernetes/kubeEnv.d.ts +3 -3
- package/dist/deploy/kubernetes/kubeValues.d.ts +3 -4
- package/dist/deploy/kubernetes/kubeValues.js +2 -3
- package/dist/deploy/types/base.d.ts +0 -6
- package/dist/deploy/types/kubernetes.d.ts +1 -34
- package/dist/globalScriptFunctions/index.d.ts +14 -0
- package/dist/globalScriptFunctions/index.js +37 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3 -1
- package/dist/pipeline/gitlab/createGitlabJobs.js +3 -5
- package/dist/pipeline/gitlab/createGitlabPipeline.d.ts +1 -0
- package/dist/pipeline/gitlab/createGitlabPipeline.js +38 -2
- package/dist/pipeline/packageManager.js +1 -1
- package/dist/runner/index.d.ts +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/config.d.ts +6 -9
- package/dist/types/context.d.ts +2 -9
- package/dist/types/gitlab-types.d.ts +1 -0
- package/dist/types/jobs.d.ts +0 -8
- package/dist/utils/gitlab.js +4 -1
- package/dist/utils/writeFiles.js +1 -7
- package/dist/variables/VariableValue.d.ts +3 -0
- package/dist/variables/VariableValue.js +5 -0
- package/dist/variables/VariableValueContainingReferences.d.ts +24 -0
- package/dist/variables/VariableValueContainingReferences.js +97 -0
- package/dist/variables/__tests__/resolveAllReferences.test.js +219 -0
- package/dist/variables/__tests__/resolveAllReferencesOnce.test.d.ts +1 -0
- package/dist/variables/__tests__/resolveAllReferencesOnce.test.js +171 -0
- package/dist/variables/__tests__/resolveReferencesOnce.test.d.ts +1 -0
- package/dist/variables/__tests__/resolveReferencesOnce.test.js +202 -0
- package/dist/variables/__tests__/variableValue.test.d.ts +1 -0
- package/dist/variables/__tests__/variableValue.test.js +36 -0
- package/dist/variables/resolveAllReferences.d.ts +3 -0
- package/dist/{bash/replaceAsync.js → variables/resolveAllReferences.js} +60 -41
- package/dist/variables/resolveAllReferencesOnce.d.ts +5 -0
- package/dist/variables/resolveAllReferencesOnce.js +191 -0
- package/dist/variables/resolveReferencesOnce.d.ts +8 -0
- package/dist/variables/resolveReferencesOnce.js +22 -0
- package/examples/__snapshots__/cloud-run-http2.test.ts.snap +312 -238
- package/examples/__snapshots__/cloud-run-memory-limit.test.ts.snap +312 -238
- package/examples/__snapshots__/cloud-run-meteor-with-worker.test.ts.snap +312 -222
- package/examples/__snapshots__/cloud-run-nextjs.test.ts.snap +1436 -0
- package/examples/__snapshots__/cloud-run-no-cpu-throttling.test.ts.snap +312 -238
- package/examples/__snapshots__/cloud-run-no-service.test.ts.snap +316 -238
- package/examples/__snapshots__/cloud-run-non-public.test.ts.snap +312 -238
- package/examples/__snapshots__/cloud-run-post-stop-job.test.ts.snap +313 -238
- package/examples/__snapshots__/cloud-run-service-custom-vpc-connector.test.ts.snap +312 -238
- package/examples/__snapshots__/cloud-run-service-custom-vpc.test.ts.snap +312 -238
- package/examples/__snapshots__/cloud-run-service-gen2.test.ts.snap +312 -238
- package/examples/__snapshots__/cloud-run-service-increase-timout.test.ts.snap +312 -238
- package/examples/__snapshots__/cloud-run-service-with-volumes.test.ts.snap +316 -238
- package/examples/__snapshots__/cloud-run-storybook.test.ts.snap +294 -220
- package/examples/__snapshots__/cloud-run-with-ngnix.test.ts.snap +312 -238
- package/examples/__snapshots__/cloud-run-with-sql-reuse-db.test.ts.snap +652 -486
- package/examples/__snapshots__/cloud-run-with-sql.test.ts.snap +282 -288
- package/examples/__snapshots__/cloud-run-with-worker.test.ts.snap +312 -238
- package/examples/__snapshots__/custom-build-job-with-tests.test.ts.snap +284 -194
- package/examples/__snapshots__/custom-build-job.test.ts.snap +278 -188
- package/examples/__snapshots__/custom-deploy.test.ts.snap +220 -154
- package/examples/__snapshots__/custom-envs.test.ts.snap +216 -126
- package/examples/__snapshots__/custom-sbom-java.test.ts.snap +278 -188
- package/examples/__snapshots__/git-submodule.test.ts.snap +312 -238
- package/examples/__snapshots__/kubernetes-application-customization.test.ts.snap +231 -253
- package/examples/__snapshots__/kubernetes-with-cloud-sql.test.ts.snap +240 -262
- package/examples/__snapshots__/kubernetes-with-jobs.test.ts.snap +504 -506
- package/examples/__snapshots__/kubernetes-with-mongodb.test.ts.snap +239 -261
- package/examples/__snapshots__/local-dot-env.test.ts.snap +236 -238
- package/examples/__snapshots__/meteor-kubernetes.test.ts.snap +236 -242
- package/examples/__snapshots__/multiline-var.test.ts.snap +1355 -973
- package/examples/__snapshots__/native-app.test.ts.snap +438 -392
- package/examples/__snapshots__/node-build-with-custom-image.test.ts.snap +312 -238
- package/examples/__snapshots__/node-build-with-docker-additions.test.ts.snap +312 -238
- package/examples/__snapshots__/rails-k8s-with-worker-dockerfile.test.ts.snap +186 -188
- package/examples/__snapshots__/rails-k8s-with-worker.test.ts.snap +162 -164
- package/examples/__snapshots__/referencing-other-vars.test.ts.snap +4741 -0
- package/examples/__snapshots__/wait-for-other-deploy.test.ts.snap +330 -228
- package/examples/__snapshots__/{workspace-api-www-custom-cache.test.ts.snap → workspace-api-www-turbo-cache.test.ts.snap} +457 -499
- package/examples/__snapshots__/workspace-api-www.test.ts.snap +452 -482
- package/examples/{workspace-api-www-custom-cache.test.ts → cloud-run-nextjs.test.ts} +2 -2
- package/examples/cloud-run-nextjs.ts +28 -0
- package/examples/cloud-run-with-sql.ts +0 -1
- package/examples/kubernetes-application-customization.ts +1 -0
- package/examples/kubernetes-with-cloud-sql.ts +1 -0
- package/examples/kubernetes-with-jobs.ts +1 -0
- package/examples/kubernetes-with-mongodb.ts +1 -0
- package/examples/meteor-kubernetes.ts +1 -1
- package/examples/native-app.ts +10 -7
- package/examples/rails-k8s-with-worker.ts +7 -1
- package/examples/{kubernetes-with-cloud-sql-legacy.test.ts → referencing-other-vars.test.ts} +2 -2
- package/examples/referencing-other-vars.ts +83 -0
- package/examples/workspace-api-www-turbo-cache.test.ts +11 -0
- package/examples/{workspace-api-www-custom-cache.ts → workspace-api-www-turbo-cache.ts} +4 -3
- package/examples/workspace-api-www.ts +3 -2
- package/package.json +2 -6
- package/src/bash/BashExpression.ts +10 -13
- package/src/bash/bashEscape.ts +158 -0
- package/src/bash/bashYaml.ts +36 -2
- package/src/bash/getInjectVarsScript.ts +11 -2
- package/src/bash/index.ts +2 -0
- package/src/build/base/createAppBuildJob.ts +0 -1
- package/src/build/base/writeDotEnv.ts +6 -6
- package/src/build/custom/testJob.ts +0 -1
- package/src/build/node/buildJob.ts +2 -2
- package/src/build/node/cache.ts +0 -29
- package/src/build/node/testJob.ts +0 -1
- package/src/build/rails/build.ts +0 -1
- package/src/build/rails/test.ts +0 -1
- package/src/build/types.ts +0 -13
- package/src/context/createComponentContext.ts +0 -1
- package/src/context/getEnvConfig.ts +2 -2
- package/src/context/getEnvironment.ts +1 -1
- package/src/context/getEnvironmentContext.ts +1 -1
- package/src/context/getEnvironmentVariables.ts +44 -51
- package/src/deploy/base/deploy.ts +1 -1
- package/src/deploy/cloudRun/createJobs/getCloudRunDeployScripts.ts +4 -12
- package/src/deploy/cloudRun/index.ts +2 -2
- package/src/deploy/kubernetes/cloudSql/index.ts +3 -16
- package/src/deploy/kubernetes/deployJob.ts +0 -2
- package/src/deploy/kubernetes/index.ts +2 -2
- package/src/deploy/kubernetes/kubeEnv.ts +3 -3
- package/src/deploy/kubernetes/kubeValues.ts +5 -8
- package/src/deploy/types/base.ts +0 -6
- package/src/deploy/types/kubernetes.ts +1 -36
- package/src/globalScriptFunctions/index.ts +30 -0
- package/src/index.ts +2 -0
- package/src/pipeline/gitlab/createGitlabJobs.ts +1 -4
- package/src/pipeline/gitlab/createGitlabPipeline.ts +8 -1
- package/src/pipeline/packageManager.ts +7 -5
- package/src/runner/index.ts +0 -1
- package/src/types/config.ts +6 -9
- package/src/types/context.ts +3 -9
- package/src/types/gitlab-types.ts +1 -0
- package/src/types/jobs.ts +0 -8
- package/src/utils/gitlab.ts +19 -2
- package/src/utils/writeFiles.ts +1 -2
- package/src/variables/VariableValue.ts +6 -0
- package/src/variables/VariableValueContainingReferences.ts +89 -0
- package/src/variables/__tests__/resolveAllReferences.test.ts +110 -0
- package/src/variables/__tests__/resolveAllReferencesOnce.test.ts +64 -0
- package/src/variables/__tests__/resolveReferencesOnce.test.ts +117 -0
- package/src/variables/__tests__/variableValue.test.ts +73 -0
- package/src/variables/resolveAllReferences.ts +46 -0
- package/src/variables/resolveAllReferencesOnce.ts +44 -0
- package/src/variables/resolveReferencesOnce.ts +29 -0
- package/bin/catladder-gitlab-dev.js +0 -3
- package/bin/catladder-gitlab.js +0 -3
- package/dist/bash/replaceAsync.d.ts +0 -2
- package/dist/bundles/catladder-gitlab/index.js +0 -15
- package/dist/context/__tests__/resolveReferences.test.js +0 -368
- package/dist/context/resolveReferences.d.ts +0 -6
- package/dist/context/resolveReferences.js +0 -286
- package/dist/deploy/kubernetes/processSecretsAsFiles.d.ts +0 -85
- package/dist/deploy/kubernetes/processSecretsAsFiles.js +0 -33
- package/examples/__snapshots__/kubernetes-with-cloud-sql-legacy.test.ts.snap +0 -1795
- package/examples/kubernetes-with-cloud-sql-legacy.ts +0 -35
- package/scripts/bundle +0 -2
- package/src/bash/replaceAsync.ts +0 -54
- package/src/context/__tests__/resolveReferences.test.ts +0 -148
- package/src/context/resolveReferences.ts +0 -93
- package/src/deploy/kubernetes/processSecretsAsFiles.ts +0 -35
- /package/dist/{context/__tests__/resolveReferences.test.d.ts → variables/__tests__/resolveAllReferences.test.d.ts} +0 -0
|
@@ -45,6 +45,36 @@ variables:
|
|
|
45
45
|
CACHE_COMPRESSION_LEVEL: fast
|
|
46
46
|
TRANSFER_METER_FREQUENCY: 5s
|
|
47
47
|
GIT_DEPTH: '1'
|
|
48
|
+
before_script:
|
|
49
|
+
- |-
|
|
50
|
+
function escapeForDotEnv () {
|
|
51
|
+
input="\${1:-$(cat)}"
|
|
52
|
+
input="\${input//$'\\n'/\\\\n}"
|
|
53
|
+
if [[ "$input" == *\\\\n* ]]; then
|
|
54
|
+
if [[ "$input" == *\\"* && "$input" == *\\'* && "$input" == *\\\`* ]]; then
|
|
55
|
+
printf "\\"%s\\"\\n" "$input"
|
|
56
|
+
elif [[ "$input" == *\\"* && "$input" == *\\'* ]]; then
|
|
57
|
+
printf "\`%s\`\\n" "$input"
|
|
58
|
+
elif [[ "$input" == *\\"* ]]; then
|
|
59
|
+
printf "'%s'\\n" "$input"
|
|
60
|
+
else
|
|
61
|
+
printf "\\"%s\\"\\n" "$input"
|
|
62
|
+
fi
|
|
63
|
+
else
|
|
64
|
+
printf "%s\\n" "$input"
|
|
65
|
+
fi
|
|
66
|
+
}
|
|
67
|
+
- |-
|
|
68
|
+
function collapseable_section_start () {
|
|
69
|
+
local section_title="\${1}"
|
|
70
|
+
local section_description="\${2:-$section_title}"
|
|
71
|
+
echo -e "section_start:\`date +%s\`:\${section_title}[collapsed=true]\\r\\e[0K\${section_description}"
|
|
72
|
+
}
|
|
73
|
+
- |-
|
|
74
|
+
function collapseable_section_end () {
|
|
75
|
+
local section_title="\${1}"
|
|
76
|
+
echo -e "section_end:\`date +%s\`:\${section_title}\\r\\e[0K"
|
|
77
|
+
}
|
|
48
78
|
api 🛡 audit:
|
|
49
79
|
stage: test
|
|
50
80
|
image: path/to/docker/jobs-default:the-version
|
|
@@ -53,9 +83,9 @@ api 🛡 audit:
|
|
|
53
83
|
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
54
84
|
KUBERNETES_MEMORY_LIMIT: 4Gi
|
|
55
85
|
script:
|
|
56
|
-
-
|
|
86
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
57
87
|
- export APP_PATH="api"
|
|
58
|
-
-
|
|
88
|
+
- collapseable_section_end "injectvars"
|
|
59
89
|
- cd api
|
|
60
90
|
- yarn npm audit --environment production
|
|
61
91
|
rules:
|
|
@@ -79,21 +109,21 @@ api 👮 lint:
|
|
|
79
109
|
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
80
110
|
KUBERNETES_MEMORY_LIMIT: 4Gi
|
|
81
111
|
script:
|
|
82
|
-
-
|
|
112
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
83
113
|
- export APP_PATH="api"
|
|
84
|
-
-
|
|
85
|
-
-
|
|
114
|
+
- collapseable_section_end "injectvars"
|
|
115
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
86
116
|
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
87
117
|
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
88
|
-
-
|
|
118
|
+
- collapseable_section_end "nodeinstall"
|
|
89
119
|
- cd api
|
|
90
|
-
-
|
|
120
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
91
121
|
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
92
122
|
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
93
|
-
-
|
|
94
|
-
-
|
|
123
|
+
- collapseable_section_end "nodeinstall"
|
|
124
|
+
- collapseable_section_start "yarninstall" "Yarn install"
|
|
95
125
|
- yarn install --immutable
|
|
96
|
-
-
|
|
126
|
+
- collapseable_section_end "yarninstall"
|
|
97
127
|
- yarn lint
|
|
98
128
|
cache:
|
|
99
129
|
- key: api-yarn
|
|
@@ -120,21 +150,21 @@ api 🧪 test:
|
|
|
120
150
|
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
121
151
|
KUBERNETES_MEMORY_LIMIT: 4Gi
|
|
122
152
|
script:
|
|
123
|
-
-
|
|
153
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
124
154
|
- export APP_PATH="api"
|
|
125
|
-
-
|
|
126
|
-
-
|
|
155
|
+
- collapseable_section_end "injectvars"
|
|
156
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
127
157
|
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
128
158
|
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
129
|
-
-
|
|
159
|
+
- collapseable_section_end "nodeinstall"
|
|
130
160
|
- cd api
|
|
131
|
-
-
|
|
161
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
132
162
|
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
133
163
|
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
134
|
-
-
|
|
135
|
-
-
|
|
164
|
+
- collapseable_section_end "nodeinstall"
|
|
165
|
+
- collapseable_section_start "yarninstall" "Yarn install"
|
|
136
166
|
- yarn install --immutable
|
|
137
|
-
-
|
|
167
|
+
- collapseable_section_end "yarninstall"
|
|
138
168
|
- yarn test
|
|
139
169
|
cache:
|
|
140
170
|
- key: api-yarn
|
|
@@ -161,33 +191,45 @@ api 🧪 test:
|
|
|
161
191
|
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
162
192
|
KUBERNETES_MEMORY_LIMIT: 4Gi
|
|
163
193
|
script:
|
|
164
|
-
-
|
|
194
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
165
195
|
- export ENV_SHORT="dev"
|
|
166
196
|
- export APP_DIR="api"
|
|
167
197
|
- export ENV_TYPE="dev"
|
|
168
198
|
- export BUILD_INFO_BUILD_ID="$(git describe --tags 2>/dev/null || git rev-parse HEAD)"
|
|
169
199
|
- export BUILD_INFO_BUILD_TIME="$CI_JOB_STARTED_AT"
|
|
170
200
|
- export BUILD_INFO_CURRENT_VERSION="$(tag=$(git ls-remote origin "refs/tags/v*[0-9]" 2>/dev/null | cut -f 2- | sort -V | tail -1 | sed 's/refs\\/tags\\/v//'); [ -z "$tag" ] && echo "0.0.0" || echo "$tag")"
|
|
171
|
-
- export
|
|
201
|
+
- export HOSTNAME="unknown-host.example.com"
|
|
172
202
|
- export ROOT_URL="https://unknown-host.example.com"
|
|
173
|
-
- export
|
|
174
|
-
- export HOST_CANONICAL="unknown-host.example.com"
|
|
203
|
+
- export HOSTNAME_INTERNAL="unknown-host.example.com"
|
|
175
204
|
- export ROOT_URL_INTERNAL="https://unknown-host.example.com"
|
|
176
|
-
- export _ALL_ENV_VAR_KEYS="[\\"ENV_SHORT\\",\\"APP_DIR\\",\\"ENV_TYPE\\",\\"BUILD_INFO_BUILD_ID\\",\\"BUILD_INFO_BUILD_TIME\\",\\"BUILD_INFO_CURRENT_VERSION\\",\\"
|
|
177
|
-
-
|
|
205
|
+
- export _ALL_ENV_VAR_KEYS="[\\"ENV_SHORT\\",\\"APP_DIR\\",\\"ENV_TYPE\\",\\"BUILD_INFO_BUILD_ID\\",\\"BUILD_INFO_BUILD_TIME\\",\\"BUILD_INFO_CURRENT_VERSION\\",\\"HOSTNAME\\",\\"ROOT_URL\\",\\"HOSTNAME_INTERNAL\\",\\"ROOT_URL_INTERNAL\\"]"
|
|
206
|
+
- collapseable_section_end "injectvars"
|
|
207
|
+
- collapseable_section_start "write-dotenv-api" "write dot env for api"
|
|
208
|
+
- |-
|
|
209
|
+
cat <<EOF > api/.env
|
|
210
|
+
ENV_SHORT=dev
|
|
211
|
+
APP_DIR=api
|
|
212
|
+
ENV_TYPE=dev
|
|
213
|
+
HOSTNAME=unknown-host.example.com
|
|
214
|
+
ROOT_URL=https://unknown-host.example.com
|
|
215
|
+
HOSTNAME_INTERNAL=unknown-host.example.com
|
|
216
|
+
ROOT_URL_INTERNAL=https://unknown-host.example.com
|
|
217
|
+
_ALL_ENV_VAR_KEYS=["ENV_SHORT","APP_DIR","ENV_TYPE","BUILD_INFO_BUILD_ID","BUILD_INFO_BUILD_TIME","BUILD_INFO_CURRENT_VERSION","HOSTNAME","ROOT_URL","HOSTNAME_INTERNAL","ROOT_URL_INTERNAL"]
|
|
218
|
+
EOF
|
|
219
|
+
- collapseable_section_end "write-dotenv-api"
|
|
178
220
|
- echo '{"id":"$(git describe --tags 2>/dev/null || git rev-parse HEAD)","time":"$CI_JOB_STARTED_AT"}' > api/__build_info.json
|
|
179
|
-
-
|
|
221
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
180
222
|
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
181
223
|
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
182
|
-
-
|
|
224
|
+
- collapseable_section_end "nodeinstall"
|
|
183
225
|
- cd api
|
|
184
|
-
-
|
|
226
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
185
227
|
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
186
228
|
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
187
|
-
-
|
|
188
|
-
-
|
|
229
|
+
- collapseable_section_end "nodeinstall"
|
|
230
|
+
- collapseable_section_start "yarninstall" "Yarn install"
|
|
189
231
|
- yarn install --immutable
|
|
190
|
-
-
|
|
232
|
+
- collapseable_section_end "yarninstall"
|
|
191
233
|
- yarn build
|
|
192
234
|
cache:
|
|
193
235
|
- key: api-yarn
|
|
@@ -198,15 +240,13 @@ api 🧪 test:
|
|
|
198
240
|
policy: pull-push
|
|
199
241
|
paths:
|
|
200
242
|
- api/node_modules
|
|
201
|
-
- key: api-next-cache
|
|
202
|
-
policy: pull-push
|
|
203
|
-
paths:
|
|
204
|
-
- api/.next/cache
|
|
205
243
|
artifacts:
|
|
206
244
|
paths:
|
|
207
245
|
- api/__build_info.json
|
|
208
246
|
- api/.next
|
|
209
247
|
- api/dist
|
|
248
|
+
exclude:
|
|
249
|
+
- api/.env
|
|
210
250
|
expire_in: 1 day
|
|
211
251
|
when: always
|
|
212
252
|
reports: {}
|
|
@@ -222,8 +262,8 @@ api 🧪 test:
|
|
|
222
262
|
image: aquasec/trivy:0.38.3
|
|
223
263
|
variables: {}
|
|
224
264
|
script:
|
|
225
|
-
-
|
|
226
|
-
-
|
|
265
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
266
|
+
- collapseable_section_end "injectvars"
|
|
227
267
|
- trivy fs --quiet --format cyclonedx --output "__sbom.json" api
|
|
228
268
|
artifacts:
|
|
229
269
|
paths:
|
|
@@ -244,20 +284,19 @@ api 🧪 test:
|
|
|
244
284
|
KUBERNETES_MEMORY_REQUEST: 200Mi
|
|
245
285
|
KUBERNETES_MEMORY_LIMIT: 400Mi
|
|
246
286
|
script:
|
|
247
|
-
-
|
|
287
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
248
288
|
- export ENV_SHORT="dev"
|
|
249
289
|
- export APP_DIR="api"
|
|
250
290
|
- export ENV_TYPE="dev"
|
|
251
291
|
- export BUILD_INFO_BUILD_ID="$(git describe --tags 2>/dev/null || git rev-parse HEAD)"
|
|
252
292
|
- export BUILD_INFO_BUILD_TIME="$CI_JOB_STARTED_AT"
|
|
253
293
|
- export BUILD_INFO_CURRENT_VERSION="$(tag=$(git ls-remote origin "refs/tags/v*[0-9]" 2>/dev/null | cut -f 2- | sort -V | tail -1 | sed 's/refs\\/tags\\/v//'); [ -z "$tag" ] && echo "0.0.0" || echo "$tag")"
|
|
254
|
-
- export
|
|
294
|
+
- export HOSTNAME="unknown-host.example.com"
|
|
255
295
|
- export ROOT_URL="https://unknown-host.example.com"
|
|
256
|
-
- export
|
|
257
|
-
- export HOST_CANONICAL="unknown-host.example.com"
|
|
296
|
+
- export HOSTNAME_INTERNAL="unknown-host.example.com"
|
|
258
297
|
- export ROOT_URL_INTERNAL="https://unknown-host.example.com"
|
|
259
|
-
- export _ALL_ENV_VAR_KEYS="[\\"ENV_SHORT\\",\\"APP_DIR\\",\\"ENV_TYPE\\",\\"BUILD_INFO_BUILD_ID\\",\\"BUILD_INFO_BUILD_TIME\\",\\"BUILD_INFO_CURRENT_VERSION\\",\\"
|
|
260
|
-
-
|
|
298
|
+
- export _ALL_ENV_VAR_KEYS="[\\"ENV_SHORT\\",\\"APP_DIR\\",\\"ENV_TYPE\\",\\"BUILD_INFO_BUILD_ID\\",\\"BUILD_INFO_BUILD_TIME\\",\\"BUILD_INFO_CURRENT_VERSION\\",\\"HOSTNAME\\",\\"ROOT_URL\\",\\"HOSTNAME_INTERNAL\\",\\"ROOT_URL_INTERNAL\\"]"
|
|
299
|
+
- collapseable_section_end "injectvars"
|
|
261
300
|
- cd api
|
|
262
301
|
- yarn deploy
|
|
263
302
|
- echo 'Uploading SBOM to Dependency Track'
|
|
@@ -289,33 +328,45 @@ api 🧪 test:
|
|
|
289
328
|
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
290
329
|
KUBERNETES_MEMORY_LIMIT: 4Gi
|
|
291
330
|
script:
|
|
292
|
-
-
|
|
331
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
293
332
|
- export ENV_SHORT="review"
|
|
294
333
|
- export APP_DIR="api"
|
|
295
334
|
- export ENV_TYPE="review"
|
|
296
335
|
- export BUILD_INFO_BUILD_ID="$(git describe --tags 2>/dev/null || git rev-parse HEAD)"
|
|
297
336
|
- export BUILD_INFO_BUILD_TIME="$CI_JOB_STARTED_AT"
|
|
298
337
|
- export BUILD_INFO_CURRENT_VERSION="$(tag=$(git ls-remote origin "refs/tags/v*[0-9]" 2>/dev/null | cut -f 2- | sort -V | tail -1 | sed 's/refs\\/tags\\/v//'); [ -z "$tag" ] && echo "0.0.0" || echo "$tag")"
|
|
299
|
-
- export
|
|
338
|
+
- export HOSTNAME="unknown-host.example.com"
|
|
300
339
|
- export ROOT_URL="https://unknown-host.example.com"
|
|
301
|
-
- export
|
|
302
|
-
- export HOST_CANONICAL="unknown-host.example.com"
|
|
340
|
+
- export HOSTNAME_INTERNAL="unknown-host.example.com"
|
|
303
341
|
- export ROOT_URL_INTERNAL="https://unknown-host.example.com"
|
|
304
|
-
- export _ALL_ENV_VAR_KEYS="[\\"ENV_SHORT\\",\\"APP_DIR\\",\\"ENV_TYPE\\",\\"BUILD_INFO_BUILD_ID\\",\\"BUILD_INFO_BUILD_TIME\\",\\"BUILD_INFO_CURRENT_VERSION\\",\\"
|
|
305
|
-
-
|
|
342
|
+
- export _ALL_ENV_VAR_KEYS="[\\"ENV_SHORT\\",\\"APP_DIR\\",\\"ENV_TYPE\\",\\"BUILD_INFO_BUILD_ID\\",\\"BUILD_INFO_BUILD_TIME\\",\\"BUILD_INFO_CURRENT_VERSION\\",\\"HOSTNAME\\",\\"ROOT_URL\\",\\"HOSTNAME_INTERNAL\\",\\"ROOT_URL_INTERNAL\\"]"
|
|
343
|
+
- collapseable_section_end "injectvars"
|
|
344
|
+
- collapseable_section_start "write-dotenv-api" "write dot env for api"
|
|
345
|
+
- |-
|
|
346
|
+
cat <<EOF > api/.env
|
|
347
|
+
ENV_SHORT=review
|
|
348
|
+
APP_DIR=api
|
|
349
|
+
ENV_TYPE=review
|
|
350
|
+
HOSTNAME=unknown-host.example.com
|
|
351
|
+
ROOT_URL=https://unknown-host.example.com
|
|
352
|
+
HOSTNAME_INTERNAL=unknown-host.example.com
|
|
353
|
+
ROOT_URL_INTERNAL=https://unknown-host.example.com
|
|
354
|
+
_ALL_ENV_VAR_KEYS=["ENV_SHORT","APP_DIR","ENV_TYPE","BUILD_INFO_BUILD_ID","BUILD_INFO_BUILD_TIME","BUILD_INFO_CURRENT_VERSION","HOSTNAME","ROOT_URL","HOSTNAME_INTERNAL","ROOT_URL_INTERNAL"]
|
|
355
|
+
EOF
|
|
356
|
+
- collapseable_section_end "write-dotenv-api"
|
|
306
357
|
- echo '{"id":"$(git describe --tags 2>/dev/null || git rev-parse HEAD)","time":"$CI_JOB_STARTED_AT"}' > api/__build_info.json
|
|
307
|
-
-
|
|
358
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
308
359
|
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
309
360
|
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
310
|
-
-
|
|
361
|
+
- collapseable_section_end "nodeinstall"
|
|
311
362
|
- cd api
|
|
312
|
-
-
|
|
363
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
313
364
|
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
314
365
|
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
315
|
-
-
|
|
316
|
-
-
|
|
366
|
+
- collapseable_section_end "nodeinstall"
|
|
367
|
+
- collapseable_section_start "yarninstall" "Yarn install"
|
|
317
368
|
- yarn install --immutable
|
|
318
|
-
-
|
|
369
|
+
- collapseable_section_end "yarninstall"
|
|
319
370
|
- yarn build
|
|
320
371
|
cache:
|
|
321
372
|
- key: api-yarn
|
|
@@ -326,15 +377,13 @@ api 🧪 test:
|
|
|
326
377
|
policy: pull-push
|
|
327
378
|
paths:
|
|
328
379
|
- api/node_modules
|
|
329
|
-
- key: api-next-cache
|
|
330
|
-
policy: pull-push
|
|
331
|
-
paths:
|
|
332
|
-
- api/.next/cache
|
|
333
380
|
artifacts:
|
|
334
381
|
paths:
|
|
335
382
|
- api/__build_info.json
|
|
336
383
|
- api/.next
|
|
337
384
|
- api/dist
|
|
385
|
+
exclude:
|
|
386
|
+
- api/.env
|
|
338
387
|
expire_in: 1 day
|
|
339
388
|
when: always
|
|
340
389
|
reports: {}
|
|
@@ -348,8 +397,8 @@ api 🧪 test:
|
|
|
348
397
|
image: aquasec/trivy:0.38.3
|
|
349
398
|
variables: {}
|
|
350
399
|
script:
|
|
351
|
-
-
|
|
352
|
-
-
|
|
400
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
401
|
+
- collapseable_section_end "injectvars"
|
|
353
402
|
- trivy fs --quiet --format cyclonedx --output "__sbom.json" api
|
|
354
403
|
artifacts:
|
|
355
404
|
paths:
|
|
@@ -368,20 +417,19 @@ api 🧪 test:
|
|
|
368
417
|
KUBERNETES_MEMORY_REQUEST: 200Mi
|
|
369
418
|
KUBERNETES_MEMORY_LIMIT: 400Mi
|
|
370
419
|
script:
|
|
371
|
-
-
|
|
420
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
372
421
|
- export ENV_SHORT="review"
|
|
373
422
|
- export APP_DIR="api"
|
|
374
423
|
- export ENV_TYPE="review"
|
|
375
424
|
- export BUILD_INFO_BUILD_ID="$(git describe --tags 2>/dev/null || git rev-parse HEAD)"
|
|
376
425
|
- export BUILD_INFO_BUILD_TIME="$CI_JOB_STARTED_AT"
|
|
377
426
|
- export BUILD_INFO_CURRENT_VERSION="$(tag=$(git ls-remote origin "refs/tags/v*[0-9]" 2>/dev/null | cut -f 2- | sort -V | tail -1 | sed 's/refs\\/tags\\/v//'); [ -z "$tag" ] && echo "0.0.0" || echo "$tag")"
|
|
378
|
-
- export
|
|
427
|
+
- export HOSTNAME="unknown-host.example.com"
|
|
379
428
|
- export ROOT_URL="https://unknown-host.example.com"
|
|
380
|
-
- export
|
|
381
|
-
- export HOST_CANONICAL="unknown-host.example.com"
|
|
429
|
+
- export HOSTNAME_INTERNAL="unknown-host.example.com"
|
|
382
430
|
- export ROOT_URL_INTERNAL="https://unknown-host.example.com"
|
|
383
|
-
- export _ALL_ENV_VAR_KEYS="[\\"ENV_SHORT\\",\\"APP_DIR\\",\\"ENV_TYPE\\",\\"BUILD_INFO_BUILD_ID\\",\\"BUILD_INFO_BUILD_TIME\\",\\"BUILD_INFO_CURRENT_VERSION\\",\\"
|
|
384
|
-
-
|
|
431
|
+
- export _ALL_ENV_VAR_KEYS="[\\"ENV_SHORT\\",\\"APP_DIR\\",\\"ENV_TYPE\\",\\"BUILD_INFO_BUILD_ID\\",\\"BUILD_INFO_BUILD_TIME\\",\\"BUILD_INFO_CURRENT_VERSION\\",\\"HOSTNAME\\",\\"ROOT_URL\\",\\"HOSTNAME_INTERNAL\\",\\"ROOT_URL_INTERNAL\\"]"
|
|
432
|
+
- collapseable_section_end "injectvars"
|
|
385
433
|
- cd api
|
|
386
434
|
- yarn deploy
|
|
387
435
|
- echo 'Uploading SBOM to Dependency Track'
|
|
@@ -411,33 +459,45 @@ api 🧪 test:
|
|
|
411
459
|
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
412
460
|
KUBERNETES_MEMORY_LIMIT: 4Gi
|
|
413
461
|
script:
|
|
414
|
-
-
|
|
462
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
415
463
|
- export ENV_SHORT="stage"
|
|
416
464
|
- export APP_DIR="api"
|
|
417
465
|
- export ENV_TYPE="stage"
|
|
418
466
|
- export BUILD_INFO_BUILD_ID="$(git describe --tags 2>/dev/null || git rev-parse HEAD)"
|
|
419
467
|
- export BUILD_INFO_BUILD_TIME="$CI_JOB_STARTED_AT"
|
|
420
468
|
- export BUILD_INFO_CURRENT_VERSION="$(tag=$(git ls-remote origin "refs/tags/v*[0-9]" 2>/dev/null | cut -f 2- | sort -V | tail -1 | sed 's/refs\\/tags\\/v//'); [ -z "$tag" ] && echo "0.0.0" || echo "$tag")"
|
|
421
|
-
- export
|
|
469
|
+
- export HOSTNAME="unknown-host.example.com"
|
|
422
470
|
- export ROOT_URL="https://unknown-host.example.com"
|
|
423
|
-
- export
|
|
424
|
-
- export HOST_CANONICAL="unknown-host.example.com"
|
|
471
|
+
- export HOSTNAME_INTERNAL="unknown-host.example.com"
|
|
425
472
|
- export ROOT_URL_INTERNAL="https://unknown-host.example.com"
|
|
426
|
-
- export _ALL_ENV_VAR_KEYS="[\\"ENV_SHORT\\",\\"APP_DIR\\",\\"ENV_TYPE\\",\\"BUILD_INFO_BUILD_ID\\",\\"BUILD_INFO_BUILD_TIME\\",\\"BUILD_INFO_CURRENT_VERSION\\",\\"
|
|
427
|
-
-
|
|
473
|
+
- export _ALL_ENV_VAR_KEYS="[\\"ENV_SHORT\\",\\"APP_DIR\\",\\"ENV_TYPE\\",\\"BUILD_INFO_BUILD_ID\\",\\"BUILD_INFO_BUILD_TIME\\",\\"BUILD_INFO_CURRENT_VERSION\\",\\"HOSTNAME\\",\\"ROOT_URL\\",\\"HOSTNAME_INTERNAL\\",\\"ROOT_URL_INTERNAL\\"]"
|
|
474
|
+
- collapseable_section_end "injectvars"
|
|
475
|
+
- collapseable_section_start "write-dotenv-api" "write dot env for api"
|
|
476
|
+
- |-
|
|
477
|
+
cat <<EOF > api/.env
|
|
478
|
+
ENV_SHORT=stage
|
|
479
|
+
APP_DIR=api
|
|
480
|
+
ENV_TYPE=stage
|
|
481
|
+
HOSTNAME=unknown-host.example.com
|
|
482
|
+
ROOT_URL=https://unknown-host.example.com
|
|
483
|
+
HOSTNAME_INTERNAL=unknown-host.example.com
|
|
484
|
+
ROOT_URL_INTERNAL=https://unknown-host.example.com
|
|
485
|
+
_ALL_ENV_VAR_KEYS=["ENV_SHORT","APP_DIR","ENV_TYPE","BUILD_INFO_BUILD_ID","BUILD_INFO_BUILD_TIME","BUILD_INFO_CURRENT_VERSION","HOSTNAME","ROOT_URL","HOSTNAME_INTERNAL","ROOT_URL_INTERNAL"]
|
|
486
|
+
EOF
|
|
487
|
+
- collapseable_section_end "write-dotenv-api"
|
|
428
488
|
- echo '{"id":"$(git describe --tags 2>/dev/null || git rev-parse HEAD)","time":"$CI_JOB_STARTED_AT"}' > api/__build_info.json
|
|
429
|
-
-
|
|
489
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
430
490
|
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
431
491
|
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
432
|
-
-
|
|
492
|
+
- collapseable_section_end "nodeinstall"
|
|
433
493
|
- cd api
|
|
434
|
-
-
|
|
494
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
435
495
|
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
436
496
|
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
437
|
-
-
|
|
438
|
-
-
|
|
497
|
+
- collapseable_section_end "nodeinstall"
|
|
498
|
+
- collapseable_section_start "yarninstall" "Yarn install"
|
|
439
499
|
- yarn install --immutable
|
|
440
|
-
-
|
|
500
|
+
- collapseable_section_end "yarninstall"
|
|
441
501
|
- yarn build
|
|
442
502
|
cache:
|
|
443
503
|
- key: api-yarn
|
|
@@ -448,15 +508,13 @@ api 🧪 test:
|
|
|
448
508
|
policy: pull-push
|
|
449
509
|
paths:
|
|
450
510
|
- api/node_modules
|
|
451
|
-
- key: api-next-cache
|
|
452
|
-
policy: pull-push
|
|
453
|
-
paths:
|
|
454
|
-
- api/.next/cache
|
|
455
511
|
artifacts:
|
|
456
512
|
paths:
|
|
457
513
|
- api/__build_info.json
|
|
458
514
|
- api/.next
|
|
459
515
|
- api/dist
|
|
516
|
+
exclude:
|
|
517
|
+
- api/.env
|
|
460
518
|
expire_in: 1 day
|
|
461
519
|
when: always
|
|
462
520
|
reports: {}
|
|
@@ -470,8 +528,8 @@ api 🧪 test:
|
|
|
470
528
|
image: aquasec/trivy:0.38.3
|
|
471
529
|
variables: {}
|
|
472
530
|
script:
|
|
473
|
-
-
|
|
474
|
-
-
|
|
531
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
532
|
+
- collapseable_section_end "injectvars"
|
|
475
533
|
- trivy fs --quiet --format cyclonedx --output "__sbom.json" api
|
|
476
534
|
artifacts:
|
|
477
535
|
paths:
|
|
@@ -490,20 +548,19 @@ api 🧪 test:
|
|
|
490
548
|
KUBERNETES_MEMORY_REQUEST: 200Mi
|
|
491
549
|
KUBERNETES_MEMORY_LIMIT: 400Mi
|
|
492
550
|
script:
|
|
493
|
-
-
|
|
551
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
494
552
|
- export ENV_SHORT="stage"
|
|
495
553
|
- export APP_DIR="api"
|
|
496
554
|
- export ENV_TYPE="stage"
|
|
497
555
|
- export BUILD_INFO_BUILD_ID="$(git describe --tags 2>/dev/null || git rev-parse HEAD)"
|
|
498
556
|
- export BUILD_INFO_BUILD_TIME="$CI_JOB_STARTED_AT"
|
|
499
557
|
- export BUILD_INFO_CURRENT_VERSION="$(tag=$(git ls-remote origin "refs/tags/v*[0-9]" 2>/dev/null | cut -f 2- | sort -V | tail -1 | sed 's/refs\\/tags\\/v//'); [ -z "$tag" ] && echo "0.0.0" || echo "$tag")"
|
|
500
|
-
- export
|
|
558
|
+
- export HOSTNAME="unknown-host.example.com"
|
|
501
559
|
- export ROOT_URL="https://unknown-host.example.com"
|
|
502
|
-
- export
|
|
503
|
-
- export HOST_CANONICAL="unknown-host.example.com"
|
|
560
|
+
- export HOSTNAME_INTERNAL="unknown-host.example.com"
|
|
504
561
|
- export ROOT_URL_INTERNAL="https://unknown-host.example.com"
|
|
505
|
-
- export _ALL_ENV_VAR_KEYS="[\\"ENV_SHORT\\",\\"APP_DIR\\",\\"ENV_TYPE\\",\\"BUILD_INFO_BUILD_ID\\",\\"BUILD_INFO_BUILD_TIME\\",\\"BUILD_INFO_CURRENT_VERSION\\",\\"
|
|
506
|
-
-
|
|
562
|
+
- export _ALL_ENV_VAR_KEYS="[\\"ENV_SHORT\\",\\"APP_DIR\\",\\"ENV_TYPE\\",\\"BUILD_INFO_BUILD_ID\\",\\"BUILD_INFO_BUILD_TIME\\",\\"BUILD_INFO_CURRENT_VERSION\\",\\"HOSTNAME\\",\\"ROOT_URL\\",\\"HOSTNAME_INTERNAL\\",\\"ROOT_URL_INTERNAL\\"]"
|
|
563
|
+
- collapseable_section_end "injectvars"
|
|
507
564
|
- cd api
|
|
508
565
|
- yarn deploy
|
|
509
566
|
- echo 'Uploading SBOM to Dependency Track'
|
|
@@ -527,33 +584,45 @@ api 🧪 test:
|
|
|
527
584
|
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
528
585
|
KUBERNETES_MEMORY_LIMIT: 4Gi
|
|
529
586
|
script:
|
|
530
|
-
-
|
|
587
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
531
588
|
- export ENV_SHORT="prod"
|
|
532
589
|
- export APP_DIR="api"
|
|
533
590
|
- export ENV_TYPE="prod"
|
|
534
591
|
- export BUILD_INFO_BUILD_ID="$(git describe --tags 2>/dev/null || git rev-parse HEAD)"
|
|
535
592
|
- export BUILD_INFO_BUILD_TIME="$CI_JOB_STARTED_AT"
|
|
536
593
|
- export BUILD_INFO_CURRENT_VERSION="$(tag=$(git ls-remote origin "refs/tags/v*[0-9]" 2>/dev/null | cut -f 2- | sort -V | tail -1 | sed 's/refs\\/tags\\/v//'); [ -z "$tag" ] && echo "0.0.0" || echo "$tag")"
|
|
537
|
-
- export
|
|
594
|
+
- export HOSTNAME="unknown-host.example.com"
|
|
538
595
|
- export ROOT_URL="https://unknown-host.example.com"
|
|
539
|
-
- export
|
|
540
|
-
- export HOST_CANONICAL="unknown-host.example.com"
|
|
596
|
+
- export HOSTNAME_INTERNAL="unknown-host.example.com"
|
|
541
597
|
- export ROOT_URL_INTERNAL="https://unknown-host.example.com"
|
|
542
|
-
- export _ALL_ENV_VAR_KEYS="[\\"ENV_SHORT\\",\\"APP_DIR\\",\\"ENV_TYPE\\",\\"BUILD_INFO_BUILD_ID\\",\\"BUILD_INFO_BUILD_TIME\\",\\"BUILD_INFO_CURRENT_VERSION\\",\\"
|
|
543
|
-
-
|
|
598
|
+
- export _ALL_ENV_VAR_KEYS="[\\"ENV_SHORT\\",\\"APP_DIR\\",\\"ENV_TYPE\\",\\"BUILD_INFO_BUILD_ID\\",\\"BUILD_INFO_BUILD_TIME\\",\\"BUILD_INFO_CURRENT_VERSION\\",\\"HOSTNAME\\",\\"ROOT_URL\\",\\"HOSTNAME_INTERNAL\\",\\"ROOT_URL_INTERNAL\\"]"
|
|
599
|
+
- collapseable_section_end "injectvars"
|
|
600
|
+
- collapseable_section_start "write-dotenv-api" "write dot env for api"
|
|
601
|
+
- |-
|
|
602
|
+
cat <<EOF > api/.env
|
|
603
|
+
ENV_SHORT=prod
|
|
604
|
+
APP_DIR=api
|
|
605
|
+
ENV_TYPE=prod
|
|
606
|
+
HOSTNAME=unknown-host.example.com
|
|
607
|
+
ROOT_URL=https://unknown-host.example.com
|
|
608
|
+
HOSTNAME_INTERNAL=unknown-host.example.com
|
|
609
|
+
ROOT_URL_INTERNAL=https://unknown-host.example.com
|
|
610
|
+
_ALL_ENV_VAR_KEYS=["ENV_SHORT","APP_DIR","ENV_TYPE","BUILD_INFO_BUILD_ID","BUILD_INFO_BUILD_TIME","BUILD_INFO_CURRENT_VERSION","HOSTNAME","ROOT_URL","HOSTNAME_INTERNAL","ROOT_URL_INTERNAL"]
|
|
611
|
+
EOF
|
|
612
|
+
- collapseable_section_end "write-dotenv-api"
|
|
544
613
|
- echo '{"id":"$(git describe --tags 2>/dev/null || git rev-parse HEAD)","time":"$CI_JOB_STARTED_AT"}' > api/__build_info.json
|
|
545
|
-
-
|
|
614
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
546
615
|
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
547
616
|
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
548
|
-
-
|
|
617
|
+
- collapseable_section_end "nodeinstall"
|
|
549
618
|
- cd api
|
|
550
|
-
-
|
|
619
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
551
620
|
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
552
621
|
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
553
|
-
-
|
|
554
|
-
-
|
|
622
|
+
- collapseable_section_end "nodeinstall"
|
|
623
|
+
- collapseable_section_start "yarninstall" "Yarn install"
|
|
555
624
|
- yarn install --immutable
|
|
556
|
-
-
|
|
625
|
+
- collapseable_section_end "yarninstall"
|
|
557
626
|
- yarn build
|
|
558
627
|
cache:
|
|
559
628
|
- key: api-yarn
|
|
@@ -564,15 +633,13 @@ api 🧪 test:
|
|
|
564
633
|
policy: pull-push
|
|
565
634
|
paths:
|
|
566
635
|
- api/node_modules
|
|
567
|
-
- key: api-next-cache
|
|
568
|
-
policy: pull-push
|
|
569
|
-
paths:
|
|
570
|
-
- api/.next/cache
|
|
571
636
|
artifacts:
|
|
572
637
|
paths:
|
|
573
638
|
- api/__build_info.json
|
|
574
639
|
- api/.next
|
|
575
640
|
- api/dist
|
|
641
|
+
exclude:
|
|
642
|
+
- api/.env
|
|
576
643
|
expire_in: 1 day
|
|
577
644
|
when: always
|
|
578
645
|
reports: {}
|
|
@@ -586,8 +653,8 @@ api 🧪 test:
|
|
|
586
653
|
image: aquasec/trivy:0.38.3
|
|
587
654
|
variables: {}
|
|
588
655
|
script:
|
|
589
|
-
-
|
|
590
|
-
-
|
|
656
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
657
|
+
- collapseable_section_end "injectvars"
|
|
591
658
|
- trivy fs --quiet --format cyclonedx --output "__sbom.json" api
|
|
592
659
|
artifacts:
|
|
593
660
|
paths:
|
|
@@ -606,20 +673,19 @@ api 🧪 test:
|
|
|
606
673
|
KUBERNETES_MEMORY_REQUEST: 200Mi
|
|
607
674
|
KUBERNETES_MEMORY_LIMIT: 400Mi
|
|
608
675
|
script:
|
|
609
|
-
-
|
|
676
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
610
677
|
- export ENV_SHORT="prod"
|
|
611
678
|
- export APP_DIR="api"
|
|
612
679
|
- export ENV_TYPE="prod"
|
|
613
680
|
- export BUILD_INFO_BUILD_ID="$(git describe --tags 2>/dev/null || git rev-parse HEAD)"
|
|
614
681
|
- export BUILD_INFO_BUILD_TIME="$CI_JOB_STARTED_AT"
|
|
615
682
|
- export BUILD_INFO_CURRENT_VERSION="$(tag=$(git ls-remote origin "refs/tags/v*[0-9]" 2>/dev/null | cut -f 2- | sort -V | tail -1 | sed 's/refs\\/tags\\/v//'); [ -z "$tag" ] && echo "0.0.0" || echo "$tag")"
|
|
616
|
-
- export
|
|
683
|
+
- export HOSTNAME="unknown-host.example.com"
|
|
617
684
|
- export ROOT_URL="https://unknown-host.example.com"
|
|
618
|
-
- export
|
|
619
|
-
- export HOST_CANONICAL="unknown-host.example.com"
|
|
685
|
+
- export HOSTNAME_INTERNAL="unknown-host.example.com"
|
|
620
686
|
- export ROOT_URL_INTERNAL="https://unknown-host.example.com"
|
|
621
|
-
- export _ALL_ENV_VAR_KEYS="[\\"ENV_SHORT\\",\\"APP_DIR\\",\\"ENV_TYPE\\",\\"BUILD_INFO_BUILD_ID\\",\\"BUILD_INFO_BUILD_TIME\\",\\"BUILD_INFO_CURRENT_VERSION\\",\\"
|
|
622
|
-
-
|
|
687
|
+
- export _ALL_ENV_VAR_KEYS="[\\"ENV_SHORT\\",\\"APP_DIR\\",\\"ENV_TYPE\\",\\"BUILD_INFO_BUILD_ID\\",\\"BUILD_INFO_BUILD_TIME\\",\\"BUILD_INFO_CURRENT_VERSION\\",\\"HOSTNAME\\",\\"ROOT_URL\\",\\"HOSTNAME_INTERNAL\\",\\"ROOT_URL_INTERNAL\\"]"
|
|
688
|
+
- collapseable_section_end "injectvars"
|
|
623
689
|
- cd api
|
|
624
690
|
- yarn deploy
|
|
625
691
|
- echo 'Uploading SBOM to Dependency Track'
|
|
@@ -643,9 +709,9 @@ www 🛡 audit:
|
|
|
643
709
|
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
644
710
|
KUBERNETES_MEMORY_LIMIT: 4Gi
|
|
645
711
|
script:
|
|
646
|
-
-
|
|
712
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
647
713
|
- export APP_PATH="www"
|
|
648
|
-
-
|
|
714
|
+
- collapseable_section_end "injectvars"
|
|
649
715
|
- cd www
|
|
650
716
|
- yarn npm audit --environment production
|
|
651
717
|
rules:
|
|
@@ -665,21 +731,21 @@ www 👮 lint:
|
|
|
665
731
|
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
666
732
|
KUBERNETES_MEMORY_LIMIT: 4Gi
|
|
667
733
|
script:
|
|
668
|
-
-
|
|
734
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
669
735
|
- export APP_PATH="www"
|
|
670
|
-
-
|
|
671
|
-
-
|
|
736
|
+
- collapseable_section_end "injectvars"
|
|
737
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
672
738
|
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
673
739
|
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
674
|
-
-
|
|
740
|
+
- collapseable_section_end "nodeinstall"
|
|
675
741
|
- cd www
|
|
676
|
-
-
|
|
742
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
677
743
|
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
678
744
|
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
679
|
-
-
|
|
680
|
-
-
|
|
745
|
+
- collapseable_section_end "nodeinstall"
|
|
746
|
+
- collapseable_section_start "yarninstall" "Yarn install"
|
|
681
747
|
- yarn install --immutable
|
|
682
|
-
-
|
|
748
|
+
- collapseable_section_end "yarninstall"
|
|
683
749
|
- yarn lint
|
|
684
750
|
cache:
|
|
685
751
|
- key: www-yarn
|
|
@@ -706,21 +772,21 @@ www 🧪 test:
|
|
|
706
772
|
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
707
773
|
KUBERNETES_MEMORY_LIMIT: 4Gi
|
|
708
774
|
script:
|
|
709
|
-
-
|
|
775
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
710
776
|
- export APP_PATH="www"
|
|
711
|
-
-
|
|
712
|
-
-
|
|
777
|
+
- collapseable_section_end "injectvars"
|
|
778
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
713
779
|
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
714
780
|
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
715
|
-
-
|
|
781
|
+
- collapseable_section_end "nodeinstall"
|
|
716
782
|
- cd www
|
|
717
|
-
-
|
|
783
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
718
784
|
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
719
785
|
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
720
|
-
-
|
|
721
|
-
-
|
|
786
|
+
- collapseable_section_end "nodeinstall"
|
|
787
|
+
- collapseable_section_start "yarninstall" "Yarn install"
|
|
722
788
|
- yarn install --immutable
|
|
723
|
-
-
|
|
789
|
+
- collapseable_section_end "yarninstall"
|
|
724
790
|
- yarn test
|
|
725
791
|
cache:
|
|
726
792
|
- key: www-yarn
|
|
@@ -747,33 +813,45 @@ www 🧪 test:
|
|
|
747
813
|
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
748
814
|
KUBERNETES_MEMORY_LIMIT: 4Gi
|
|
749
815
|
script:
|
|
750
|
-
-
|
|
816
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
751
817
|
- export ENV_SHORT="dev"
|
|
752
818
|
- export APP_DIR="www"
|
|
753
819
|
- export ENV_TYPE="dev"
|
|
754
820
|
- export BUILD_INFO_BUILD_ID="$(git describe --tags 2>/dev/null || git rev-parse HEAD)"
|
|
755
821
|
- export BUILD_INFO_BUILD_TIME="$CI_JOB_STARTED_AT"
|
|
756
822
|
- export BUILD_INFO_CURRENT_VERSION="$(tag=$(git ls-remote origin "refs/tags/v*[0-9]" 2>/dev/null | cut -f 2- | sort -V | tail -1 | sed 's/refs\\/tags\\/v//'); [ -z "$tag" ] && echo "0.0.0" || echo "$tag")"
|
|
757
|
-
- export
|
|
823
|
+
- export HOSTNAME="unknown-host.example.com"
|
|
758
824
|
- export ROOT_URL="https://unknown-host.example.com"
|
|
759
|
-
- export
|
|
760
|
-
- export HOST_CANONICAL="unknown-host.example.com"
|
|
825
|
+
- export HOSTNAME_INTERNAL="unknown-host.example.com"
|
|
761
826
|
- export ROOT_URL_INTERNAL="https://unknown-host.example.com"
|
|
762
|
-
- export _ALL_ENV_VAR_KEYS="[\\"ENV_SHORT\\",\\"APP_DIR\\",\\"ENV_TYPE\\",\\"BUILD_INFO_BUILD_ID\\",\\"BUILD_INFO_BUILD_TIME\\",\\"BUILD_INFO_CURRENT_VERSION\\",\\"
|
|
763
|
-
-
|
|
827
|
+
- export _ALL_ENV_VAR_KEYS="[\\"ENV_SHORT\\",\\"APP_DIR\\",\\"ENV_TYPE\\",\\"BUILD_INFO_BUILD_ID\\",\\"BUILD_INFO_BUILD_TIME\\",\\"BUILD_INFO_CURRENT_VERSION\\",\\"HOSTNAME\\",\\"ROOT_URL\\",\\"HOSTNAME_INTERNAL\\",\\"ROOT_URL_INTERNAL\\"]"
|
|
828
|
+
- collapseable_section_end "injectvars"
|
|
829
|
+
- collapseable_section_start "write-dotenv-www" "write dot env for www"
|
|
830
|
+
- |-
|
|
831
|
+
cat <<EOF > www/.env
|
|
832
|
+
ENV_SHORT=dev
|
|
833
|
+
APP_DIR=www
|
|
834
|
+
ENV_TYPE=dev
|
|
835
|
+
HOSTNAME=unknown-host.example.com
|
|
836
|
+
ROOT_URL=https://unknown-host.example.com
|
|
837
|
+
HOSTNAME_INTERNAL=unknown-host.example.com
|
|
838
|
+
ROOT_URL_INTERNAL=https://unknown-host.example.com
|
|
839
|
+
_ALL_ENV_VAR_KEYS=["ENV_SHORT","APP_DIR","ENV_TYPE","BUILD_INFO_BUILD_ID","BUILD_INFO_BUILD_TIME","BUILD_INFO_CURRENT_VERSION","HOSTNAME","ROOT_URL","HOSTNAME_INTERNAL","ROOT_URL_INTERNAL"]
|
|
840
|
+
EOF
|
|
841
|
+
- collapseable_section_end "write-dotenv-www"
|
|
764
842
|
- echo '{"id":"$(git describe --tags 2>/dev/null || git rev-parse HEAD)","time":"$CI_JOB_STARTED_AT"}' > www/__build_info.json
|
|
765
|
-
-
|
|
843
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
766
844
|
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
767
845
|
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
768
|
-
-
|
|
846
|
+
- collapseable_section_end "nodeinstall"
|
|
769
847
|
- cd www
|
|
770
|
-
-
|
|
848
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
771
849
|
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
772
850
|
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
773
|
-
-
|
|
774
|
-
-
|
|
851
|
+
- collapseable_section_end "nodeinstall"
|
|
852
|
+
- collapseable_section_start "yarninstall" "Yarn install"
|
|
775
853
|
- yarn install --immutable
|
|
776
|
-
-
|
|
854
|
+
- collapseable_section_end "yarninstall"
|
|
777
855
|
- yarn build
|
|
778
856
|
cache:
|
|
779
857
|
- key: www-yarn
|
|
@@ -784,15 +862,13 @@ www 🧪 test:
|
|
|
784
862
|
policy: pull-push
|
|
785
863
|
paths:
|
|
786
864
|
- www/node_modules
|
|
787
|
-
- key: www-next-cache
|
|
788
|
-
policy: pull-push
|
|
789
|
-
paths:
|
|
790
|
-
- www/.next/cache
|
|
791
865
|
artifacts:
|
|
792
866
|
paths:
|
|
793
867
|
- www/__build_info.json
|
|
794
868
|
- www/.next
|
|
795
869
|
- www/dist
|
|
870
|
+
exclude:
|
|
871
|
+
- www/.env
|
|
796
872
|
expire_in: 1 day
|
|
797
873
|
when: always
|
|
798
874
|
reports: {}
|
|
@@ -808,8 +884,8 @@ www 🧪 test:
|
|
|
808
884
|
image: aquasec/trivy:0.38.3
|
|
809
885
|
variables: {}
|
|
810
886
|
script:
|
|
811
|
-
-
|
|
812
|
-
-
|
|
887
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
888
|
+
- collapseable_section_end "injectvars"
|
|
813
889
|
- trivy fs --quiet --format cyclonedx --output "__sbom.json" www
|
|
814
890
|
artifacts:
|
|
815
891
|
paths:
|
|
@@ -830,20 +906,19 @@ www 🧪 test:
|
|
|
830
906
|
KUBERNETES_MEMORY_REQUEST: 200Mi
|
|
831
907
|
KUBERNETES_MEMORY_LIMIT: 400Mi
|
|
832
908
|
script:
|
|
833
|
-
-
|
|
909
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
834
910
|
- export ENV_SHORT="dev"
|
|
835
911
|
- export APP_DIR="www"
|
|
836
912
|
- export ENV_TYPE="dev"
|
|
837
913
|
- export BUILD_INFO_BUILD_ID="$(git describe --tags 2>/dev/null || git rev-parse HEAD)"
|
|
838
914
|
- export BUILD_INFO_BUILD_TIME="$CI_JOB_STARTED_AT"
|
|
839
915
|
- export BUILD_INFO_CURRENT_VERSION="$(tag=$(git ls-remote origin "refs/tags/v*[0-9]" 2>/dev/null | cut -f 2- | sort -V | tail -1 | sed 's/refs\\/tags\\/v//'); [ -z "$tag" ] && echo "0.0.0" || echo "$tag")"
|
|
840
|
-
- export
|
|
916
|
+
- export HOSTNAME="unknown-host.example.com"
|
|
841
917
|
- export ROOT_URL="https://unknown-host.example.com"
|
|
842
|
-
- export
|
|
843
|
-
- export HOST_CANONICAL="unknown-host.example.com"
|
|
918
|
+
- export HOSTNAME_INTERNAL="unknown-host.example.com"
|
|
844
919
|
- export ROOT_URL_INTERNAL="https://unknown-host.example.com"
|
|
845
|
-
- export _ALL_ENV_VAR_KEYS="[\\"ENV_SHORT\\",\\"APP_DIR\\",\\"ENV_TYPE\\",\\"BUILD_INFO_BUILD_ID\\",\\"BUILD_INFO_BUILD_TIME\\",\\"BUILD_INFO_CURRENT_VERSION\\",\\"
|
|
846
|
-
-
|
|
920
|
+
- export _ALL_ENV_VAR_KEYS="[\\"ENV_SHORT\\",\\"APP_DIR\\",\\"ENV_TYPE\\",\\"BUILD_INFO_BUILD_ID\\",\\"BUILD_INFO_BUILD_TIME\\",\\"BUILD_INFO_CURRENT_VERSION\\",\\"HOSTNAME\\",\\"ROOT_URL\\",\\"HOSTNAME_INTERNAL\\",\\"ROOT_URL_INTERNAL\\"]"
|
|
921
|
+
- collapseable_section_end "injectvars"
|
|
847
922
|
- cd www
|
|
848
923
|
- yarn deploy
|
|
849
924
|
- echo 'Uploading SBOM to Dependency Track'
|
|
@@ -877,33 +952,45 @@ www 🧪 test:
|
|
|
877
952
|
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
878
953
|
KUBERNETES_MEMORY_LIMIT: 4Gi
|
|
879
954
|
script:
|
|
880
|
-
-
|
|
955
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
881
956
|
- export ENV_SHORT="review"
|
|
882
957
|
- export APP_DIR="www"
|
|
883
958
|
- export ENV_TYPE="review"
|
|
884
959
|
- export BUILD_INFO_BUILD_ID="$(git describe --tags 2>/dev/null || git rev-parse HEAD)"
|
|
885
960
|
- export BUILD_INFO_BUILD_TIME="$CI_JOB_STARTED_AT"
|
|
886
961
|
- export BUILD_INFO_CURRENT_VERSION="$(tag=$(git ls-remote origin "refs/tags/v*[0-9]" 2>/dev/null | cut -f 2- | sort -V | tail -1 | sed 's/refs\\/tags\\/v//'); [ -z "$tag" ] && echo "0.0.0" || echo "$tag")"
|
|
887
|
-
- export
|
|
962
|
+
- export HOSTNAME="unknown-host.example.com"
|
|
888
963
|
- export ROOT_URL="https://unknown-host.example.com"
|
|
889
|
-
- export
|
|
890
|
-
- export HOST_CANONICAL="unknown-host.example.com"
|
|
964
|
+
- export HOSTNAME_INTERNAL="unknown-host.example.com"
|
|
891
965
|
- export ROOT_URL_INTERNAL="https://unknown-host.example.com"
|
|
892
|
-
- export _ALL_ENV_VAR_KEYS="[\\"ENV_SHORT\\",\\"APP_DIR\\",\\"ENV_TYPE\\",\\"BUILD_INFO_BUILD_ID\\",\\"BUILD_INFO_BUILD_TIME\\",\\"BUILD_INFO_CURRENT_VERSION\\",\\"
|
|
893
|
-
-
|
|
966
|
+
- export _ALL_ENV_VAR_KEYS="[\\"ENV_SHORT\\",\\"APP_DIR\\",\\"ENV_TYPE\\",\\"BUILD_INFO_BUILD_ID\\",\\"BUILD_INFO_BUILD_TIME\\",\\"BUILD_INFO_CURRENT_VERSION\\",\\"HOSTNAME\\",\\"ROOT_URL\\",\\"HOSTNAME_INTERNAL\\",\\"ROOT_URL_INTERNAL\\"]"
|
|
967
|
+
- collapseable_section_end "injectvars"
|
|
968
|
+
- collapseable_section_start "write-dotenv-www" "write dot env for www"
|
|
969
|
+
- |-
|
|
970
|
+
cat <<EOF > www/.env
|
|
971
|
+
ENV_SHORT=review
|
|
972
|
+
APP_DIR=www
|
|
973
|
+
ENV_TYPE=review
|
|
974
|
+
HOSTNAME=unknown-host.example.com
|
|
975
|
+
ROOT_URL=https://unknown-host.example.com
|
|
976
|
+
HOSTNAME_INTERNAL=unknown-host.example.com
|
|
977
|
+
ROOT_URL_INTERNAL=https://unknown-host.example.com
|
|
978
|
+
_ALL_ENV_VAR_KEYS=["ENV_SHORT","APP_DIR","ENV_TYPE","BUILD_INFO_BUILD_ID","BUILD_INFO_BUILD_TIME","BUILD_INFO_CURRENT_VERSION","HOSTNAME","ROOT_URL","HOSTNAME_INTERNAL","ROOT_URL_INTERNAL"]
|
|
979
|
+
EOF
|
|
980
|
+
- collapseable_section_end "write-dotenv-www"
|
|
894
981
|
- echo '{"id":"$(git describe --tags 2>/dev/null || git rev-parse HEAD)","time":"$CI_JOB_STARTED_AT"}' > www/__build_info.json
|
|
895
|
-
-
|
|
982
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
896
983
|
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
897
984
|
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
898
|
-
-
|
|
985
|
+
- collapseable_section_end "nodeinstall"
|
|
899
986
|
- cd www
|
|
900
|
-
-
|
|
987
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
901
988
|
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
902
989
|
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
903
|
-
-
|
|
904
|
-
-
|
|
990
|
+
- collapseable_section_end "nodeinstall"
|
|
991
|
+
- collapseable_section_start "yarninstall" "Yarn install"
|
|
905
992
|
- yarn install --immutable
|
|
906
|
-
-
|
|
993
|
+
- collapseable_section_end "yarninstall"
|
|
907
994
|
- yarn build
|
|
908
995
|
cache:
|
|
909
996
|
- key: www-yarn
|
|
@@ -914,15 +1001,13 @@ www 🧪 test:
|
|
|
914
1001
|
policy: pull-push
|
|
915
1002
|
paths:
|
|
916
1003
|
- www/node_modules
|
|
917
|
-
- key: www-next-cache
|
|
918
|
-
policy: pull-push
|
|
919
|
-
paths:
|
|
920
|
-
- www/.next/cache
|
|
921
1004
|
artifacts:
|
|
922
1005
|
paths:
|
|
923
1006
|
- www/__build_info.json
|
|
924
1007
|
- www/.next
|
|
925
1008
|
- www/dist
|
|
1009
|
+
exclude:
|
|
1010
|
+
- www/.env
|
|
926
1011
|
expire_in: 1 day
|
|
927
1012
|
when: always
|
|
928
1013
|
reports: {}
|
|
@@ -936,8 +1021,8 @@ www 🧪 test:
|
|
|
936
1021
|
image: aquasec/trivy:0.38.3
|
|
937
1022
|
variables: {}
|
|
938
1023
|
script:
|
|
939
|
-
-
|
|
940
|
-
-
|
|
1024
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
1025
|
+
- collapseable_section_end "injectvars"
|
|
941
1026
|
- trivy fs --quiet --format cyclonedx --output "__sbom.json" www
|
|
942
1027
|
artifacts:
|
|
943
1028
|
paths:
|
|
@@ -956,20 +1041,19 @@ www 🧪 test:
|
|
|
956
1041
|
KUBERNETES_MEMORY_REQUEST: 200Mi
|
|
957
1042
|
KUBERNETES_MEMORY_LIMIT: 400Mi
|
|
958
1043
|
script:
|
|
959
|
-
-
|
|
1044
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
960
1045
|
- export ENV_SHORT="review"
|
|
961
1046
|
- export APP_DIR="www"
|
|
962
1047
|
- export ENV_TYPE="review"
|
|
963
1048
|
- export BUILD_INFO_BUILD_ID="$(git describe --tags 2>/dev/null || git rev-parse HEAD)"
|
|
964
1049
|
- export BUILD_INFO_BUILD_TIME="$CI_JOB_STARTED_AT"
|
|
965
1050
|
- export BUILD_INFO_CURRENT_VERSION="$(tag=$(git ls-remote origin "refs/tags/v*[0-9]" 2>/dev/null | cut -f 2- | sort -V | tail -1 | sed 's/refs\\/tags\\/v//'); [ -z "$tag" ] && echo "0.0.0" || echo "$tag")"
|
|
966
|
-
- export
|
|
1051
|
+
- export HOSTNAME="unknown-host.example.com"
|
|
967
1052
|
- export ROOT_URL="https://unknown-host.example.com"
|
|
968
|
-
- export
|
|
969
|
-
- export HOST_CANONICAL="unknown-host.example.com"
|
|
1053
|
+
- export HOSTNAME_INTERNAL="unknown-host.example.com"
|
|
970
1054
|
- export ROOT_URL_INTERNAL="https://unknown-host.example.com"
|
|
971
|
-
- export _ALL_ENV_VAR_KEYS="[\\"ENV_SHORT\\",\\"APP_DIR\\",\\"ENV_TYPE\\",\\"BUILD_INFO_BUILD_ID\\",\\"BUILD_INFO_BUILD_TIME\\",\\"BUILD_INFO_CURRENT_VERSION\\",\\"
|
|
972
|
-
-
|
|
1055
|
+
- export _ALL_ENV_VAR_KEYS="[\\"ENV_SHORT\\",\\"APP_DIR\\",\\"ENV_TYPE\\",\\"BUILD_INFO_BUILD_ID\\",\\"BUILD_INFO_BUILD_TIME\\",\\"BUILD_INFO_CURRENT_VERSION\\",\\"HOSTNAME\\",\\"ROOT_URL\\",\\"HOSTNAME_INTERNAL\\",\\"ROOT_URL_INTERNAL\\"]"
|
|
1056
|
+
- collapseable_section_end "injectvars"
|
|
973
1057
|
- cd www
|
|
974
1058
|
- yarn deploy
|
|
975
1059
|
- echo 'Uploading SBOM to Dependency Track'
|
|
@@ -1001,33 +1085,45 @@ www 🧪 test:
|
|
|
1001
1085
|
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
1002
1086
|
KUBERNETES_MEMORY_LIMIT: 4Gi
|
|
1003
1087
|
script:
|
|
1004
|
-
-
|
|
1088
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
1005
1089
|
- export ENV_SHORT="stage"
|
|
1006
1090
|
- export APP_DIR="www"
|
|
1007
1091
|
- export ENV_TYPE="stage"
|
|
1008
1092
|
- export BUILD_INFO_BUILD_ID="$(git describe --tags 2>/dev/null || git rev-parse HEAD)"
|
|
1009
1093
|
- export BUILD_INFO_BUILD_TIME="$CI_JOB_STARTED_AT"
|
|
1010
1094
|
- export BUILD_INFO_CURRENT_VERSION="$(tag=$(git ls-remote origin "refs/tags/v*[0-9]" 2>/dev/null | cut -f 2- | sort -V | tail -1 | sed 's/refs\\/tags\\/v//'); [ -z "$tag" ] && echo "0.0.0" || echo "$tag")"
|
|
1011
|
-
- export
|
|
1095
|
+
- export HOSTNAME="unknown-host.example.com"
|
|
1012
1096
|
- export ROOT_URL="https://unknown-host.example.com"
|
|
1013
|
-
- export
|
|
1014
|
-
- export HOST_CANONICAL="unknown-host.example.com"
|
|
1097
|
+
- export HOSTNAME_INTERNAL="unknown-host.example.com"
|
|
1015
1098
|
- export ROOT_URL_INTERNAL="https://unknown-host.example.com"
|
|
1016
|
-
- export _ALL_ENV_VAR_KEYS="[\\"ENV_SHORT\\",\\"APP_DIR\\",\\"ENV_TYPE\\",\\"BUILD_INFO_BUILD_ID\\",\\"BUILD_INFO_BUILD_TIME\\",\\"BUILD_INFO_CURRENT_VERSION\\",\\"
|
|
1017
|
-
-
|
|
1099
|
+
- export _ALL_ENV_VAR_KEYS="[\\"ENV_SHORT\\",\\"APP_DIR\\",\\"ENV_TYPE\\",\\"BUILD_INFO_BUILD_ID\\",\\"BUILD_INFO_BUILD_TIME\\",\\"BUILD_INFO_CURRENT_VERSION\\",\\"HOSTNAME\\",\\"ROOT_URL\\",\\"HOSTNAME_INTERNAL\\",\\"ROOT_URL_INTERNAL\\"]"
|
|
1100
|
+
- collapseable_section_end "injectvars"
|
|
1101
|
+
- collapseable_section_start "write-dotenv-www" "write dot env for www"
|
|
1102
|
+
- |-
|
|
1103
|
+
cat <<EOF > www/.env
|
|
1104
|
+
ENV_SHORT=stage
|
|
1105
|
+
APP_DIR=www
|
|
1106
|
+
ENV_TYPE=stage
|
|
1107
|
+
HOSTNAME=unknown-host.example.com
|
|
1108
|
+
ROOT_URL=https://unknown-host.example.com
|
|
1109
|
+
HOSTNAME_INTERNAL=unknown-host.example.com
|
|
1110
|
+
ROOT_URL_INTERNAL=https://unknown-host.example.com
|
|
1111
|
+
_ALL_ENV_VAR_KEYS=["ENV_SHORT","APP_DIR","ENV_TYPE","BUILD_INFO_BUILD_ID","BUILD_INFO_BUILD_TIME","BUILD_INFO_CURRENT_VERSION","HOSTNAME","ROOT_URL","HOSTNAME_INTERNAL","ROOT_URL_INTERNAL"]
|
|
1112
|
+
EOF
|
|
1113
|
+
- collapseable_section_end "write-dotenv-www"
|
|
1018
1114
|
- echo '{"id":"$(git describe --tags 2>/dev/null || git rev-parse HEAD)","time":"$CI_JOB_STARTED_AT"}' > www/__build_info.json
|
|
1019
|
-
-
|
|
1115
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
1020
1116
|
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
1021
1117
|
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
1022
|
-
-
|
|
1118
|
+
- collapseable_section_end "nodeinstall"
|
|
1023
1119
|
- cd www
|
|
1024
|
-
-
|
|
1120
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
1025
1121
|
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
1026
1122
|
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
1027
|
-
-
|
|
1028
|
-
-
|
|
1123
|
+
- collapseable_section_end "nodeinstall"
|
|
1124
|
+
- collapseable_section_start "yarninstall" "Yarn install"
|
|
1029
1125
|
- yarn install --immutable
|
|
1030
|
-
-
|
|
1126
|
+
- collapseable_section_end "yarninstall"
|
|
1031
1127
|
- yarn build
|
|
1032
1128
|
cache:
|
|
1033
1129
|
- key: www-yarn
|
|
@@ -1038,15 +1134,13 @@ www 🧪 test:
|
|
|
1038
1134
|
policy: pull-push
|
|
1039
1135
|
paths:
|
|
1040
1136
|
- www/node_modules
|
|
1041
|
-
- key: www-next-cache
|
|
1042
|
-
policy: pull-push
|
|
1043
|
-
paths:
|
|
1044
|
-
- www/.next/cache
|
|
1045
1137
|
artifacts:
|
|
1046
1138
|
paths:
|
|
1047
1139
|
- www/__build_info.json
|
|
1048
1140
|
- www/.next
|
|
1049
1141
|
- www/dist
|
|
1142
|
+
exclude:
|
|
1143
|
+
- www/.env
|
|
1050
1144
|
expire_in: 1 day
|
|
1051
1145
|
when: always
|
|
1052
1146
|
reports: {}
|
|
@@ -1060,8 +1154,8 @@ www 🧪 test:
|
|
|
1060
1154
|
image: aquasec/trivy:0.38.3
|
|
1061
1155
|
variables: {}
|
|
1062
1156
|
script:
|
|
1063
|
-
-
|
|
1064
|
-
-
|
|
1157
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
1158
|
+
- collapseable_section_end "injectvars"
|
|
1065
1159
|
- trivy fs --quiet --format cyclonedx --output "__sbom.json" www
|
|
1066
1160
|
artifacts:
|
|
1067
1161
|
paths:
|
|
@@ -1080,20 +1174,19 @@ www 🧪 test:
|
|
|
1080
1174
|
KUBERNETES_MEMORY_REQUEST: 200Mi
|
|
1081
1175
|
KUBERNETES_MEMORY_LIMIT: 400Mi
|
|
1082
1176
|
script:
|
|
1083
|
-
-
|
|
1177
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
1084
1178
|
- export ENV_SHORT="stage"
|
|
1085
1179
|
- export APP_DIR="www"
|
|
1086
1180
|
- export ENV_TYPE="stage"
|
|
1087
1181
|
- export BUILD_INFO_BUILD_ID="$(git describe --tags 2>/dev/null || git rev-parse HEAD)"
|
|
1088
1182
|
- export BUILD_INFO_BUILD_TIME="$CI_JOB_STARTED_AT"
|
|
1089
1183
|
- export BUILD_INFO_CURRENT_VERSION="$(tag=$(git ls-remote origin "refs/tags/v*[0-9]" 2>/dev/null | cut -f 2- | sort -V | tail -1 | sed 's/refs\\/tags\\/v//'); [ -z "$tag" ] && echo "0.0.0" || echo "$tag")"
|
|
1090
|
-
- export
|
|
1184
|
+
- export HOSTNAME="unknown-host.example.com"
|
|
1091
1185
|
- export ROOT_URL="https://unknown-host.example.com"
|
|
1092
|
-
- export
|
|
1093
|
-
- export HOST_CANONICAL="unknown-host.example.com"
|
|
1186
|
+
- export HOSTNAME_INTERNAL="unknown-host.example.com"
|
|
1094
1187
|
- export ROOT_URL_INTERNAL="https://unknown-host.example.com"
|
|
1095
|
-
- export _ALL_ENV_VAR_KEYS="[\\"ENV_SHORT\\",\\"APP_DIR\\",\\"ENV_TYPE\\",\\"BUILD_INFO_BUILD_ID\\",\\"BUILD_INFO_BUILD_TIME\\",\\"BUILD_INFO_CURRENT_VERSION\\",\\"
|
|
1096
|
-
-
|
|
1188
|
+
- export _ALL_ENV_VAR_KEYS="[\\"ENV_SHORT\\",\\"APP_DIR\\",\\"ENV_TYPE\\",\\"BUILD_INFO_BUILD_ID\\",\\"BUILD_INFO_BUILD_TIME\\",\\"BUILD_INFO_CURRENT_VERSION\\",\\"HOSTNAME\\",\\"ROOT_URL\\",\\"HOSTNAME_INTERNAL\\",\\"ROOT_URL_INTERNAL\\"]"
|
|
1189
|
+
- collapseable_section_end "injectvars"
|
|
1097
1190
|
- cd www
|
|
1098
1191
|
- yarn deploy
|
|
1099
1192
|
- echo 'Uploading SBOM to Dependency Track'
|
|
@@ -1119,33 +1212,45 @@ www 🧪 test:
|
|
|
1119
1212
|
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
1120
1213
|
KUBERNETES_MEMORY_LIMIT: 4Gi
|
|
1121
1214
|
script:
|
|
1122
|
-
-
|
|
1215
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
1123
1216
|
- export ENV_SHORT="prod"
|
|
1124
1217
|
- export APP_DIR="www"
|
|
1125
1218
|
- export ENV_TYPE="prod"
|
|
1126
1219
|
- export BUILD_INFO_BUILD_ID="$(git describe --tags 2>/dev/null || git rev-parse HEAD)"
|
|
1127
1220
|
- export BUILD_INFO_BUILD_TIME="$CI_JOB_STARTED_AT"
|
|
1128
1221
|
- export BUILD_INFO_CURRENT_VERSION="$(tag=$(git ls-remote origin "refs/tags/v*[0-9]" 2>/dev/null | cut -f 2- | sort -V | tail -1 | sed 's/refs\\/tags\\/v//'); [ -z "$tag" ] && echo "0.0.0" || echo "$tag")"
|
|
1129
|
-
- export
|
|
1222
|
+
- export HOSTNAME="unknown-host.example.com"
|
|
1130
1223
|
- export ROOT_URL="https://unknown-host.example.com"
|
|
1131
|
-
- export
|
|
1132
|
-
- export HOST_CANONICAL="unknown-host.example.com"
|
|
1224
|
+
- export HOSTNAME_INTERNAL="unknown-host.example.com"
|
|
1133
1225
|
- export ROOT_URL_INTERNAL="https://unknown-host.example.com"
|
|
1134
|
-
- export _ALL_ENV_VAR_KEYS="[\\"ENV_SHORT\\",\\"APP_DIR\\",\\"ENV_TYPE\\",\\"BUILD_INFO_BUILD_ID\\",\\"BUILD_INFO_BUILD_TIME\\",\\"BUILD_INFO_CURRENT_VERSION\\",\\"
|
|
1135
|
-
-
|
|
1226
|
+
- export _ALL_ENV_VAR_KEYS="[\\"ENV_SHORT\\",\\"APP_DIR\\",\\"ENV_TYPE\\",\\"BUILD_INFO_BUILD_ID\\",\\"BUILD_INFO_BUILD_TIME\\",\\"BUILD_INFO_CURRENT_VERSION\\",\\"HOSTNAME\\",\\"ROOT_URL\\",\\"HOSTNAME_INTERNAL\\",\\"ROOT_URL_INTERNAL\\"]"
|
|
1227
|
+
- collapseable_section_end "injectvars"
|
|
1228
|
+
- collapseable_section_start "write-dotenv-www" "write dot env for www"
|
|
1229
|
+
- |-
|
|
1230
|
+
cat <<EOF > www/.env
|
|
1231
|
+
ENV_SHORT=prod
|
|
1232
|
+
APP_DIR=www
|
|
1233
|
+
ENV_TYPE=prod
|
|
1234
|
+
HOSTNAME=unknown-host.example.com
|
|
1235
|
+
ROOT_URL=https://unknown-host.example.com
|
|
1236
|
+
HOSTNAME_INTERNAL=unknown-host.example.com
|
|
1237
|
+
ROOT_URL_INTERNAL=https://unknown-host.example.com
|
|
1238
|
+
_ALL_ENV_VAR_KEYS=["ENV_SHORT","APP_DIR","ENV_TYPE","BUILD_INFO_BUILD_ID","BUILD_INFO_BUILD_TIME","BUILD_INFO_CURRENT_VERSION","HOSTNAME","ROOT_URL","HOSTNAME_INTERNAL","ROOT_URL_INTERNAL"]
|
|
1239
|
+
EOF
|
|
1240
|
+
- collapseable_section_end "write-dotenv-www"
|
|
1136
1241
|
- echo '{"id":"$(git describe --tags 2>/dev/null || git rev-parse HEAD)","time":"$CI_JOB_STARTED_AT"}' > www/__build_info.json
|
|
1137
|
-
-
|
|
1242
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
1138
1243
|
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
1139
1244
|
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
1140
|
-
-
|
|
1245
|
+
- collapseable_section_end "nodeinstall"
|
|
1141
1246
|
- cd www
|
|
1142
|
-
-
|
|
1247
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
1143
1248
|
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
1144
1249
|
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
1145
|
-
-
|
|
1146
|
-
-
|
|
1250
|
+
- collapseable_section_end "nodeinstall"
|
|
1251
|
+
- collapseable_section_start "yarninstall" "Yarn install"
|
|
1147
1252
|
- yarn install --immutable
|
|
1148
|
-
-
|
|
1253
|
+
- collapseable_section_end "yarninstall"
|
|
1149
1254
|
- yarn build
|
|
1150
1255
|
cache:
|
|
1151
1256
|
- key: www-yarn
|
|
@@ -1156,15 +1261,13 @@ www 🧪 test:
|
|
|
1156
1261
|
policy: pull-push
|
|
1157
1262
|
paths:
|
|
1158
1263
|
- www/node_modules
|
|
1159
|
-
- key: www-next-cache
|
|
1160
|
-
policy: pull-push
|
|
1161
|
-
paths:
|
|
1162
|
-
- www/.next/cache
|
|
1163
1264
|
artifacts:
|
|
1164
1265
|
paths:
|
|
1165
1266
|
- www/__build_info.json
|
|
1166
1267
|
- www/.next
|
|
1167
1268
|
- www/dist
|
|
1269
|
+
exclude:
|
|
1270
|
+
- www/.env
|
|
1168
1271
|
expire_in: 1 day
|
|
1169
1272
|
when: always
|
|
1170
1273
|
reports: {}
|
|
@@ -1178,8 +1281,8 @@ www 🧪 test:
|
|
|
1178
1281
|
image: aquasec/trivy:0.38.3
|
|
1179
1282
|
variables: {}
|
|
1180
1283
|
script:
|
|
1181
|
-
-
|
|
1182
|
-
-
|
|
1284
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
1285
|
+
- collapseable_section_end "injectvars"
|
|
1183
1286
|
- trivy fs --quiet --format cyclonedx --output "__sbom.json" www
|
|
1184
1287
|
artifacts:
|
|
1185
1288
|
paths:
|
|
@@ -1198,20 +1301,19 @@ www 🧪 test:
|
|
|
1198
1301
|
KUBERNETES_MEMORY_REQUEST: 200Mi
|
|
1199
1302
|
KUBERNETES_MEMORY_LIMIT: 400Mi
|
|
1200
1303
|
script:
|
|
1201
|
-
-
|
|
1304
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
1202
1305
|
- export ENV_SHORT="prod"
|
|
1203
1306
|
- export APP_DIR="www"
|
|
1204
1307
|
- export ENV_TYPE="prod"
|
|
1205
1308
|
- export BUILD_INFO_BUILD_ID="$(git describe --tags 2>/dev/null || git rev-parse HEAD)"
|
|
1206
1309
|
- export BUILD_INFO_BUILD_TIME="$CI_JOB_STARTED_AT"
|
|
1207
1310
|
- export BUILD_INFO_CURRENT_VERSION="$(tag=$(git ls-remote origin "refs/tags/v*[0-9]" 2>/dev/null | cut -f 2- | sort -V | tail -1 | sed 's/refs\\/tags\\/v//'); [ -z "$tag" ] && echo "0.0.0" || echo "$tag")"
|
|
1208
|
-
- export
|
|
1311
|
+
- export HOSTNAME="unknown-host.example.com"
|
|
1209
1312
|
- export ROOT_URL="https://unknown-host.example.com"
|
|
1210
|
-
- export
|
|
1211
|
-
- export HOST_CANONICAL="unknown-host.example.com"
|
|
1313
|
+
- export HOSTNAME_INTERNAL="unknown-host.example.com"
|
|
1212
1314
|
- export ROOT_URL_INTERNAL="https://unknown-host.example.com"
|
|
1213
|
-
- export _ALL_ENV_VAR_KEYS="[\\"ENV_SHORT\\",\\"APP_DIR\\",\\"ENV_TYPE\\",\\"BUILD_INFO_BUILD_ID\\",\\"BUILD_INFO_BUILD_TIME\\",\\"BUILD_INFO_CURRENT_VERSION\\",\\"
|
|
1214
|
-
-
|
|
1315
|
+
- export _ALL_ENV_VAR_KEYS="[\\"ENV_SHORT\\",\\"APP_DIR\\",\\"ENV_TYPE\\",\\"BUILD_INFO_BUILD_ID\\",\\"BUILD_INFO_BUILD_TIME\\",\\"BUILD_INFO_CURRENT_VERSION\\",\\"HOSTNAME\\",\\"ROOT_URL\\",\\"HOSTNAME_INTERNAL\\",\\"ROOT_URL_INTERNAL\\"]"
|
|
1316
|
+
- collapseable_section_end "injectvars"
|
|
1215
1317
|
- cd www
|
|
1216
1318
|
- yarn deploy
|
|
1217
1319
|
- echo 'Uploading SBOM to Dependency Track'
|