environment test
This commit is contained in:
parent
9075def341
commit
a62cee565c
6
Jenkinsfile
vendored
6
Jenkinsfile
vendored
|
@ -39,8 +39,6 @@ podTemplate(
|
|||
def myRepo = checkout scm
|
||||
def gitCommit = myRepo.GIT_COMMIT
|
||||
def gitBranch = myRepo.GIT_BRANCH
|
||||
def projectName = myRepo.PROJECT_NAME
|
||||
def projectVersion = myRepo.PROJECT_VERSION
|
||||
def shortGitCommit = "${gitCommit[0..10]}"
|
||||
def previousGitCommit = sh(script: "git rev-parse ${gitCommit}~", returnStdout: true)
|
||||
def dockerRegistryUrl = "harbor.loafle.net"
|
||||
|
@ -78,8 +76,8 @@ podTemplate(
|
|||
passwordVariable: 'HARBOR_PASSWORD']]) {
|
||||
sh """
|
||||
docker login -u "${HARBOR_USER}" -p "${HARBOR_PASSWORD}" ${dockerRegistryUrl}
|
||||
docker build -t ${dockerRegistryUrl}/prototype/${projectName}:${projectVersion} --build-arg PROJECT_NAME=${projectName} --build-arg PROJECT_VERSION=${projectVersion} .
|
||||
docker push ${dockerRegistryUrl}/prototype/${projectName}:${projectVersion}
|
||||
docker build -t ${dockerRegistryUrl}/prototype/${env.PROJECT_NAME}:${env.PROJECT_VERSION} --build-arg PROJECT_NAME=${env.PROJECT_NAME} --build-arg PROJECT_VERSION=${env.PROJECT_VERSION} .
|
||||
docker push ${dockerRegistryUrl}/prototype/${env.PROJECT_NAME}:${env.PROJECT_VERSION}
|
||||
"""
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user