Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
teckids.org
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Operate
Environments
Monitor
Incidents
Service Desk
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Teckids
Team PR
teckids.org
Merge requests
!50
Add k8s deployment
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Add k8s deployment
deployment
into
master
Overview
0
Commits
32
Pipelines
52
Changes
1
Merged
Tom Teichler
requested to merge
deployment
into
master
11 months ago
Overview
0
Commits
32
Pipelines
52
Changes
1
Expand
0
0
Merge request reports
Viewing commit
e2eb0ad9
Show latest version
1 file
+
7
−
31
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Verified
e2eb0ad9
debug
· e2eb0ad9
Tom Teichler
authored
11 months ago
.gitlab-ci.yml
+
74
−
1
Options
@@ -16,7 +16,7 @@ zola check:
script
:
-
zola check
docker
build
:
.
build
:
stage
:
build
interruptible
:
true
image
:
@@ -28,5 +28,78 @@ docker build:
--context $CI_PROJECT_DIR
--dockerfile $CI_PROJECT_DIR/Dockerfile
--destination $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
--digest-file DIGESTFILE
--build-arg BASE_URL=$BASE_URL
--cache=true
--cleanup
artifacts
:
paths
:
-
DIGESTFILE
build production
:
extends
:
.build
only
:
-
master
build review
:
extends
:
.build
variables
:
BASE_URL
:
https://$CI_COMMIT_REF_SLUG.review.teckids.org
only
:
-
merge_requests
.deploy
:
stage
:
deploy
image
:
line/kubectl-kustomize:latest
tags
:
-
teckids-trusted
before_script
:
-
echo $KUBECONFIG | base64 -d > /tmp/kubeconfig
deploy production
:
extends
:
.deploy
environment
:
name
:
production
url
:
https://teckids.org
script
:
-
cd deploy/overlays/production
-
kustomize edit set image registry.edugit.org/teckids/team-pr/teckids.org:$CI_COMMIT_REF_NAME@$(cat ../../../DIGESTFILE)
-
kustomize build > output.yaml
-
kubectl --kubeconfig=/tmp/kubeconfig apply -f output.yaml
only
:
-
master
deploy review
:
extends
:
.deploy
script
:
deploy_review
environment
:
name
:
review/$CI_COMMIT_REF_SLUG
url
:
https://$CI_COMMIT_REF_SLUG.review.teckids.org
on_stop
:
delete review
auto_stop_in
:
3 days
only
:
-
merge_requests
when
:
manual
script
:
-
cd deploy/overlays/review
-
kustomize edit set image registry.edugit.org/teckids/team-pr/teckids.org:$CI_COMMIT_REF_NAME@$(cat ../../../DIGESTFILE)
-
kustomize edit set nameprefix $CI_COMMIT_REF_SLUG
-
kustomize build | sed s/__REVIEW_NAME__/$CI_COMMIT_REF_SLUG/g > output.yaml
-
kubectl --kubeconfig=/tmp/kubeconfig apply -f output.yaml
delete review
:
extends
:
.deploy
script
:
delete_review
environment
:
name
:
review/$CI_COMMIT_REF_SLUG
action
:
stop
before_script
:
-
echo $KUBECONFIG | base64 -d > /tmp/kubeconfig
-
cd deploy/overlays/review
-
kustomize build | sed s/__REVIEW_NAME__/$CI_COMMIT_REF_SLUG/g > output.yaml
script
:
-
kubectl --kubeconfig=/tmp/kubeconfig delete -f output.yaml
when
:
manual
only
:
-
merge_requests
Loading