ium_495719/JenkinsfileTraining

44 lines
1.1 KiB
Plaintext
Raw Normal View History

2024-05-14 15:15:42 +02:00
pipeline {
agent {
2024-05-14 15:17:35 +02:00
dockerfile true
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:22:34 +02:00
triggers {
upstream(upstreamProjects: 's495719-create-dataset', threshold: hudson.model.Result.SUCCESS)
}
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'
sh "python3 ./create_model.py"
}
}
stage('CreateArtifacts') {
steps {
archiveArtifacts artifacts: 'hp_model.h5'
}
}
}
}