ium_434804/Jenkinsfile

39 lines
1.2 KiB
Plaintext
Raw Normal View History

2021-03-28 20:35:30 +02:00
pipeline{
2021-04-08 22:31:18 +02:00
agent {
dockerfile true
}
2021-03-28 21:00:30 +02:00
parameters {
2021-03-28 21:12:19 +02:00
string(defaultValue: '100', description: 'Number of lines to cutoff', name: 'CUTOFF', trim: false)
}
2021-03-28 20:35:30 +02:00
stages{
2021-04-08 22:31:18 +02:00
stage('Docker') {
steps {
sh 'python3 ./stats.py'
}
}
2021-03-28 20:35:30 +02:00
stage('Stage 1'){
steps{
2021-04-08 22:31:18 +02:00
echo 'Hello Jenkins!'
2021-03-28 20:35:30 +02:00
}
}
stage('checkout: Check out from version control'){
steps{
checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: '87e24204-a0e1-4840-b235-2b993c922d83', url: 'https://git.wmi.amu.edu.pl/s434804/ium_434804']]])
}
}
stage('sh: Shell Script'){
steps{
2021-03-28 21:05:05 +02:00
withEnv(["CUTOFF=${params.CUTOFF}"]) {
2021-04-08 23:09:30 +02:00
sh "chmod 777 ./data.sh"
sh "./data.sh"
2021-03-28 20:35:30 +02:00
}
2021-03-28 21:05:05 +02:00
}}
2021-03-28 20:35:30 +02:00
stage('Archive artifacts'){
steps{
archiveArtifacts 'test.csv'
2021-04-08 23:09:30 +02:00
archiveArtifacts 'validation.csv'
2021-03-28 20:35:30 +02:00
archiveArtifacts 'train.csv'
}
}
}
}