From 8857e6cee4b35fe5e3d174d2ef3e0412ca2f1e6f Mon Sep 17 00:00:00 2001 From: infl00p Date: Tue, 14 Sep 2021 16:30:28 +0300 Subject: [PATCH] Pipeline support - fix --- Jenkinsfile | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 415ee13..32db3de 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -34,29 +34,31 @@ spec: stages { stage('Grab Code') { steps { - container('hugo') checkout scm } } stage('Test Hugo syntax') { steps { - container('hugo') - sh 'hugo --quiet' + container('hugo') { + sh 'hugo --quiet' + } } } stage('Build the Site') { steps { - container('hugo') - sh 'hugo' + container('hugo') { + sh 'hugo' + } } } stage('Create Package') { steps { - container('hugo') - sh "tar zcvf site.tar.gz ./public/" + container('hugo') { + sh "tar zcvf site.tar.gz ./public/" + } } } @@ -68,10 +70,11 @@ spec: } steps { - container('tea') - sh 'apk update && apk add tea' - sh "tea login add -n ${GITEA_LOGIN}" - sh 'tea r create -t ${BUILD_TAG} --tag ${BUILD_NUMBER} -a site.tar.gz' + container('tea') { + sh 'apk update && apk add tea' + sh "tea login add -n ${GITEA_LOGIN}" + sh "tea r create -t ${BUILD_TAG} --tag ${BUILD_NUMBER} -a site.tar.gz" + } } } }