@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
|
www 🛡 audit:
|
|
49
79
|
stage: test
|
|
50
80
|
image: path/to/docker/jobs-default:the-version
|
|
@@ -53,9 +83,9 @@ www 🛡 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="www"
|
|
58
|
-
-
|
|
88
|
+
- collapseable_section_end "injectvars"
|
|
59
89
|
- cd www
|
|
60
90
|
- yarn npm audit --environment production
|
|
61
91
|
rules:
|
|
@@ -79,21 +109,21 @@ www 👮 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="www"
|
|
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 www
|
|
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: www-yarn
|
|
@@ -120,21 +150,21 @@ www 🧪 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="www"
|
|
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 www
|
|
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: www-yarn
|
|
@@ -161,33 +191,45 @@ www 🧪 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="www"
|
|
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-www" "write dot env for www"
|
|
208
|
+
- |-
|
|
209
|
+
cat <<EOF > www/.env
|
|
210
|
+
ENV_SHORT=dev
|
|
211
|
+
APP_DIR=www
|
|
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-www"
|
|
178
220
|
- echo '{"id":"$(git describe --tags 2>/dev/null || git rev-parse HEAD)","time":"$CI_JOB_STARTED_AT"}' > www/__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 www
|
|
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: www-yarn
|
|
@@ -198,15 +240,13 @@ www 🧪 test:
|
|
|
198
240
|
policy: pull-push
|
|
199
241
|
paths:
|
|
200
242
|
- www/node_modules
|
|
201
|
-
- key: www-next-cache
|
|
202
|
-
policy: pull-push
|
|
203
|
-
paths:
|
|
204
|
-
- www/.next/cache
|
|
205
243
|
artifacts:
|
|
206
244
|
paths:
|
|
207
245
|
- www/__build_info.json
|
|
208
246
|
- www/.next
|
|
209
247
|
- www/dist
|
|
248
|
+
exclude:
|
|
249
|
+
- www/.env
|
|
210
250
|
expire_in: 1 day
|
|
211
251
|
when: always
|
|
212
252
|
reports: {}
|
|
@@ -234,7 +274,7 @@ www 🧪 test:
|
|
|
234
274
|
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
235
275
|
KUBERNETES_MEMORY_LIMIT: 2Gi
|
|
236
276
|
script:
|
|
237
|
-
-
|
|
277
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
238
278
|
- export APP_DIR="www"
|
|
239
279
|
- export DOCKER_BUILD_CONTEXT="."
|
|
240
280
|
- export DOCKER_REGISTRY="$CI_REGISTRY"
|
|
@@ -251,19 +291,19 @@ www 🧪 test:
|
|
|
251
291
|
COPY --chown=node:node www/yarn.lock /app/www/yarn.lock
|
|
252
292
|
COPY --chown=node:node .yarnrc.yml /app/.yarnrc.yml
|
|
253
293
|
COPY --chown=node:node .yarn /app/.yarn"
|
|
254
|
-
-
|
|
294
|
+
- collapseable_section_end "injectvars"
|
|
255
295
|
- ensureNodeDockerfile
|
|
256
|
-
-
|
|
296
|
+
- collapseable_section_start "docker-login" "Docker Login"
|
|
257
297
|
- docker login --username gitlab-ci-token --password $CI_JOB_TOKEN $CI_REGISTRY
|
|
258
|
-
-
|
|
259
|
-
-
|
|
298
|
+
- collapseable_section_end "docker-login"
|
|
299
|
+
- collapseable_section_start "docker-build" "Docker build"
|
|
260
300
|
- docker build --network host --cache-from $DOCKER_CACHE_IMAGE --tag $DOCKER_IMAGE:$DOCKER_IMAGE_TAG -f $APP_DIR/Dockerfile $DOCKER_BUILD_CONTEXT --build-arg BUILDKIT_INLINE_CACHE=1
|
|
261
|
-
-
|
|
262
|
-
-
|
|
301
|
+
- collapseable_section_end "docker-build"
|
|
302
|
+
- collapseable_section_start "docker-push" "Docker push and tag"
|
|
263
303
|
- docker push $DOCKER_IMAGE:$DOCKER_IMAGE_TAG
|
|
264
304
|
- docker tag $DOCKER_IMAGE:$DOCKER_IMAGE_TAG $DOCKER_CACHE_IMAGE
|
|
265
305
|
- docker push $DOCKER_CACHE_IMAGE
|
|
266
|
-
-
|
|
306
|
+
- collapseable_section_end "docker-push"
|
|
267
307
|
cache:
|
|
268
308
|
- key: www-yarn
|
|
269
309
|
policy: pull
|
|
@@ -282,8 +322,8 @@ www 🧪 test:
|
|
|
282
322
|
image: aquasec/trivy:0.38.3
|
|
283
323
|
variables: {}
|
|
284
324
|
script:
|
|
285
|
-
-
|
|
286
|
-
-
|
|
325
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
326
|
+
- collapseable_section_end "injectvars"
|
|
287
327
|
- trivy fs --quiet --format cyclonedx --output "__sbom.json" www
|
|
288
328
|
artifacts:
|
|
289
329
|
paths:
|
|
@@ -304,26 +344,25 @@ www 🧪 test:
|
|
|
304
344
|
KUBERNETES_MEMORY_REQUEST: 1024Mi
|
|
305
345
|
KUBERNETES_MEMORY_LIMIT: 2048Mi
|
|
306
346
|
script:
|
|
307
|
-
-
|
|
347
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
308
348
|
- export ENV_SHORT="dev"
|
|
309
349
|
- export APP_DIR="www"
|
|
310
350
|
- export ENV_TYPE="dev"
|
|
311
351
|
- export BUILD_INFO_BUILD_ID="$(git describe --tags 2>/dev/null || git rev-parse HEAD)"
|
|
312
352
|
- export BUILD_INFO_BUILD_TIME="$CI_JOB_STARTED_AT"
|
|
313
353
|
- 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")"
|
|
314
|
-
- export
|
|
354
|
+
- export HOSTNAME="unknown-host.example.com"
|
|
315
355
|
- export ROOT_URL="https://unknown-host.example.com"
|
|
316
|
-
- export
|
|
317
|
-
- export HOST_CANONICAL="unknown-host.example.com"
|
|
356
|
+
- export HOSTNAME_INTERNAL="unknown-host.example.com"
|
|
318
357
|
- export ROOT_URL_INTERNAL="https://unknown-host.example.com"
|
|
319
|
-
- export _ALL_ENV_VAR_KEYS="[\\"ENV_SHORT\\",\\"APP_DIR\\",\\"ENV_TYPE\\",\\"BUILD_INFO_BUILD_ID\\",\\"BUILD_INFO_BUILD_TIME\\",\\"BUILD_INFO_CURRENT_VERSION\\",\\"
|
|
358
|
+
- 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\\"]"
|
|
320
359
|
- export DOCKER_REGISTRY="$CI_REGISTRY"
|
|
321
360
|
- export DOCKER_CACHE_IMAGE="$CI_REGISTRY_IMAGE/caches/www"
|
|
322
361
|
- export DOCKER_IMAGE_NAME="dev/www"
|
|
323
362
|
- export DOCKER_IMAGE="$CI_REGISTRY_IMAGE/$DOCKER_IMAGE_NAME"
|
|
324
363
|
- export DOCKER_IMAGE_TAG="$CI_COMMIT_SHA"
|
|
325
364
|
- export DEPLOY_API_KEY="$CL_dev_www_DEPLOY_API_KEY"
|
|
326
|
-
-
|
|
365
|
+
- collapseable_section_end "injectvars"
|
|
327
366
|
- cd www
|
|
328
367
|
- echo 'would deploy'
|
|
329
368
|
- echo 'Uploading SBOM to Dependency Track'
|
|
@@ -367,9 +406,9 @@ www 🧪 test:
|
|
|
367
406
|
KUBERNETES_MEMORY_LIMIT: 400Mi
|
|
368
407
|
GIT_STRATEGY: none
|
|
369
408
|
script:
|
|
370
|
-
-
|
|
409
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
371
410
|
- export DEPLOY_API_KEY="$CL_dev_www_DEPLOY_API_KEY"
|
|
372
|
-
-
|
|
411
|
+
- collapseable_section_end "injectvars"
|
|
373
412
|
- echo 'would stop'
|
|
374
413
|
- echo 'Disabling component in Dependency Track'
|
|
375
414
|
- /dtrackuploader https://dep.panter.swiss/ "$DT_KEY_PROD" disable "pan-test-app/www" "https://unknown-host.example.com" || true
|
|
@@ -400,33 +439,45 @@ www 🧪 test:
|
|
|
400
439
|
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
401
440
|
KUBERNETES_MEMORY_LIMIT: 4Gi
|
|
402
441
|
script:
|
|
403
|
-
-
|
|
442
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
404
443
|
- export ENV_SHORT="review"
|
|
405
444
|
- export APP_DIR="www"
|
|
406
445
|
- export ENV_TYPE="review"
|
|
407
446
|
- export BUILD_INFO_BUILD_ID="$(git describe --tags 2>/dev/null || git rev-parse HEAD)"
|
|
408
447
|
- export BUILD_INFO_BUILD_TIME="$CI_JOB_STARTED_AT"
|
|
409
448
|
- 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")"
|
|
410
|
-
- export
|
|
449
|
+
- export HOSTNAME="unknown-host.example.com"
|
|
411
450
|
- export ROOT_URL="https://unknown-host.example.com"
|
|
412
|
-
- export
|
|
413
|
-
- export HOST_CANONICAL="unknown-host.example.com"
|
|
451
|
+
- export HOSTNAME_INTERNAL="unknown-host.example.com"
|
|
414
452
|
- export ROOT_URL_INTERNAL="https://unknown-host.example.com"
|
|
415
|
-
- export _ALL_ENV_VAR_KEYS="[\\"ENV_SHORT\\",\\"APP_DIR\\",\\"ENV_TYPE\\",\\"BUILD_INFO_BUILD_ID\\",\\"BUILD_INFO_BUILD_TIME\\",\\"BUILD_INFO_CURRENT_VERSION\\",\\"
|
|
416
|
-
-
|
|
453
|
+
- 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\\"]"
|
|
454
|
+
- collapseable_section_end "injectvars"
|
|
455
|
+
- collapseable_section_start "write-dotenv-www" "write dot env for www"
|
|
456
|
+
- |-
|
|
457
|
+
cat <<EOF > www/.env
|
|
458
|
+
ENV_SHORT=review
|
|
459
|
+
APP_DIR=www
|
|
460
|
+
ENV_TYPE=review
|
|
461
|
+
HOSTNAME=unknown-host.example.com
|
|
462
|
+
ROOT_URL=https://unknown-host.example.com
|
|
463
|
+
HOSTNAME_INTERNAL=unknown-host.example.com
|
|
464
|
+
ROOT_URL_INTERNAL=https://unknown-host.example.com
|
|
465
|
+
_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"]
|
|
466
|
+
EOF
|
|
467
|
+
- collapseable_section_end "write-dotenv-www"
|
|
417
468
|
- echo '{"id":"$(git describe --tags 2>/dev/null || git rev-parse HEAD)","time":"$CI_JOB_STARTED_AT"}' > www/__build_info.json
|
|
418
|
-
-
|
|
469
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
419
470
|
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
420
471
|
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
421
|
-
-
|
|
472
|
+
- collapseable_section_end "nodeinstall"
|
|
422
473
|
- cd www
|
|
423
|
-
-
|
|
474
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
424
475
|
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
425
476
|
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
426
|
-
-
|
|
427
|
-
-
|
|
477
|
+
- collapseable_section_end "nodeinstall"
|
|
478
|
+
- collapseable_section_start "yarninstall" "Yarn install"
|
|
428
479
|
- yarn install --immutable
|
|
429
|
-
-
|
|
480
|
+
- collapseable_section_end "yarninstall"
|
|
430
481
|
- yarn build
|
|
431
482
|
cache:
|
|
432
483
|
- key: www-yarn
|
|
@@ -437,15 +488,13 @@ www 🧪 test:
|
|
|
437
488
|
policy: pull-push
|
|
438
489
|
paths:
|
|
439
490
|
- www/node_modules
|
|
440
|
-
- key: www-next-cache
|
|
441
|
-
policy: pull-push
|
|
442
|
-
paths:
|
|
443
|
-
- www/.next/cache
|
|
444
491
|
artifacts:
|
|
445
492
|
paths:
|
|
446
493
|
- www/__build_info.json
|
|
447
494
|
- www/.next
|
|
448
495
|
- www/dist
|
|
496
|
+
exclude:
|
|
497
|
+
- www/.env
|
|
449
498
|
expire_in: 1 day
|
|
450
499
|
when: always
|
|
451
500
|
reports: {}
|
|
@@ -471,7 +520,7 @@ www 🧪 test:
|
|
|
471
520
|
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
472
521
|
KUBERNETES_MEMORY_LIMIT: 2Gi
|
|
473
522
|
script:
|
|
474
|
-
-
|
|
523
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
475
524
|
- export APP_DIR="www"
|
|
476
525
|
- export DOCKER_BUILD_CONTEXT="."
|
|
477
526
|
- export DOCKER_REGISTRY="$CI_REGISTRY"
|
|
@@ -488,19 +537,19 @@ www 🧪 test:
|
|
|
488
537
|
COPY --chown=node:node www/yarn.lock /app/www/yarn.lock
|
|
489
538
|
COPY --chown=node:node .yarnrc.yml /app/.yarnrc.yml
|
|
490
539
|
COPY --chown=node:node .yarn /app/.yarn"
|
|
491
|
-
-
|
|
540
|
+
- collapseable_section_end "injectvars"
|
|
492
541
|
- ensureNodeDockerfile
|
|
493
|
-
-
|
|
542
|
+
- collapseable_section_start "docker-login" "Docker Login"
|
|
494
543
|
- docker login --username gitlab-ci-token --password $CI_JOB_TOKEN $CI_REGISTRY
|
|
495
|
-
-
|
|
496
|
-
-
|
|
544
|
+
- collapseable_section_end "docker-login"
|
|
545
|
+
- collapseable_section_start "docker-build" "Docker build"
|
|
497
546
|
- docker build --network host --cache-from $DOCKER_CACHE_IMAGE --tag $DOCKER_IMAGE:$DOCKER_IMAGE_TAG -f $APP_DIR/Dockerfile $DOCKER_BUILD_CONTEXT --build-arg BUILDKIT_INLINE_CACHE=1
|
|
498
|
-
-
|
|
499
|
-
-
|
|
547
|
+
- collapseable_section_end "docker-build"
|
|
548
|
+
- collapseable_section_start "docker-push" "Docker push and tag"
|
|
500
549
|
- docker push $DOCKER_IMAGE:$DOCKER_IMAGE_TAG
|
|
501
550
|
- docker tag $DOCKER_IMAGE:$DOCKER_IMAGE_TAG $DOCKER_CACHE_IMAGE
|
|
502
551
|
- docker push $DOCKER_CACHE_IMAGE
|
|
503
|
-
-
|
|
552
|
+
- collapseable_section_end "docker-push"
|
|
504
553
|
cache:
|
|
505
554
|
- key: www-yarn
|
|
506
555
|
policy: pull
|
|
@@ -517,8 +566,8 @@ www 🧪 test:
|
|
|
517
566
|
image: aquasec/trivy:0.38.3
|
|
518
567
|
variables: {}
|
|
519
568
|
script:
|
|
520
|
-
-
|
|
521
|
-
-
|
|
569
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
570
|
+
- collapseable_section_end "injectvars"
|
|
522
571
|
- trivy fs --quiet --format cyclonedx --output "__sbom.json" www
|
|
523
572
|
artifacts:
|
|
524
573
|
paths:
|
|
@@ -537,26 +586,25 @@ www 🧪 test:
|
|
|
537
586
|
KUBERNETES_MEMORY_REQUEST: 1024Mi
|
|
538
587
|
KUBERNETES_MEMORY_LIMIT: 2048Mi
|
|
539
588
|
script:
|
|
540
|
-
-
|
|
589
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
541
590
|
- export ENV_SHORT="review"
|
|
542
591
|
- export APP_DIR="www"
|
|
543
592
|
- export ENV_TYPE="review"
|
|
544
593
|
- export BUILD_INFO_BUILD_ID="$(git describe --tags 2>/dev/null || git rev-parse HEAD)"
|
|
545
594
|
- export BUILD_INFO_BUILD_TIME="$CI_JOB_STARTED_AT"
|
|
546
595
|
- 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")"
|
|
547
|
-
- export
|
|
596
|
+
- export HOSTNAME="unknown-host.example.com"
|
|
548
597
|
- export ROOT_URL="https://unknown-host.example.com"
|
|
549
|
-
- export
|
|
550
|
-
- export HOST_CANONICAL="unknown-host.example.com"
|
|
598
|
+
- export HOSTNAME_INTERNAL="unknown-host.example.com"
|
|
551
599
|
- export ROOT_URL_INTERNAL="https://unknown-host.example.com"
|
|
552
|
-
- export _ALL_ENV_VAR_KEYS="[\\"ENV_SHORT\\",\\"APP_DIR\\",\\"ENV_TYPE\\",\\"BUILD_INFO_BUILD_ID\\",\\"BUILD_INFO_BUILD_TIME\\",\\"BUILD_INFO_CURRENT_VERSION\\",\\"
|
|
600
|
+
- 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\\"]"
|
|
553
601
|
- export DOCKER_REGISTRY="$CI_REGISTRY"
|
|
554
602
|
- export DOCKER_CACHE_IMAGE="$CI_REGISTRY_IMAGE/caches/www"
|
|
555
603
|
- export DOCKER_IMAGE_NAME="review/www"
|
|
556
604
|
- export DOCKER_IMAGE="$CI_REGISTRY_IMAGE/$DOCKER_IMAGE_NAME"
|
|
557
605
|
- export DOCKER_IMAGE_TAG="$CI_COMMIT_SHA"
|
|
558
606
|
- export DEPLOY_API_KEY="$CL_review_www_DEPLOY_API_KEY"
|
|
559
|
-
-
|
|
607
|
+
- collapseable_section_end "injectvars"
|
|
560
608
|
- cd www
|
|
561
609
|
- echo 'would deploy'
|
|
562
610
|
- echo 'Uploading SBOM to Dependency Track'
|
|
@@ -598,9 +646,9 @@ www 🧪 test:
|
|
|
598
646
|
KUBERNETES_MEMORY_LIMIT: 400Mi
|
|
599
647
|
GIT_STRATEGY: none
|
|
600
648
|
script:
|
|
601
|
-
-
|
|
649
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
602
650
|
- export DEPLOY_API_KEY="$CL_review_www_DEPLOY_API_KEY"
|
|
603
|
-
-
|
|
651
|
+
- collapseable_section_end "injectvars"
|
|
604
652
|
- echo 'would stop'
|
|
605
653
|
- echo 'Disabling component in Dependency Track'
|
|
606
654
|
- /dtrackuploader https://dep.panter.swiss/ "$DT_KEY_PROD" disable "pan-test-app/www" "https://unknown-host.example.com" || true
|
|
@@ -629,33 +677,45 @@ www 🧪 test:
|
|
|
629
677
|
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
630
678
|
KUBERNETES_MEMORY_LIMIT: 4Gi
|
|
631
679
|
script:
|
|
632
|
-
-
|
|
680
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
633
681
|
- export ENV_SHORT="stage"
|
|
634
682
|
- export APP_DIR="www"
|
|
635
683
|
- export ENV_TYPE="stage"
|
|
636
684
|
- export BUILD_INFO_BUILD_ID="$(git describe --tags 2>/dev/null || git rev-parse HEAD)"
|
|
637
685
|
- export BUILD_INFO_BUILD_TIME="$CI_JOB_STARTED_AT"
|
|
638
686
|
- 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")"
|
|
639
|
-
- export
|
|
687
|
+
- export HOSTNAME="unknown-host.example.com"
|
|
640
688
|
- export ROOT_URL="https://unknown-host.example.com"
|
|
641
|
-
- export
|
|
642
|
-
- export HOST_CANONICAL="unknown-host.example.com"
|
|
689
|
+
- export HOSTNAME_INTERNAL="unknown-host.example.com"
|
|
643
690
|
- export ROOT_URL_INTERNAL="https://unknown-host.example.com"
|
|
644
|
-
- export _ALL_ENV_VAR_KEYS="[\\"ENV_SHORT\\",\\"APP_DIR\\",\\"ENV_TYPE\\",\\"BUILD_INFO_BUILD_ID\\",\\"BUILD_INFO_BUILD_TIME\\",\\"BUILD_INFO_CURRENT_VERSION\\",\\"
|
|
645
|
-
-
|
|
691
|
+
- 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\\"]"
|
|
692
|
+
- collapseable_section_end "injectvars"
|
|
693
|
+
- collapseable_section_start "write-dotenv-www" "write dot env for www"
|
|
694
|
+
- |-
|
|
695
|
+
cat <<EOF > www/.env
|
|
696
|
+
ENV_SHORT=stage
|
|
697
|
+
APP_DIR=www
|
|
698
|
+
ENV_TYPE=stage
|
|
699
|
+
HOSTNAME=unknown-host.example.com
|
|
700
|
+
ROOT_URL=https://unknown-host.example.com
|
|
701
|
+
HOSTNAME_INTERNAL=unknown-host.example.com
|
|
702
|
+
ROOT_URL_INTERNAL=https://unknown-host.example.com
|
|
703
|
+
_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"]
|
|
704
|
+
EOF
|
|
705
|
+
- collapseable_section_end "write-dotenv-www"
|
|
646
706
|
- echo '{"id":"$(git describe --tags 2>/dev/null || git rev-parse HEAD)","time":"$CI_JOB_STARTED_AT"}' > www/__build_info.json
|
|
647
|
-
-
|
|
707
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
648
708
|
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
649
709
|
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
650
|
-
-
|
|
710
|
+
- collapseable_section_end "nodeinstall"
|
|
651
711
|
- cd www
|
|
652
|
-
-
|
|
712
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
653
713
|
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
654
714
|
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
655
|
-
-
|
|
656
|
-
-
|
|
715
|
+
- collapseable_section_end "nodeinstall"
|
|
716
|
+
- collapseable_section_start "yarninstall" "Yarn install"
|
|
657
717
|
- yarn install --immutable
|
|
658
|
-
-
|
|
718
|
+
- collapseable_section_end "yarninstall"
|
|
659
719
|
- yarn build
|
|
660
720
|
cache:
|
|
661
721
|
- key: www-yarn
|
|
@@ -666,15 +726,13 @@ www 🧪 test:
|
|
|
666
726
|
policy: pull-push
|
|
667
727
|
paths:
|
|
668
728
|
- www/node_modules
|
|
669
|
-
- key: www-next-cache
|
|
670
|
-
policy: pull-push
|
|
671
|
-
paths:
|
|
672
|
-
- www/.next/cache
|
|
673
729
|
artifacts:
|
|
674
730
|
paths:
|
|
675
731
|
- www/__build_info.json
|
|
676
732
|
- www/.next
|
|
677
733
|
- www/dist
|
|
734
|
+
exclude:
|
|
735
|
+
- www/.env
|
|
678
736
|
expire_in: 1 day
|
|
679
737
|
when: always
|
|
680
738
|
reports: {}
|
|
@@ -700,7 +758,7 @@ www 🧪 test:
|
|
|
700
758
|
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
701
759
|
KUBERNETES_MEMORY_LIMIT: 2Gi
|
|
702
760
|
script:
|
|
703
|
-
-
|
|
761
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
704
762
|
- export APP_DIR="www"
|
|
705
763
|
- export DOCKER_BUILD_CONTEXT="."
|
|
706
764
|
- export DOCKER_REGISTRY="$CI_REGISTRY"
|
|
@@ -717,19 +775,19 @@ www 🧪 test:
|
|
|
717
775
|
COPY --chown=node:node www/yarn.lock /app/www/yarn.lock
|
|
718
776
|
COPY --chown=node:node .yarnrc.yml /app/.yarnrc.yml
|
|
719
777
|
COPY --chown=node:node .yarn /app/.yarn"
|
|
720
|
-
-
|
|
778
|
+
- collapseable_section_end "injectvars"
|
|
721
779
|
- ensureNodeDockerfile
|
|
722
|
-
-
|
|
780
|
+
- collapseable_section_start "docker-login" "Docker Login"
|
|
723
781
|
- docker login --username gitlab-ci-token --password $CI_JOB_TOKEN $CI_REGISTRY
|
|
724
|
-
-
|
|
725
|
-
-
|
|
782
|
+
- collapseable_section_end "docker-login"
|
|
783
|
+
- collapseable_section_start "docker-build" "Docker build"
|
|
726
784
|
- docker build --network host --cache-from $DOCKER_CACHE_IMAGE --tag $DOCKER_IMAGE:$DOCKER_IMAGE_TAG -f $APP_DIR/Dockerfile $DOCKER_BUILD_CONTEXT --build-arg BUILDKIT_INLINE_CACHE=1
|
|
727
|
-
-
|
|
728
|
-
-
|
|
785
|
+
- collapseable_section_end "docker-build"
|
|
786
|
+
- collapseable_section_start "docker-push" "Docker push and tag"
|
|
729
787
|
- docker push $DOCKER_IMAGE:$DOCKER_IMAGE_TAG
|
|
730
788
|
- docker tag $DOCKER_IMAGE:$DOCKER_IMAGE_TAG $DOCKER_CACHE_IMAGE
|
|
731
789
|
- docker push $DOCKER_CACHE_IMAGE
|
|
732
|
-
-
|
|
790
|
+
- collapseable_section_end "docker-push"
|
|
733
791
|
cache:
|
|
734
792
|
- key: www-yarn
|
|
735
793
|
policy: pull
|
|
@@ -746,8 +804,8 @@ www 🧪 test:
|
|
|
746
804
|
image: aquasec/trivy:0.38.3
|
|
747
805
|
variables: {}
|
|
748
806
|
script:
|
|
749
|
-
-
|
|
750
|
-
-
|
|
807
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
808
|
+
- collapseable_section_end "injectvars"
|
|
751
809
|
- trivy fs --quiet --format cyclonedx --output "__sbom.json" www
|
|
752
810
|
artifacts:
|
|
753
811
|
paths:
|
|
@@ -766,26 +824,25 @@ www 🧪 test:
|
|
|
766
824
|
KUBERNETES_MEMORY_REQUEST: 1024Mi
|
|
767
825
|
KUBERNETES_MEMORY_LIMIT: 2048Mi
|
|
768
826
|
script:
|
|
769
|
-
-
|
|
827
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
770
828
|
- export ENV_SHORT="stage"
|
|
771
829
|
- export APP_DIR="www"
|
|
772
830
|
- export ENV_TYPE="stage"
|
|
773
831
|
- export BUILD_INFO_BUILD_ID="$(git describe --tags 2>/dev/null || git rev-parse HEAD)"
|
|
774
832
|
- export BUILD_INFO_BUILD_TIME="$CI_JOB_STARTED_AT"
|
|
775
833
|
- 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")"
|
|
776
|
-
- export
|
|
834
|
+
- export HOSTNAME="unknown-host.example.com"
|
|
777
835
|
- export ROOT_URL="https://unknown-host.example.com"
|
|
778
|
-
- export
|
|
779
|
-
- export HOST_CANONICAL="unknown-host.example.com"
|
|
836
|
+
- export HOSTNAME_INTERNAL="unknown-host.example.com"
|
|
780
837
|
- export ROOT_URL_INTERNAL="https://unknown-host.example.com"
|
|
781
|
-
- export _ALL_ENV_VAR_KEYS="[\\"ENV_SHORT\\",\\"APP_DIR\\",\\"ENV_TYPE\\",\\"BUILD_INFO_BUILD_ID\\",\\"BUILD_INFO_BUILD_TIME\\",\\"BUILD_INFO_CURRENT_VERSION\\",\\"
|
|
838
|
+
- 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\\"]"
|
|
782
839
|
- export DOCKER_REGISTRY="$CI_REGISTRY"
|
|
783
840
|
- export DOCKER_CACHE_IMAGE="$CI_REGISTRY_IMAGE/caches/www"
|
|
784
841
|
- export DOCKER_IMAGE_NAME="stage/www"
|
|
785
842
|
- export DOCKER_IMAGE="$CI_REGISTRY_IMAGE/$DOCKER_IMAGE_NAME"
|
|
786
843
|
- export DOCKER_IMAGE_TAG="$CI_COMMIT_SHA"
|
|
787
844
|
- export DEPLOY_API_KEY="$CL_stage_www_DEPLOY_API_KEY"
|
|
788
|
-
-
|
|
845
|
+
- collapseable_section_end "injectvars"
|
|
789
846
|
- cd www
|
|
790
847
|
- echo 'would deploy'
|
|
791
848
|
- echo 'Uploading SBOM to Dependency Track'
|
|
@@ -820,9 +877,9 @@ www 🧪 test:
|
|
|
820
877
|
KUBERNETES_MEMORY_LIMIT: 400Mi
|
|
821
878
|
GIT_STRATEGY: none
|
|
822
879
|
script:
|
|
823
|
-
-
|
|
880
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
824
881
|
- export DEPLOY_API_KEY="$CL_stage_www_DEPLOY_API_KEY"
|
|
825
|
-
-
|
|
882
|
+
- collapseable_section_end "injectvars"
|
|
826
883
|
- echo 'would stop'
|
|
827
884
|
- echo 'Disabling component in Dependency Track'
|
|
828
885
|
- /dtrackuploader https://dep.panter.swiss/ "$DT_KEY_PROD" disable "pan-test-app/www" "https://unknown-host.example.com" || true
|
|
@@ -851,33 +908,45 @@ www 🧪 test:
|
|
|
851
908
|
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
852
909
|
KUBERNETES_MEMORY_LIMIT: 4Gi
|
|
853
910
|
script:
|
|
854
|
-
-
|
|
911
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
855
912
|
- export ENV_SHORT="prod"
|
|
856
913
|
- export APP_DIR="www"
|
|
857
914
|
- export ENV_TYPE="prod"
|
|
858
915
|
- export BUILD_INFO_BUILD_ID="$(git describe --tags 2>/dev/null || git rev-parse HEAD)"
|
|
859
916
|
- export BUILD_INFO_BUILD_TIME="$CI_JOB_STARTED_AT"
|
|
860
917
|
- 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")"
|
|
861
|
-
- export
|
|
918
|
+
- export HOSTNAME="unknown-host.example.com"
|
|
862
919
|
- export ROOT_URL="https://unknown-host.example.com"
|
|
863
|
-
- export
|
|
864
|
-
- export HOST_CANONICAL="unknown-host.example.com"
|
|
920
|
+
- export HOSTNAME_INTERNAL="unknown-host.example.com"
|
|
865
921
|
- export ROOT_URL_INTERNAL="https://unknown-host.example.com"
|
|
866
|
-
- export _ALL_ENV_VAR_KEYS="[\\"ENV_SHORT\\",\\"APP_DIR\\",\\"ENV_TYPE\\",\\"BUILD_INFO_BUILD_ID\\",\\"BUILD_INFO_BUILD_TIME\\",\\"BUILD_INFO_CURRENT_VERSION\\",\\"
|
|
867
|
-
-
|
|
922
|
+
- 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\\"]"
|
|
923
|
+
- collapseable_section_end "injectvars"
|
|
924
|
+
- collapseable_section_start "write-dotenv-www" "write dot env for www"
|
|
925
|
+
- |-
|
|
926
|
+
cat <<EOF > www/.env
|
|
927
|
+
ENV_SHORT=prod
|
|
928
|
+
APP_DIR=www
|
|
929
|
+
ENV_TYPE=prod
|
|
930
|
+
HOSTNAME=unknown-host.example.com
|
|
931
|
+
ROOT_URL=https://unknown-host.example.com
|
|
932
|
+
HOSTNAME_INTERNAL=unknown-host.example.com
|
|
933
|
+
ROOT_URL_INTERNAL=https://unknown-host.example.com
|
|
934
|
+
_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"]
|
|
935
|
+
EOF
|
|
936
|
+
- collapseable_section_end "write-dotenv-www"
|
|
868
937
|
- echo '{"id":"$(git describe --tags 2>/dev/null || git rev-parse HEAD)","time":"$CI_JOB_STARTED_AT"}' > www/__build_info.json
|
|
869
|
-
-
|
|
938
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
870
939
|
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
871
940
|
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
872
|
-
-
|
|
941
|
+
- collapseable_section_end "nodeinstall"
|
|
873
942
|
- cd www
|
|
874
|
-
-
|
|
943
|
+
- collapseable_section_start "nodeinstall" "Ensure node version"
|
|
875
944
|
- if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi
|
|
876
945
|
- if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi
|
|
877
|
-
-
|
|
878
|
-
-
|
|
946
|
+
- collapseable_section_end "nodeinstall"
|
|
947
|
+
- collapseable_section_start "yarninstall" "Yarn install"
|
|
879
948
|
- yarn install --immutable
|
|
880
|
-
-
|
|
949
|
+
- collapseable_section_end "yarninstall"
|
|
881
950
|
- yarn build
|
|
882
951
|
cache:
|
|
883
952
|
- key: www-yarn
|
|
@@ -888,15 +957,13 @@ www 🧪 test:
|
|
|
888
957
|
policy: pull-push
|
|
889
958
|
paths:
|
|
890
959
|
- www/node_modules
|
|
891
|
-
- key: www-next-cache
|
|
892
|
-
policy: pull-push
|
|
893
|
-
paths:
|
|
894
|
-
- www/.next/cache
|
|
895
960
|
artifacts:
|
|
896
961
|
paths:
|
|
897
962
|
- www/__build_info.json
|
|
898
963
|
- www/.next
|
|
899
964
|
- www/dist
|
|
965
|
+
exclude:
|
|
966
|
+
- www/.env
|
|
900
967
|
expire_in: 1 day
|
|
901
968
|
when: always
|
|
902
969
|
reports: {}
|
|
@@ -922,7 +989,7 @@ www 🧪 test:
|
|
|
922
989
|
KUBERNETES_MEMORY_REQUEST: 1Gi
|
|
923
990
|
KUBERNETES_MEMORY_LIMIT: 2Gi
|
|
924
991
|
script:
|
|
925
|
-
-
|
|
992
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
926
993
|
- export APP_DIR="www"
|
|
927
994
|
- export DOCKER_BUILD_CONTEXT="."
|
|
928
995
|
- export DOCKER_REGISTRY="$CI_REGISTRY"
|
|
@@ -939,19 +1006,19 @@ www 🧪 test:
|
|
|
939
1006
|
COPY --chown=node:node www/yarn.lock /app/www/yarn.lock
|
|
940
1007
|
COPY --chown=node:node .yarnrc.yml /app/.yarnrc.yml
|
|
941
1008
|
COPY --chown=node:node .yarn /app/.yarn"
|
|
942
|
-
-
|
|
1009
|
+
- collapseable_section_end "injectvars"
|
|
943
1010
|
- ensureNodeDockerfile
|
|
944
|
-
-
|
|
1011
|
+
- collapseable_section_start "docker-login" "Docker Login"
|
|
945
1012
|
- docker login --username gitlab-ci-token --password $CI_JOB_TOKEN $CI_REGISTRY
|
|
946
|
-
-
|
|
947
|
-
-
|
|
1013
|
+
- collapseable_section_end "docker-login"
|
|
1014
|
+
- collapseable_section_start "docker-build" "Docker build"
|
|
948
1015
|
- docker build --network host --cache-from $DOCKER_CACHE_IMAGE --tag $DOCKER_IMAGE:$DOCKER_IMAGE_TAG -f $APP_DIR/Dockerfile $DOCKER_BUILD_CONTEXT --build-arg BUILDKIT_INLINE_CACHE=1
|
|
949
|
-
-
|
|
950
|
-
-
|
|
1016
|
+
- collapseable_section_end "docker-build"
|
|
1017
|
+
- collapseable_section_start "docker-push" "Docker push and tag"
|
|
951
1018
|
- docker push $DOCKER_IMAGE:$DOCKER_IMAGE_TAG
|
|
952
1019
|
- docker tag $DOCKER_IMAGE:$DOCKER_IMAGE_TAG $DOCKER_CACHE_IMAGE
|
|
953
1020
|
- docker push $DOCKER_CACHE_IMAGE
|
|
954
|
-
-
|
|
1021
|
+
- collapseable_section_end "docker-push"
|
|
955
1022
|
cache:
|
|
956
1023
|
- key: www-yarn
|
|
957
1024
|
policy: pull
|
|
@@ -968,8 +1035,8 @@ www 🧪 test:
|
|
|
968
1035
|
image: aquasec/trivy:0.38.3
|
|
969
1036
|
variables: {}
|
|
970
1037
|
script:
|
|
971
|
-
-
|
|
972
|
-
-
|
|
1038
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
1039
|
+
- collapseable_section_end "injectvars"
|
|
973
1040
|
- trivy fs --quiet --format cyclonedx --output "__sbom.json" www
|
|
974
1041
|
artifacts:
|
|
975
1042
|
paths:
|
|
@@ -988,26 +1055,25 @@ www 🧪 test:
|
|
|
988
1055
|
KUBERNETES_MEMORY_REQUEST: 1024Mi
|
|
989
1056
|
KUBERNETES_MEMORY_LIMIT: 2048Mi
|
|
990
1057
|
script:
|
|
991
|
-
-
|
|
1058
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
992
1059
|
- export ENV_SHORT="prod"
|
|
993
1060
|
- export APP_DIR="www"
|
|
994
1061
|
- export ENV_TYPE="prod"
|
|
995
1062
|
- export BUILD_INFO_BUILD_ID="$(git describe --tags 2>/dev/null || git rev-parse HEAD)"
|
|
996
1063
|
- export BUILD_INFO_BUILD_TIME="$CI_JOB_STARTED_AT"
|
|
997
1064
|
- 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")"
|
|
998
|
-
- export
|
|
1065
|
+
- export HOSTNAME="unknown-host.example.com"
|
|
999
1066
|
- export ROOT_URL="https://unknown-host.example.com"
|
|
1000
|
-
- export
|
|
1001
|
-
- export HOST_CANONICAL="unknown-host.example.com"
|
|
1067
|
+
- export HOSTNAME_INTERNAL="unknown-host.example.com"
|
|
1002
1068
|
- export ROOT_URL_INTERNAL="https://unknown-host.example.com"
|
|
1003
|
-
- export _ALL_ENV_VAR_KEYS="[\\"ENV_SHORT\\",\\"APP_DIR\\",\\"ENV_TYPE\\",\\"BUILD_INFO_BUILD_ID\\",\\"BUILD_INFO_BUILD_TIME\\",\\"BUILD_INFO_CURRENT_VERSION\\",\\"
|
|
1069
|
+
- 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\\"]"
|
|
1004
1070
|
- export DOCKER_REGISTRY="$CI_REGISTRY"
|
|
1005
1071
|
- export DOCKER_CACHE_IMAGE="$CI_REGISTRY_IMAGE/caches/www"
|
|
1006
1072
|
- export DOCKER_IMAGE_NAME="prod/www"
|
|
1007
1073
|
- export DOCKER_IMAGE="$CI_REGISTRY_IMAGE/$DOCKER_IMAGE_NAME"
|
|
1008
1074
|
- export DOCKER_IMAGE_TAG="$CI_COMMIT_SHA"
|
|
1009
1075
|
- export DEPLOY_API_KEY="$CL_prod_www_DEPLOY_API_KEY"
|
|
1010
|
-
-
|
|
1076
|
+
- collapseable_section_end "injectvars"
|
|
1011
1077
|
- cd www
|
|
1012
1078
|
- echo 'would deploy'
|
|
1013
1079
|
- echo 'Uploading SBOM to Dependency Track'
|
|
@@ -1042,9 +1108,9 @@ www 🧪 test:
|
|
|
1042
1108
|
KUBERNETES_MEMORY_LIMIT: 400Mi
|
|
1043
1109
|
GIT_STRATEGY: none
|
|
1044
1110
|
script:
|
|
1045
|
-
-
|
|
1111
|
+
- collapseable_section_start "injectvars" "Injecting variables"
|
|
1046
1112
|
- export DEPLOY_API_KEY="$CL_prod_www_DEPLOY_API_KEY"
|
|
1047
|
-
-
|
|
1113
|
+
- collapseable_section_end "injectvars"
|
|
1048
1114
|
- echo 'would stop'
|
|
1049
1115
|
- echo 'Disabling component in Dependency Track'
|
|
1050
1116
|
- /dtrackuploader https://dep.panter.swiss/ "$DT_KEY_PROD" disable "pan-test-app/www" "https://unknown-host.example.com" || true
|