Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
c-sudoku
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
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
GitLab upgrade completed. Current version is 17.11.3.
Show more breadcrumbs
concordant
Software
c-sudoku
Commits
c5c7b72d
Commit
c5c7b72d
authored
4 years ago
by
Yannick Li
Browse files
Options
Downloads
Patches
Plain Diff
CI: Setup automatic website deployment
parent
074c5d4a
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!24
Resolve "Release v1.0.1"
,
!21
Resolve "Deploy to website"
Pipeline
#242094
passed
4 years ago
Stage: single-player-pipeline
Stage: collaborative-pipeline
Pipeline: c-sudoku
#242096
Pipeline: c-sudoku
#242095
Changes
1
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
collaborative/.gitlab-ci.yml
+85
-1
85 additions, 1 deletion
collaborative/.gitlab-ci.yml
with
85 additions
and
1 deletion
collaborative/.gitlab-ci.yml
+
85
−
1
View file @
c5c7b72d
...
...
@@ -3,6 +3,8 @@ image: node:14.16.0
stages
:
-
build
-
test
-
predeploy
-
deploy
cache
:
&global_cache
# per-branch cache
key
:
${CI_COMMIT_REF_SLUG}
...
...
@@ -60,4 +62,86 @@ test:
coverage
:
/All files[^|]*\|[^|]*\s+([\d\.]+)/
artifacts
:
paths
:
-
coverage/
-
collaborative/coverage/
# Filter out node_modules from build artifacts to speed up deploy.
# Gitlab 13.10 will allow to use multiple cache instead.
pre-deploy
:
stage
:
predeploy
rules
:
-
if
:
"
$CI_COMMIT_BRANCH"
# use only artifacts from build job
dependencies
:
-
build
# cache is not needed: don't download
cache
:
{}
# don't download repository content
variables
:
GIT_STRATEGY
:
none
artifacts
:
paths
:
-
collaborative/build/
# script is required
script
:
-
echo Exporting collaborative/build/…
deploy_review
:
stage
:
deploy
rules
:
-
if
:
"
$CI_COMMIT_BRANCH"
tags
:
-
webserver
environment
:
name
:
review/$CI_COMMIT_REF_NAME
url
:
https://demo.concordant.io/c-sudoku_${CI_ENVIRONMENT_SLUG}/
on_stop
:
stop_review
# use only artifacts from pre-deploy job
dependencies
:
-
pre-deploy
# cache and repository art not needed: don't download
cache
:
{}
variables
:
GIT_STRATEGY
:
none
script
:
-
rm -rf /var/www/demo.concordant.io/html/c-sudoku_${CI_ENVIRONMENT_SLUG}
-
mv collaborative/build /var/www/demo.concordant.io/html/c-sudoku_${CI_ENVIRONMENT_SLUG}
stop_review
:
stage
:
deploy
rules
:
-
if
:
"
$CI_COMMIT_BRANCH"
when
:
manual
allow_failure
:
true
tags
:
-
webserver
environment
:
name
:
review/$CI_COMMIT_REF_NAME
action
:
stop
# artifacts, cache and repository are not needed: don't download
dependencies
:
[]
cache
:
{}
variables
:
GIT_STRATEGY
:
none
script
:
-
rm -rf /var/www/demo.concordant.io/html/c-sudoku_${CI_ENVIRONMENT_SLUG}
deploy_live
:
stage
:
deploy
rules
:
-
if
:
'
$CI_COMMIT_BRANCH
==
"master"'
when
:
manual
tags
:
-
webserver
environment
:
name
:
live
url
:
https://demo.concordant.io/c-sudoku/
# use only artifacts from pre-deploy job
dependencies
:
-
pre-deploy
# cache and repository art not needed: don't download
cache
:
{}
variables
:
GIT_STRATEGY
:
none
script
:
-
rm -rf /var/www/demo.concordant.io/html/c-sudoku
-
mv collaborative/build /var/www/demo.concordant.io/html/c-sudoku
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