From 778893b28d28b656707fffc005980c8be011fb0d Mon Sep 17 00:00:00 2001 From: iFargle Date: Wed, 8 Feb 2023 13:25:15 +0900 Subject: [PATCH] test --- Jenkinsfile | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index c0334cb..cf96489 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -36,15 +36,27 @@ pipeline { } } } - stage('Push') { - options { timeout(time: 5, unit: 'MINUTES') } - steps { - script { - docker.withRegistry('https://git.sysctl.io/', 'gitea-jenkins-pat') { - dockerImage.push("${env.BRANCH_NAME}-${env.BUILD_ID}") + stage('Push Testing') { + when { branch 'testing'} + if (branch == 'testing') { + options { timeout(time: 5, unit: 'MINUTES') } + steps { + script { + docker.withRegistry('https://git.sysctl.io/', 'gitea-jenkins-pat') { + dockerImage.push("${env.BRANCH_NAME}-${env.BUILD_ID}") + } + } + } + } + if (branch == 'main') { + options { timeout(time: 5, unit: 'MINUTES') } + steps { + script { + docker.withRegistry('https://git.sysctl.io/', 'gitea-jenkins-pat') { + dockerImage.push("latest") + } } } - milestone 30 } } }