Browse Source

更新jenkinsfile

main
Julin 1 year ago
parent
commit
52663ade55
  1. 30
      code/pep-stats-report/jenkinsfile

30
code/pep-stats-report/jenkinsfile

@ -1,21 +1,21 @@
pipeline { podTemplate {
agent { node('pod-templ-jenkins-slave-common') {
node { env.IMAGE_NAME = "${IOT_IMAGES_REGISTRY}/${pep}/${JOB_NAME}"
label 'jnlp-slave' env.IMAGE_NAME_SHORT = "${pep}/${JOB_NAME}"
} env.CODE_ADDR = "${GIT_ADDRESS}/free-sun/FS-PEP.git"
}
stages { stage('Run shell') {
stage('Testing fs-pep-stats-report......') { git branch: 'master', credentialsId: 'gitea-builder', url: "${CODE_ADDR}"
steps {
buildName '#${BUILD_NUMBER} ~/pep/${JOB_NAME}:${IMAGE_VERSION}' container('image-builder') {
buildDescription 'harbor.anxinyun.cn/pep/${JOB_NAME}:${IMAGE_VERSION}' sh'''
sh ''' /kaniko/executor --context=${BUILD_WORKSPACE} --dockerfile=./Dockerfile
cd ./code/pep-stats-report --destination=${IMAGE_NAME}:${IMAGE_VERSION} --cache=false --cleanup
nerdctl build -t harbor.anxinyun.cn/pep/${JOB_NAME}:${IMAGE_VERSION} .
nerdctl push harbor.anxinyun.cn/pep/${JOB_NAME}:${IMAGE_VERSION}
''' '''
} }
buildName "${IMAGE_NAME_SHORT}:${IMAGE_VERSION}"
buildDescription "${IMAGE_NAME}:${IMAGE_VERSION}"
} }
} }
} }
Loading…
Cancel
Save