ium_s449288/Jenkinsfile

44 lines
1.2 KiB
Plaintext
Raw Normal View History

2022-03-21 11:07:28 +01:00
pipeline {
2022-04-02 12:46:36 +02:00
agent{
dockerfile true
}
2022-03-25 22:11:08 +01:00
parameters{
string(
defaultValue: 'kaerde',
description: 'Kaggle username',
name: 'KAGGLE_USERNAME',
trim: false
)
password(
defaultValue: '36b8c984addfb7a043d772a9c6b23a1f',
description: 'Kaggle token taken from kaggle.json file, as described in https://github.com/Kaggle/kaggle-api#api-credentials',
name: 'KAGGLE_KEY'
)
string(
defaultValue: '130000',
2022-03-25 22:19:55 +01:00
description: 'data file cutoff threshold',
2022-03-25 22:11:08 +01:00
name: 'CUTOFF'
)
}
2022-03-21 11:07:28 +01:00
stages {
stage('Stage 1') {
steps {
2022-03-25 21:06:17 +01:00
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
"KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
2022-03-25 22:19:55 +01:00
echo 'Checking out...'
2022-03-25 21:06:17 +01:00
checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[credentialsId: 'f695fe86-8cca-47f7-a546-d3bfd1059fd4', url: 'https://git.wmi.amu.edu.pl/s449288/ium_s449288.git']]])
2022-03-25 22:22:15 +01:00
echo 'Checked out'
2022-03-25 22:19:55 +01:00
echo 'Launching data processing script...'
2022-03-25 22:15:04 +01:00
sh 'chmod u+x ./skrypt.sh'
2022-04-02 13:49:34 +02:00
sh 'ls -a /root/'
2022-03-25 21:06:17 +01:00
sh './skrypt.sh $CUTOFF'
2022-03-25 22:22:15 +01:00
echo 'Data processed'
2022-03-25 22:32:28 +01:00
echo 'Archiving results...'
2022-03-25 22:16:06 +01:00
archiveArtifacts 'lego_sets.tar.gz'
2022-03-25 22:22:15 +01:00
echo 'Results archived'
2022-03-25 21:06:17 +01:00
}
2022-03-21 11:07:28 +01:00
}
2022-03-25 21:06:17 +01:00
}
2022-03-21 11:07:28 +01:00
}
}