Jenkinsfile test

This commit is contained in:
Anna Nowak 2021-04-11 22:19:45 +02:00
parent cbdebbbd53
commit 28d6a255fa
2 changed files with 26 additions and 41 deletions

View File

@ -7,4 +7,3 @@ COPY ["requirements.txt", "./"]
RUN pip3 install -r requirements.txt RUN pip3 install -r requirements.txt
COPY ["Zadanie 1.py", "."] COPY ["Zadanie 1.py", "."]
CMD python3.8 "Zadanie 1.py"

28
Jenkinsfile vendored
View File

@ -1,5 +1,7 @@
pipeline { pipeline {
agent any agent {
docker { image 'adnovac/ium_s434760:latest' }
}
parameters{ parameters{
string( string(
defaultValue: 'annadnowak', defaultValue: 'annadnowak',
@ -12,26 +14,13 @@ pipeline {
description: 'Kaggle token taken from kaggle.json file, as described in https://github.com/Kaggle/kaggle-api#api-credentials', description: 'Kaggle token taken from kaggle.json file, as described in https://github.com/Kaggle/kaggle-api#api-credentials',
name: 'KAGGLE_KEY' name: 'KAGGLE_KEY'
) )
string( stage('docker: Download artifacts')
defaultValue: '10',
description: 'CUTOFF',
name: 'CUTOFF'
)
}
stages {
stage('checkout: Check out from version control') {
steps {
git 'https://git.wmi.amu.edu.pl/s434760/ium_434760.git'
}
}
stage('sh: Shell Script')
{ {
steps { steps {
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
"KAGGLE_KEY=${params.KAGGLE_KEY}", "CUTOFF=${params.CUTOFF}"]) { "KAGGLE_KEY=${params.KAGGLE_KEY}") {
sh "chmod 777 ./script.sh" sh 'python3.8 \"Zadanie 1.py\"'
sh './script.sh' }
} }
} }
} }
@ -40,7 +29,4 @@ pipeline {
archiveArtifacts 'test.csv,data_shuf.csv,validation.csv,train.csv,header.csv' archiveArtifacts 'test.csv,data_shuf.csv,validation.csv,train.csv,header.csv'
} }
} }
}
} }
//docker run -e KAGGLE_KEY -e KAGGLE_USERNAME -ti ium_434760:latest