2022-03-24 17:03:41 +01:00
|
|
|
pipeline {
|
2022-05-06 17:08:30 +02:00
|
|
|
agent {
|
|
|
|
docker { image 'ubuntu:latest' }
|
|
|
|
}
|
2022-05-03 22:12:13 +02:00
|
|
|
|
2022-05-06 17:08:30 +02:00
|
|
|
parameters{
|
2022-03-24 21:12:58 +01:00
|
|
|
buildSelector(
|
|
|
|
defaultSelector: lastSuccessful(),
|
2022-05-06 17:08:30 +02:00
|
|
|
name: 'BUILD_SELECTOR',
|
|
|
|
description: 'Build selector for Copy artifact'
|
2022-03-24 21:12:58 +01:00
|
|
|
)
|
2022-05-06 17:08:30 +02:00
|
|
|
}
|
2022-03-24 21:12:58 +01:00
|
|
|
|
|
|
|
|
2022-05-06 17:08:30 +02:00
|
|
|
stages {
|
2022-03-24 21:12:58 +01:00
|
|
|
stage("Check out from version control") {
|
2022-05-06 17:08:30 +02:00
|
|
|
steps {
|
|
|
|
checkout scm
|
|
|
|
}
|
2022-03-24 21:12:58 +01:00
|
|
|
}
|
2022-05-06 17:08:30 +02:00
|
|
|
|
|
|
|
|
2022-03-24 21:12:58 +01:00
|
|
|
stage("Shell Script") {
|
2022-05-06 17:08:30 +02:00
|
|
|
steps {
|
|
|
|
copyArtifacts(
|
|
|
|
fingerprintArtifacts: true,
|
|
|
|
projectName: 's444354-create-dataset',
|
|
|
|
selector: buildParameter('BUILD_SELECTOR')
|
|
|
|
)
|
2022-03-24 21:12:58 +01:00
|
|
|
steps {
|
|
|
|
sh "chmod u+x ./script2.sh"
|
|
|
|
sh " ./script2.sh"
|
|
|
|
archiveArtifacts 'num_of_lines.txt'
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-03-24 19:43:47 +01:00
|
|
|
}
|