ium_452627/Jenkinsfile_2
2023-03-28 13:38:32 +02:00

31 lines
875 B
Plaintext

pipeline {
agent any
//Definijuemy parametry, ktore bedzie mozna podac podczas wywolywania zadania
parameters {
buildSelector (
name: 'BUILD_SELECTOR',
defaultValue: lastSuccessful(),
description: 'Which build to use for copying artifacts?',
)
}
stages {
stage('Load Artifact') {
steps {
copyArtifacts fingerprintArtifacts: true, projectName: 's452627-create-dataset', selector: buildParameter('BUILD_SELECTOR')
}
stage('Run Script') {
steps {
script {
sh "chmod +x -R ${env.WORKSPACE}"
sh './make_statistic.sh | tee output.txt'
}
}
}
stage('Archive Output') {
steps {
archiveArtifacts 'output.txt'
}
}
}
}