ium_495719/Jenkinsfile

53 lines
1.4 KiB
Plaintext
Raw Normal View History

2024-03-20 14:29:43 +01:00
pipeline {
agent any
2024-03-20 15:12:02 +01:00
2024-03-27 01:55:00 +01:00
parameters {
string(
defaultValue: '',
description: 'Kaggle username',
name: 'KAGGLE_USERNAME',
trim: false
2024-03-27 01:57:46 +01:00
)
2024-03-27 01:55:00 +01:00
password(
defaultValue: '',
description: 'Kaggle token taken from kaggle.json file, as described in https://github.com/Kaggle/kaggle-api#api-credentials',
name: 'KAGGLE_KEY'
)
2024-03-27 02:06:32 +01:00
string(
defaultValue: '50',
description: 'number of truncated examples',
name: 'CUTOFF'
)
2024-03-27 01:55:00 +01:00
}
2024-03-20 14:29:43 +01:00
stages {
2024-03-27 01:48:16 +01:00
stage('Git') {
2024-03-20 14:29:43 +01:00
steps {
2024-03-27 01:33:18 +01:00
git(
url: "https://git.wmi.amu.edu.pl/s495719/ium_495719.git",
branch: "main"
)
2024-03-27 01:48:16 +01:00
}
}
stage('Shell') {
steps {
2024-03-27 01:38:37 +01:00
sh 'chmod 777 ./data_processing.sh'
2024-03-27 02:06:32 +01:00
sh './data_processing.sh ${params.CUTOFF}'
2024-03-27 01:48:16 +01:00
}
}
stage('Artifacts') {
steps {
2024-03-27 01:42:33 +01:00
archiveArtifacts artifacts: 'processed_data.txt'
2024-03-20 14:29:43 +01:00
}
}
2024-03-27 01:55:00 +01:00
stage('Kaggle') {
2024-03-27 01:59:51 +01:00
steps {
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
"KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
sh 'echo KAGGLE_USERNAME: $KAGGLE_USERNAME'
sh 'kaggle datasets list'
}
2024-03-27 01:55:00 +01:00
}
}
2024-03-20 14:29:43 +01:00
}
}