From a47488deb5ab774ce687560810132e956550ebf6 Mon Sep 17 00:00:00 2001 From: PawelDopierala Date: Tue, 14 May 2024 15:15:42 +0200 Subject: [PATCH] Do JenkinsfileTraining --- JenkinsfileTraining | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 JenkinsfileTraining diff --git a/JenkinsfileTraining b/JenkinsfileTraining new file mode 100644 index 0000000..1fb7fb5 --- /dev/null +++ b/JenkinsfileTraining @@ -0,0 +1,40 @@ +pipeline { + agent { + docker { image 'paweldopierala/ium:1.0.0' } + } + + parameters{ + buildSelector( + defaultSelector: lastSuccessful(), + description: 'Which build to use for copying artifacts', + name: 'BUILD_SELECTOR' + ) + } + + 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' + } + } + } +} \ No newline at end of file