Zad 03.Jenkins - zapisanie zbioru danych

This commit is contained in:
Cezary Gałązkiewicz 2022-03-28 00:27:04 +02:00
parent 755f06f6be
commit 5ea29fe4d6

View File

@ -8,20 +8,14 @@ pipeline {
trim: false trim: false
) )
password( password(
defaultValue: '', defaultValue: 'c70ff184133bfabb351608b128e76cd2',
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(
defaultValue: "1",
description: 'CUTOFF',
name: 'CUTOFF'
)
} }
environment { environment {
KAGGLE_USERNAME="$params.KAGGLE_USERNAME" KAGGLE_USERNAME="$params.KAGGLE_USERNAME"
KAGGLE_KEY="$params.KAGGLE_KEY" KAGGLE_KEY="$params.KAGGLE_KEY"
CUTOFF="$params.CUTOFF"
} }
stages { stages {
stage('Test stage') { stage('Test stage') {
@ -37,13 +31,11 @@ pipeline {
stage('Shell script') { stage('Shell script') {
steps { steps {
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
"KAGGLE_KEY=${params.KAGGLE_KEY}", "KAGGLE_KEY=${params.KAGGLE_KEY}"]) {
"CUTOFF=${params.CUTOFF}"]) { sh "echo KAGGLE_USERNAME: $KAGGLE_USERNAME"
sh 'echo KAGGLE_USERNAME: $KAGGLE_USERNAME' sh "./download.sh"
sh 'echo KAGGLE_KEY: KAGGLE_KEY' archiveArtifacts artifacts: "steel_industry_data_test.csv, steel_industry_data_dev.csv, steel_industry_data_train.csv", onlyIfSuccessful: true
sh './download.sh' }
}
archiveArtifacts artifacts: 'steel_industry_data_test.csv, steel_industry_data_dev.csv, steel_industry_data_train.csv'
} }
} }
} }