-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
26 lines (22 loc) · 935 Bytes
/
Jenkinsfile
File metadata and controls
26 lines (22 loc) · 935 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
pipeline {
agent { docker { image 'Jenkinsfile_Docker_App_Image()' } }
stages {
stage('install') {
steps {
sh sudo python -m pip install --upgrade pip
sh sudo pip install --upgrade pip
sh sudo pip install pipenv
sh sudo pipenv install
sh sudo pipenv install Django==2.2
sh sudo pipenv install pytest-django
}
stage('build') {
steps {
sh [ $EUID == 0 ] && SUDO=" || SUDO=sudo && $SUDO chown -R circleci:circleci /usr/local/bin
sh [ $EUID == 0 ] && SUDO=" || SUDO=sudo && $SUDO chown -R circleci:circleci /usr/local/lib/python3.7/site-packages
sh sudo pipenv run pytest --junitxml=test-results/junit.xml djangodemo/tests
sh sudo python djangodemo/setup.py sdist
}
}
}
}