ium_z487177/Jenkinsfile-create-dataset

51 lines
1.4 KiB
Plaintext
Raw Normal View History

2023-04-16 16:35:06 +02:00
pipeline {
2023-04-19 19:10:17 +02:00
agent any
2023-04-19 19:57:29 +02:00
parameters {
string(
defaultValue: 'reyvan123',
description: 'Kaggle username',
name: 'KAGGLE_USERNAME',
trim: false
)
password(
defaultValue: '',
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,3,4',
description: 'Column indices to remove',
name: 'CUT',
trim: false
)
2023-04-19 20:17:55 +02:00
string(
defaultValue: '100',
description: 'Cutoff size for the dataset (number of first/random examples)',
name: 'CUTOFF',
trim: false
)
2023-04-19 19:57:29 +02:00
}
2023-04-19 19:10:17 +02:00
stages {
2023-04-19 19:55:15 +02:00
stage('checkout: Check out from version control') {
2023-04-19 19:10:17 +02:00
steps {
2023-04-19 19:55:15 +02:00
checkout scm
2023-04-19 19:10:17 +02:00
}
}
2023-04-19 19:55:15 +02:00
stage('sh: Shell Script') {
2023-04-19 19:22:54 +02:00
steps {
2023-04-19 19:55:15 +02:00
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
"KAGGLE_KEY=${params.KAGGLE_KEY}",
2023-04-19 20:17:55 +02:00
"CUT=${params.CUT}",
"CUTOFF=${params.CUTOFF}" ]) {
2023-04-19 19:34:52 +02:00
sh 'chmod +x script.sh'
sh './script.sh'
2023-04-19 20:10:53 +02:00
archiveArtifacts artifacts: 'output.txt.gz', fingerprint: true
2023-04-19 19:34:52 +02:00
}
2023-04-19 20:10:53 +02:00
2023-04-19 19:10:17 +02:00
}
}
}
2023-04-19 19:55:15 +02:00
}