From 01717da2d9bc3fc8918be561b8e3d77e23af2034 Mon Sep 17 00:00:00 2001 From: s444018 Date: Wed, 30 Mar 2022 09:12:46 +0200 Subject: [PATCH] add Jenkinsfile for docker --- Docker/Jenkinsfile | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/Docker/Jenkinsfile b/Docker/Jenkinsfile index 3bb7229..3a017da 100644 --- a/Docker/Jenkinsfile +++ b/Docker/Jenkinsfile @@ -1,10 +1,19 @@ -pipeline { - agent { dockerfile true } - stages { - stage('Launch Docker') { - steps { - sh 'ls -la' - } - } - } +node { + def app + stage('Clone repository') { + + checkout scm + } + + stage('Build image') { + + app = docker.build("sparafinski/ium") + } + + stage('Test image') { + app.inside { + + sh 'echo "Tests passed"' + } + } } \ No newline at end of file