From dc2efb5b768d1b6fb543831facf1417162860d76 Mon Sep 17 00:00:00 2001 From: s460930 Date: Tue, 1 Dec 2020 19:46:23 +0100 Subject: [PATCH 1/3] test jenkins --- .gitignore | 1 + .idea/.gitignore | 8 -------- .idea/SmartPicasso.iml | 17 ----------------- .idea/dataSources.xml | 11 ----------- .idea/misc.xml | 6 ------ .idea/modules.xml | 8 -------- .idea/vcs.xml | 6 ------ Jenkinsfile | 11 +++++++++-- rest-app/requirements.txt | 3 +++ 9 files changed, 13 insertions(+), 58 deletions(-) delete mode 100644 .idea/.gitignore delete mode 100644 .idea/SmartPicasso.iml delete mode 100644 .idea/dataSources.xml delete mode 100644 .idea/misc.xml delete mode 100644 .idea/modules.xml delete mode 100644 .idea/vcs.xml create mode 100644 rest-app/requirements.txt diff --git a/.gitignore b/.gitignore index 3269869..3a5f20c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .idea/ +.idea/* *.iml .idea *__pycache__/ diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index 73f69e0..0000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml -# Datasource local storage ignored files -/dataSources/ -/dataSources.local.xml -# Editor-based HTTP Client requests -/httpRequests/ diff --git a/.idea/SmartPicasso.iml b/.idea/SmartPicasso.iml deleted file mode 100644 index fdf8ca2..0000000 --- a/.idea/SmartPicasso.iml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/dataSources.xml b/.idea/dataSources.xml deleted file mode 100644 index 16e6268..0000000 --- a/.idea/dataSources.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - sqlite.xerial - true - org.sqlite.JDBC - jdbc:sqlite:$PROJECT_DIR$/rest-app/db.sqlite3 - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index 1763e15..0000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index c2ddc48..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 35eb1dd..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/Jenkinsfile b/Jenkinsfile index 00a16af..b1e3fad 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -2,10 +2,17 @@ pipeline { agent any stages { + stage('Build') { + steps { + sh 'cd rest-app' + sh 'pip3 install -r requirements.txt' + } + } stage('Test') { steps { - echo 'Test pipeline' + sh 'cd rest-app' + sh 'python3 manage.py test' } } } -} \ No newline at end of file +} diff --git a/rest-app/requirements.txt b/rest-app/requirements.txt new file mode 100644 index 0000000..9bacae0 --- /dev/null +++ b/rest-app/requirements.txt @@ -0,0 +1,3 @@ +django +djangorestframework +djangorestframework-jwt From 534a7865c43d63edff9a0f2136cc48eea3857b76 Mon Sep 17 00:00:00 2001 From: s460930 Date: Tue, 1 Dec 2020 19:59:11 +0100 Subject: [PATCH 2/3] test jenkins --- Jenkinsfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index b1e3fad..421d167 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -5,6 +5,8 @@ pipeline { stage('Build') { steps { sh 'cd rest-app' + sh 'virtualenv venv' + sh '. venv/bin/activate' sh 'pip3 install -r requirements.txt' } } From fd1432e89a62211ccf6fcec1c96de567fdc6cbd6 Mon Sep 17 00:00:00 2001 From: s460930 Date: Tue, 1 Dec 2020 20:06:24 +0100 Subject: [PATCH 3/3] test jenkins --- Jenkinsfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 421d167..ef64cbb 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,7 +4,9 @@ pipeline { stages { stage('Build') { steps { + sh 'pwd' sh 'cd rest-app' + sh 'pwd' sh 'virtualenv venv' sh '. venv/bin/activate' sh 'pip3 install -r requirements.txt'