ium_430705/Jenkinsfile

39 lines
1.2 KiB
Plaintext
Raw Normal View History

2021-03-28 20:26:06 +02:00
pipeline{
2021-04-08 22:00:01 +02:00
agent {
dockerfile true
}
2021-03-28 20:45:38 +02:00
parameters {
string(defaultValue: '5', description: 'Amount of lines to cut off the file.', name: 'CUTOFF', trim: false)
}
2021-03-28 20:26:06 +02:00
stages{
2021-04-08 22:05:15 +02:00
stage('Test') {
steps {
2021-04-08 22:28:59 +02:00
sh 'python3 ./script2.py'
2021-04-08 22:05:15 +02:00
}
}
2021-03-28 20:26:06 +02:00
stage('Stage 1'){
steps{
echo 'Hello World!'
}
}
stage('checkout: Check out from version control'){
steps{
checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: '3e2b5ea1-7a08-4418-892b-c562315036a4', url: 'https://git.wmi.amu.edu.pl/s430705/ium_430705']]])
}
}
stage('sh: Shell Script'){
steps{
2021-03-28 20:54:54 +02:00
withEnv(["CUTOFF=${params.CUTOFF}"]) {
2021-03-28 20:43:31 +02:00
sh "chmod 777 ./script.sh"
sh "./script.sh"
2021-03-28 20:26:06 +02:00
}
2021-03-28 20:54:54 +02:00
}}
2021-03-28 20:26:06 +02:00
stage('Archive artifacts'){
steps{
archiveArtifacts 'test.csv'
archiveArtifacts 'dev.csv'
archiveArtifacts 'train.csv'
2021-03-28 19:14:52 +02:00
}
}
}
}