environment test
This commit is contained in:
parent
400ad0fb7c
commit
9075def341
6
Jenkinsfile
vendored
6
Jenkinsfile
vendored
|
@ -39,6 +39,8 @@ 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"
|
||||
|
@ -76,8 +78,8 @@ podTemplate(
|
|||
passwordVariable: 'HARBOR_PASSWORD']]) {
|
||||
sh """
|
||||
docker login -u "${HARBOR_USER}" -p "${HARBOR_PASSWORD}" ${dockerRegistryUrl}
|
||||
docker build -t ${dockerRegistryUrl}/prototype/${PROJECT_NAME}:${PROJECT_VERSION} --build-arg PROJECT_NAME=${PROJECT_NAME} --build-arg PROJECT_VERSION=${PROJECT_VERSION} .
|
||||
docker push ${dockerRegistryUrl}/prototype/${PROJECT_NAME}:${PROJECT_VERSION}
|
||||
docker build -t ${dockerRegistryUrl}/prototype/${projectName}:${projectVersion} --build-arg PROJECT_NAME=${projectName} --build-arg PROJECT_VERSION=${projectVersion} .
|
||||
docker push ${dockerRegistryUrl}/prototype/${projectName}:${projectVersion}
|
||||
"""
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user