From 1224e35bfe3fe20ada851ab3292fd6af44244e90 Mon Sep 17 00:00:00 2001 From: s460930 Date: Tue, 1 Dec 2020 19:46:23 +0100 Subject: [PATCH] build and test django in Jenkinsfile --- .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