From 089503e349b652049cd3ac8bc0a5bfd1f73dea54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Zi=C4=99tkiewicz?= Date: Wed, 26 May 2021 21:40:21 +0200 Subject: [PATCH] Add Git trigger --- Jenkinsfile | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index b09102c..94bb3ea 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,16 +1,28 @@ node { - def img - stage('Preparation') { // for display purposes - img = docker.build('ium-helloworld') - } - stage('Train') { + def img + stage("Properties"){ + properties([ + [$class: 'GogsTrigger'], + pipelineTriggers([pollSCM('')]) + ]) + } + + stage("Checkout"){ + git 'https://git.wmi.amu.edu.pl/tzietkiewicz/ium-helloworld.git' + } + + stage('Environment') { // for display purposes + img = docker.build('ium-helloworld') + } + + stage('Train') { img.inside('-v /tmp/mlruns:/tmp/mlruns -v /mlruns:/mlruns ') { sh 'ls -l /tmp/mlruns' sh 'ls -l /mlruns' sh './train.py' sh 'ls -l /tmp/mlruns' sh 'ls -l /mlruns' - } + } } }