This commit is contained in:
Jakub Zaręba 2023-05-10 16:04:37 +02:00
parent 22d024f9c9
commit 26e5e32481

43
Jenkinsfile vendored
View File

@ -15,17 +15,17 @@ pipeline {
try {
properties([
parameters([
string(
defaultValue: '',
description: 'Kaggle username',
name: 'KAGGLE_USERNAME',
trim: false
),
password(
defaultValue: '',
description: 'Kaggle token taken from kaggle.json file',
name: 'KAGGLE_KEY'
),
// string(
// defaultValue: '',
// description: 'Kaggle username',
// name: 'KAGGLE_USERNAME',
// trim: false
// ),
// password(
// defaultValue: '',
// description: 'Kaggle token taken from kaggle.json file',
// name: 'KAGGLE_KEY'
// ),
string(
defaultValue: '50',
description: 'number of examples in dataset',
@ -44,10 +44,20 @@ pipeline {
steps {
script {
try {
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
"KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
sh 'echo KAGGLE_USERNAME: $KAGGLE_USERNAME'
sh '''
// withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
// "KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
// sh 'echo KAGGLE_USERNAME: $KAGGLE_USERNAME'
// sh '''
// #!/bin/bash
// pip install kaggle
// git clone https://git.wmi.amu.edu.pl/s487187/ium_487187.git
// echo "Processed Data" > output.txt
// '''
// sh "head -n ${params.CUTOFF} data.csv"
// }
sh '''
#!/bin/bash
pip install kaggle
@ -55,8 +65,7 @@ pipeline {
echo "Processed Data" > output.txt
'''
sh "head -n ${params.CUTOFF} data.csv"
}
sh "head -n ${params.CUTOFF} data.csv"
} catch (err) {
error "Failed to build: ${err.message}"
}