59 lines
1.6 KiB
Plaintext
59 lines
1.6 KiB
Plaintext
pipeline {
|
|
agent {
|
|
dockerfile true
|
|
}
|
|
|
|
parameters{
|
|
buildSelector(
|
|
defaultSelector: lastSuccessful(),
|
|
description: 'Which build to use for copying artifacts',
|
|
name: 'BUILD_SELECTOR'
|
|
)
|
|
string(
|
|
defaultValue: '20',
|
|
description: 'Epochs',
|
|
name: 'EPOCHS'
|
|
)
|
|
string(
|
|
defaultValue: '0.001',
|
|
description: 'Learning Rate',
|
|
name: 'LEARNING_RATE'
|
|
)
|
|
string(
|
|
defaultValue: '32',
|
|
description: 'Batch size',
|
|
name: 'BATCH_SIZE'
|
|
)
|
|
}
|
|
|
|
triggers {
|
|
upstream(upstreamProjects: 'z-s495719-create-dataset', threshold: hudson.model.Result.SUCCESS)
|
|
}
|
|
|
|
stages {
|
|
stage('Git') {
|
|
steps {
|
|
git(
|
|
url: "https://git.wmi.amu.edu.pl/s495719/ium_495719.git",
|
|
branch: "main"
|
|
)
|
|
}
|
|
}
|
|
stage('CopyArtifacts') {
|
|
steps {
|
|
copyArtifacts fingerprintArtifacts: true, projectName: 'z-s495719-create-dataset', selector: buildParameter('BUILD_SELECTOR')
|
|
}
|
|
}
|
|
stage('Script') {
|
|
steps {
|
|
sh 'chmod 777 ./create_model.py'
|
|
sh "python3 ./create_model.py ${params.EPOCHS} ${params.LEARNING_RATE} ${params.BATCH_SIZE}"
|
|
}
|
|
}
|
|
stage('CreateArtifacts') {
|
|
steps {
|
|
archiveArtifacts artifacts: 'hp_model.h5'
|
|
}
|
|
}
|
|
}
|
|
} |