mirror of
https://github.com/acid-info/logos-ordinals-dashboard.git
synced 2025-01-12 06:34:14 +00:00
ci: push docker image to harbor
This commit is contained in:
parent
881bd12992
commit
5c674afe50
13
Jenkinsfile
vendored
13
Jenkinsfile
vendored
@ -7,6 +7,11 @@ pipeline {
|
|||||||
defaultValue: params.IMAGE_TAG ?: '',
|
defaultValue: params.IMAGE_TAG ?: '',
|
||||||
description: 'Optional Docker image tag to push.'
|
description: 'Optional Docker image tag to push.'
|
||||||
)
|
)
|
||||||
|
string(
|
||||||
|
name: 'DOCKER_REGISTRY',
|
||||||
|
description: 'Docker registry ',
|
||||||
|
defaultValue: params.DOCKER_REGISTRY ?: 'harbor.status.im',
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
options {
|
options {
|
||||||
@ -19,7 +24,7 @@ pipeline {
|
|||||||
}
|
}
|
||||||
|
|
||||||
environment {
|
environment {
|
||||||
IMAGE_NAME = 'statusteam/logos-dashboard'
|
IMAGE_NAME = 'acid-info-private/logos-ordinals-dashboard'
|
||||||
NEXT_PUBLIC_SITE_URL = "https://${env.JOB_BASE_NAME}"
|
NEXT_PUBLIC_SITE_URL = "https://${env.JOB_BASE_NAME}"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -28,7 +33,7 @@ pipeline {
|
|||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
image = docker.build(
|
image = docker.build(
|
||||||
"${IMAGE_NAME}:${env.GIT_COMMIT.take(8)}"
|
"${DOCKER_REGISTRY}/${IMAGE_NAME}:${GIT_COMMIT.take(8)}",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -37,7 +42,7 @@ pipeline {
|
|||||||
stage('Push') {
|
stage('Push') {
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
withDockerRegistry([credentialsId: 'dockerhub-statusteam-auto', url: '']) {
|
withDockerRegistry([credentialsId: 'harbor-acid-info-private-robot', url: 'https://${DOCKER_REGISTRY}']) {
|
||||||
image.push()
|
image.push()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -48,7 +53,7 @@ pipeline {
|
|||||||
when { expression { params.IMAGE_TAG != '' } }
|
when { expression { params.IMAGE_TAG != '' } }
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
withDockerRegistry([credentialsId: 'dockerhub-statusteam-auto', url: '']) {
|
withDockerRegistry([credentialsId: 'harbor-acid-info-private-robot', url: 'https://${DOCKER_REGISTRY}']) {
|
||||||
image.push(params.IMAGE_TAG)
|
image.push(params.IMAGE_TAG)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user