Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Entwicklungsportal - ARCHIVED
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
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
FIT-Connect
Entwicklungsportal - ARCHIVED
Commits
bddc01c9
Verified
Commit
bddc01c9
authored
2 years ago
by
Jonas Gröger
Browse files
Options
Downloads
Patches
Plain Diff
feat(deploy): Allow branch deployments (
planning#346
)
parent
72dd96a5
No related branches found
No related tags found
1 merge request
!2
feat(deploy): Allow branch deployments (planning#346)
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitignore
+2
-0
2 additions, 0 deletions
.gitignore
ci/gitlab-ci.yml
+51
-10
51 additions, 10 deletions
ci/gitlab-ci.yml
with
53 additions
and
10 deletions
.gitignore
+
2
−
0
View file @
bddc01c9
...
...
@@ -36,3 +36,5 @@ lerna-debug.log*
.vercel
/certificates/*
.vscode/
This diff is collapsed.
Click to expand it.
ci/gitlab-ci.yml
+
51
−
10
View file @
bddc01c9
...
...
@@ -6,9 +6,9 @@
-
echo "$UBERSPACE_KNOWN_HOST" >> ~/.ssh/known_hosts
include
:
-
project
:
'
fit-connect/pipeline
'
-
project
:
"
fit-connect/pipeline
"
ref
:
main
file
:
'
trivy.gitlab-ci.yml
'
file
:
"
trivy.gitlab-ci.yml
"
cache
:
paths
:
...
...
@@ -19,10 +19,13 @@ stages:
-
build
-
deploy
trivy-filesystem
:
extends
:
.trivy-filesystem
variables
:
DOCKER_REGISTRY_READ
:
$DOCKER_PULL_REGISTRY
variables
:
DEPLOY_SERVER
:
fitko@dorado.uberspace.de
#trivy-filesystem:
# extends: .trivy-filesystem
# variables:
# DOCKER_REGISTRY_READ: $DOCKER_PULL_REGISTRY
build
:
stage
:
build
...
...
@@ -35,16 +38,54 @@ build:
paths
:
-
out/
expire_in
:
1 hour
rules
:
-
when
:
always
deploy:review
:
stage
:
deploy
image
:
alpine:latest
environment
:
name
:
review/$CI_COMMIT_REF_NAME
on_stop
:
undeploy:review
auto_stop_in
:
1 week
url
:
https://docs-preview.fitko.dev/review/$CI_COMMIT_REF_SLUG/
needs
:
-
build
rules
:
-
if
:
$CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
before_script
:
-
*pre-deploy-uber-space-setup
script
:
-
ssh $DEPLOY_SERVER mkdir -p docs-preview.fitko.dev/review
-
rsync -rLvzc4 -e 'ssh -o CheckHostIP=no' --progress --delete ./out/. $DEPLOY_SERVER:docs-preview.fitko.dev/review/$CI_COMMIT_REF_SLUG
deploy
:
stage
:
deploy
image
:
name
:
alpine:latest
dependencies
:
image
:
alpine:latest
environment
:
name
:
live
url
:
https://docs-preview.fitko.dev/
needs
:
-
build
rules
:
-
if
:
$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
before_script
:
-
*pre-deploy-uber-space-setup
script
:
-
rsync -rLvz --delete --checksum -e "ssh -o CheckHostIP=no" --ipv4 --progress ./out/. fitko@dorado.uberspace.de:docs-preview.fitko.dev
-
rsync -rLvzc4 -e 'ssh -o CheckHostIP=no' --progress --delete ./out/. $DEPLOY_SERVER:docs-preview.fitko.dev
undeploy:review
:
stage
:
.post
image
:
alpine:latest
environment
:
name
:
review/$CI_COMMIT_REF_NAME
action
:
stop
needs
:
-
deploy:review
rules
:
-
if
:
$CI_MERGE_REQUEST_ID
when
:
manual
before_script
:
-
*pre-deploy-uber-space-setup
script
:
-
ssh $DEPLOY_SERVER "rm -rf docs-preview.fitko.dev/review/$CI_COMMIT_REF_SLUG/"
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