Zad 03.Jenkins - zapisanie zbioru danych

This commit is contained in:
Cezary Gałązkiewicz 2022-03-28 00:02:52 +02:00
parent 361f5b01d7
commit 613b85705f

View File

@ -6,16 +6,22 @@ pipeline {
description: 'Kaggle username',
name: 'KAGGLE_USERNAME',
trim: false
),
password(
)
password(
defaultValue: '17eaeb44a09284608df768f4c9c8c7af',
description: 'Kaggle token taken from kaggle.json file, as described in https://github.com/Kaggle/kaggle-api#api-credentials',
name: 'KAGGLE_KEY'
)
string(
defaultValue: "1",
description: 'CUTOFF',
name: 'CUTOFF'
)
}
environment {
KAGGLE_USERNAME="$params.KAGGLE_USERNAME"
KAGGLE_KEY="$params.KAGGLE_KEY"
CUTOFF="$params.CUTOFF"
}
stages {
stage('Test stage') {
@ -25,20 +31,18 @@ pipeline {
}
stage('Checkout') {
steps {
checkout scm
checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[credentialsId: 's470623', url: 'https://git.wmi.amu.edu.pl/s470623/ium_470623.git]]])
}
}
stage('Shell script') {
steps {
script{
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
"KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
sh 'echo KAGGLE_USERNAME: $KAGGLE_USERNAME'
sh 'kaggle datasets list'
sh './download.sh'
}
archiveArtifacts 'steel_industry_data_test.csv, steel_industry_data_dev.csv, steel_industry_data_train.csv'
}
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
"KAGGLE_KEY=${params.KAGGLE_KEY}",
"CUTOFF=${params.CUTOFF}"]) {
sh 'echo KAGGLE_USERNAME: $KAGGLE_USERNAME'
sh './download.sh'
}
archiveArtifacts artifacts: 'steel_industry_data_test.csv, steel_industry_data_dev.csv, steel_industry_data_train.csv'
}
}
}