ium_z360792/Jenkinsfile

66 lines
2.0 KiB
Plaintext
Raw Normal View History

2023-04-19 14:48:07 +02:00
pipeline {
agent any
//Definijuemy parametry, które będzie można podać podczas wywoływania zadania
parameters {
string (
defaultValue: 'kaggletests',
description: 'Kaggle username',
name: 'KAGGLE_USERNAME',
trim: false
)
password(
2023-04-19 20:37:02 +02:00
defaultValue: '',
2023-04-19 14:48:07 +02:00
description: 'Kaggle token taken from kaggle.json file, as described in https://github.com/Kaggle/kaggle-api#api-credentials',
name: 'KAGGLE_KEY'
)
string(
defaultValue: '0',
description: 'CUTOFF',
name: 'CUTOFF',
trim: false
)
}
stages {
stage('clear_all') {
steps {
//Wypisz wartość parametru w konsoli (To nie jest polecenie bash, tylko groovy!)
sh 'rm -rf *'
}
}
stage('checkout') {
steps {
//Wypisz wartość parametru w konsoli (To nie jest polecenie bash, tylko groovy!)
sh 'git clone https://git.wmi.amu.edu.pl/s360792/ium_z360792'
}
}
stage('Build') {
steps {
// Run the maven build
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
"KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
2023-04-19 21:54:58 +02:00
// sh 'kaggle datasets download -d gpreda/covid-world-vaccination-progress.zip'
// sh 'unzip covid-world-vaccination-progress.zip.zip -d ./ium_z360792'
2023-04-19 21:40:45 +02:00
2023-04-19 14:48:07 +02:00
}
}
2023-04-19 21:54:58 +02:00
}
stage('RunScript') {
steps {
//Wypisz wartość parametru w konsoli (To nie jest polecenie bash, tylko groovy!)
2023-04-19 21:58:14 +02:00
sh 'python ./ium_z360792/skrypt.py'
2023-04-19 21:54:58 +02:00
}
2023-04-19 20:28:14 +02:00
}
2023-04-19 14:48:07 +02:00
stage('Goodbye!') {
steps {
echo 'Goodbye!'
//Zarchiwizuj wynik
//archiveArtifacts 'output.txt'
archiveArtifacts 'data.csv'
}
}
}
2023-04-19 20:24:21 +02:00
}