ium_495719/JenkinsfileTraining

59 lines
1.6 KiB
Plaintext
Raw Permalink Normal View History

2024-05-14 15:15:42 +02:00
pipeline {
agent {
2024-05-20 16:38:06 +02:00
docker { image 'paweldopierala/ium:2.0.0' }
2024-05-14 15:15:42 +02:00
}
parameters{
buildSelector(
defaultSelector: lastSuccessful(),
description: 'Which build to use for copying artifacts',
name: 'BUILD_SELECTOR'
)
2024-05-14 15:32:43 +02:00
string(
2024-05-15 00:30:32 +02:00
defaultValue: '20',
2024-05-14 15:32:43 +02:00
description: 'Epochs',
name: 'EPOCHS'
)
2024-05-16 03:01:35 +02:00
string(
defaultValue: '0.001',
description: 'Learning Rate',
name: 'LEARNING_RATE'
)
string(
defaultValue: '32',
description: 'Batch size',
name: 'BATCH_SIZE'
)
2024-05-14 15:15:42 +02:00
}
2024-05-14 15:22:34 +02:00
triggers {
2024-05-14 15:36:11 +02:00
upstream(upstreamProjects: 'z-s495719-create-dataset', threshold: hudson.model.Result.SUCCESS)
2024-05-14 15:22:34 +02:00
}
2024-05-14 15:15:42 +02:00
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'
2024-05-16 03:01:35 +02:00
sh "python3 ./create_model.py ${params.EPOCHS} ${params.LEARNING_RATE} ${params.BATCH_SIZE}"
2024-05-14 15:15:42 +02:00
}
}
stage('CreateArtifacts') {
steps {
archiveArtifacts artifacts: 'hp_model.h5'
}
}
}
}