42 lines
925 B
Plaintext
42 lines
925 B
Plaintext
pipeline {
|
|
agent {
|
|
dockerfile true
|
|
}
|
|
parameters {
|
|
buildSelector(
|
|
defaultSelector: lastSuccessful(),
|
|
description: 'Which build to use for copying artifacts',
|
|
name: 'BUILD_SELECTOR'
|
|
)
|
|
string(
|
|
defaultValue: 'input_example.json',
|
|
description: 'Input file name',
|
|
name: 'INPUT_FILE_NAME',
|
|
trim: false
|
|
)
|
|
}
|
|
|
|
stages {
|
|
stage('Stage 1') {
|
|
steps {
|
|
echo 'Hello world!'
|
|
}
|
|
}
|
|
|
|
stage('Copy from different Pipeline') {
|
|
steps {
|
|
copyArtifacts fingerprintArtifacts: false, projectName: 's449288-training/master', selector: buildParameter('BUILD_SELECTOR')
|
|
}
|
|
}
|
|
|
|
stage('Prediction') {
|
|
steps {
|
|
sh 'python3 predict.py $INPUT_FILE_NAME'
|
|
sh 'rm -r ml'
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|