Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Q
query-service
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GraphPolaris
Microservices
query-service
Commits
77e1cd3b
Commit
77e1cd3b
authored
3 years ago
by
thijsheijden
Browse files
Options
Downloads
Patches
Plain Diff
Changed pipeline as this service has two deployments
parent
5aa933dc
No related branches found
No related tags found
2 merge requests
!6
End of SWP 2 Merge
,
!3
Draft: time tracking
Pipeline
#108224
passed
3 years ago
Stage: test
Stage: docker
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+3
-8
3 additions, 8 deletions
.gitlab-ci.yml
with
3 additions
and
8 deletions
.gitlab-ci.yml
+
3
−
8
View file @
77e1cd3b
...
...
@@ -149,13 +149,8 @@ deploy:
-
ssh -fN -L 1234:science-vs260.science.uu.nl:22 sivan@up.science.uu.nl
# Copy kubernetes files over
-
scp -r -o StrictHostKeyChecking=no -P 1234 -i ~/.ssh/id_rsa deployments/* root@localhost:/root/kubernetes/$CI_PROJECT_NAME
# Deploy all yml files
# Remove old deployment
-
ssh -p 1234 -i ~/.ssh/id_rsa root@localhost "kubectl delete -f kubernetes/$CI_PROJECT_NAME/"
# Apply new deployment
-
ssh -p 1234 -i ~/.ssh/id_rsa root@localhost "kubectl apply -f kubernetes/$CI_PROJECT_NAME/"
# Set deployment image to the image we just made
-
if [[ ! -z $CI_COMMIT_BRANCH+x ]]; then DOCKER_TAG=$CI_COMMIT_BRANCH; else DOCKER_TAG=$CI_MERGE_REQUEST_TARGET_BRANCH_NAME; fi
# Restart the deployment if the image is not changed
-
ssh -p 1234 -i ~/.ssh/id_rsa root@localhost "if kubectl set image deployment/$DEPLOYMENT_NAME $DEPLOYMENT_NAME=datastropheregistry.azurecr.io/$CI_PROJECT_NAME:$DOCKER_TAG | grep -q "image updated";
then
kubectl rollout restart deployment/$DEPLOYMENT_NAME;
fi"
dependencies
:
[]
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment