From d018bafc9da568562a4897e44e0a0333426d0607 Mon Sep 17 00:00:00 2001 From: Georgios Jason Efstathiou Date: Sun, 22 Dec 2024 20:10:40 +0100 Subject: [PATCH] change things --- Jenkinsfile | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 9fbd116..9418468 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,24 +1,20 @@ -node { - def app +pipeline { + agent any - stage('Clone repository') { - checkout scm - } - - stage('Build image') { - app = docker.build("brandonjones085/test") - } - - stage('Test image') { - app.inside { - sh 'echo "Tests passed"' + stages { + stage('Clone repository') { + checkout scm } - } - stage('Push image') { - docker.withRegistry('https://registry.hub.docker.com', 'git') { - app.push("${env.BUILD_NUMBER}") - app.push("latest") + stage('Build image') { + app = docker.build("efstajas/homepage") + } + + stage('Push image') { + docker.withRegistry('https://registry.hub.docker.com', 'git') { + app.push("${env.BUILD_NUMBER}") + app.push("latest") + } } } }