Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
ViaResto-website
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
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Aymeric Chaumont
ViaResto-website
Merge requests
!34
add staging deployment to CI
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
add staging deployment to CI
staging-ci
into
main
Overview
0
Commits
11
Pipelines
10
Changes
1
Merged
Aymeric Chaumont
requested to merge
staging-ci
into
main
3 years ago
Overview
0
Commits
11
Pipelines
10
Changes
1
0
0
Merge request reports
Viewing commit
30e8b4a1
Prev
Next
Show latest version
1 file
+
31
−
2
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
30e8b4a1
add staging deployment to CI
· 30e8b4a1
Aymeric Chaumont
authored
3 years ago
.gitlab-ci.yml
+
31
−
2
View file @ 30e8b4a1
Edit in single-file editor
Open in Web IDE
Show full file
@@ -161,8 +161,8 @@ lint-front:
@@ -161,8 +161,8 @@ lint-front:
docker-compose up -d &&
docker-compose up -d &&
exit" ; else
exit" ; else
-
cd ./frontend
-
cd ./frontend
-
echo 'REACT_APP_BASE_URL_BACK="https://
eatfast.cs-campus.fr
/api"' > .env;
-
echo 'REACT_APP_BASE_URL_BACK="https://
$DOMAIN
/api"' > .env;
-
echo 'REACT_APP_BASE_URL_FRONT="https://
eatfast.cs-campus.fr
"' >> .env;
-
echo 'REACT_APP_BASE_URL_FRONT="https://
$DOMAIN
"' >> .env;
-
npm run build;
-
npm run build;
-
scp -r build/ eatfast@"$DOMAIN":/var/www/eatfast-website/frontend ; fi
-
scp -r build/ eatfast@"$DOMAIN":/var/www/eatfast-website/frontend ; fi
@@ -200,3 +200,32 @@ deploy-front-prod:
@@ -200,3 +200,32 @@ deploy-front-prod:
IMAGE
:
"
front"
IMAGE
:
"
front"
dependencies
:
dependencies
:
-
install-npm-packages
-
install-npm-packages
deploy-back-staging
:
extends
:
.deploy
rules
:
-
if
:
$CI_PIPELINE_SOURCE == "merge_request_event"
when
:
never
-
if
:
$CI_COMMIT_BRANCH
when
:
always
variables
:
DOMAIN
:
eatfast.test.cs-campus.fr
PRIVATE_KEY
:
"
$SSH_PRIVATE_KEY"
IMAGE
:
"
back"
dependencies
:
[]
deploy-front-staging
:
extends
:
.deploy
rules
:
-
if
:
$CI_PIPELINE_SOURCE == "merge_request_event"
when
:
never
-
if
:
$CI_COMMIT_BRANCH
when
:
always
variables
:
DOMAIN
:
eatfast.test.cs-campus.fr
PRIVATE_KEY
:
"
$SSH_PRIVATE_KEY"
IMAGE
:
"
front"
dependencies
:
-
install-npm-packages
Loading