Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
rp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
15
Issues
15
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
La Quadrature du Net
rpteam
rp
Commits
cab8d3a2
Commit
cab8d3a2
authored
May 18, 2017
by
okhin
🚴
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ci-cd-branch' into 'rp2'
Ci cd branch See merge request
!5
parents
17abbc2c
2dbc2daf
Pipeline
#1049
passed with stages
in 2 minutes and 34 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
1 deletion
+44
-1
.gitlab-ci.yml
.gitlab-ci.yml
+44
-1
No files found.
.gitlab-ci.yml
View file @
cab8d3a2
...
...
@@ -3,7 +3,8 @@ variables:
cache
:
paths
:
-
"
$CI_PROJECT_DIR/pip-cache"
-
"
pip-cache"
-
"
env"
key
:
"
$CI_PROJECT_ID"
stages
:
...
...
@@ -23,4 +24,46 @@ unit tests:
-
echo "SECRET_KEY = '$(pwgen 20 1)'" >> ./project/settings/env.py
-
./manage.py migrate
-
pytest apps/ --cov=apps/
artifacts
:
paths
:
-
env/
expire_in
:
1 day
tags
:
[
preprod
]
static build
:
stage
:
build
script
:
-
virtualenv -p python3 env
-
source ./env/bin/activate
-
pip install -r requirements.txt
-
yarn install
-
webpack
-
echo "DEBUG = False" > ./project/settings/env.py
-
echo "SECRET_KEY = '$(pwgen 20 1)'" >> ./project/settings/env.py
-
./manage.py collectstatic
tags
:
[
preprod
]
dependencies
:
-
unit tests
artifacts
:
paths
:
-
static/
expire_in
:
1 day
deploy preprod
:
variables
:
BASE_PATH
:
/srv/rp2/src/
VIRTUALENV
:
/srv/rp2/rp2-env
stage
:
deploy
script
:
-
rsync --exclude 'env' --exclude 'pip-cache' --exclude '.git' -ruv ./ ${BASE_PATH}
-
source ${VIRTUALENV}/bin/activate
-
pip install --upgrade pip
-
pip install --upgrade -r requirements.txt
-
pip install --upgrade -r requirements-dev.txt
-
echo "DEBUG = True" > ${BASE_PATH}/project/settings/env.py
-
echo "SECRET_KEY = '$(pwgen 20 1)'" >> ${BASE_PATH}/project/settings/env.py
-
${BASE_PATH}/manage.py migrate
-
touch ${BASE_PATH}/ready
only
:
-
rp2
tags
:
[
preprod
]
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment