Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ensembl-web
ensembl-client
Commits
6a5c6050
Unverified
Commit
6a5c6050
authored
Jul 16, 2021
by
Kamal Dodiya
Committed by
GitHub
Jul 16, 2021
Browse files
[ENSWBSITES-648] CI/CD job to publish static assets to k8s PVC (#528)
parent
0ebb4ac3
Pipeline
#176001
passed with stages
in 4 minutes and 50 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
85 additions
and
3 deletions
+85
-3
.gitlab-ci.yml
.gitlab-ci.yml
+85
-3
No files found.
.gitlab-ci.yml
View file @
6a5c6050
...
...
@@ -36,12 +36,17 @@ variables:
-
npm run test
-
npm run build
after_script
:
-
echo "BUILD_JOB_ID=${CI_JOB_ID}" >> build_static.env
artifacts
:
name
:
build_artifacts
paths
:
-
src/ensembl/dist/
-
src/ensembl/package.json
-
src/ensembl/package-lock.json
-
src/ensembl/dist/
-
src/ensembl/package.json
-
src/ensembl/package-lock.json
reports
:
dotenv
:
build_static.env
# Template to build nginx docker image for WP k8s cluster
# WP k8s cluster uses ingress
...
...
@@ -66,6 +71,23 @@ variables:
-
docker rmi ${CONTAINER_IMAGE}
-
docker logout $CI_REGISTRY
.publish_assets
:
image
:
dockerhub.ebi.ac.uk/ensembl-web/deploy-tools:0.5
stage
:
deploy
environment
:
name
:
jobs/k8s-job
before_script
:
-
git clone https://gitlab.ebi.ac.uk/ensembl-web/ensembl-k8s-manifests.git
-
git -C ensembl-k8s-manifests/ checkout wp-k8s
-
cd ensembl-k8s-manifests
script
:
-
sed -i "s#<PROJECT_ID>#${CI_PROJECT_ID}#g" static_assets_copy_job.yaml
-
sed -i "s#<JOB_ID>#${BUILD_JOB_ID}#g" static_assets_copy_job.yaml
-
kustomize edit set namesuffix -- -${CI_PROJECT_ID}-${BUILD_JOB_ID}
-
kubectl apply -k .
# Template to build node docker image for WP k8s cluster
# WP k8s cluster uses ingress
.build-node
:
...
...
@@ -286,6 +308,16 @@ Staging:HX:
-
Nginx:Staging
-
Node:Staging
Pub:Staging-HX:
extends
:
.publish_assets
environment
:
name
:
wp-hx-staging
only
:
-
dev
needs
:
-
Test_N_Build
-
Node:Staging
# Job to deploy to staging environment (WP-HL k8s cluster)
Staging:HL:
extends
:
.deploy
...
...
@@ -298,6 +330,16 @@ Staging:HL:
-
Nginx:Staging
-
Node:Staging
Pub:Staging-HL:
extends
:
.publish_assets
environment
:
name
:
wp-hh-staging
only
:
-
dev
needs
:
-
Test_N_Build
-
Node:Staging
# Job to deploy to live environment (WP-HX k8s cluster)
Live:HX:
extends
:
.deploy
...
...
@@ -313,6 +355,16 @@ Live:HX:
-
Nginx:Live
-
Node:Live
Pub:Live-HX:
extends
:
.publish_assets
environment
:
name
:
wp-hx-live
only
:
-
master
needs
:
-
Test_N_Build
-
Node:Live
# Job to deploy to live environment (WP-HL k8s cluster)
Live:HL:
extends
:
.deploy
...
...
@@ -328,6 +380,16 @@ Live:HL:
-
Nginx:Live
-
Node:Live
Pub:Live-HL:
extends
:
.publish_assets
environment
:
name
:
wp-hh-live
only
:
-
master
needs
:
-
Test_N_Build
-
Node:Live
# Job to deploy to internal environment (WP-HX k8s cluster)
Internal:HX:
extends
:
.deploy
...
...
@@ -343,6 +405,16 @@ Internal:HX:
-
Nginx:Internal
-
Node:Internal
Pub:Internal-HX:
extends
:
.publish_assets
environment
:
name
:
wp-hx-internal
only
:
-
master
needs
:
-
Test_N_Build:internal
-
Node:Internal
# Job to deploy to internal environment (WP-HL k8s cluster)
Internal:HL:
extends
:
.deploy
...
...
@@ -358,6 +430,16 @@ Internal:HL:
-
Nginx:Internal
-
Node:Internal
Pub:Internal-HL:
extends
:
.publish_assets
environment
:
name
:
wp-hh-internal
only
:
-
master
needs
:
-
Test_N_Build:internal
-
Node:Internal
Review:HX:
extends
:
.deploy-review
variables
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment