DOCKER_REGISTRY argument
Some checks failed
Amarillo/amarillo-gitea/amarillo-core/pipeline/head There was a failure building this commit
Some checks failed
Amarillo/amarillo-gitea/amarillo-core/pipeline/head There was a failure building this commit
This commit is contained in:
parent
3b6b8dddf8
commit
2a282231ed
10
Jenkinsfile
vendored
10
Jenkinsfile
vendored
|
|
@ -4,7 +4,7 @@ pipeline {
|
||||||
GITEA_CREDS = credentials('AMARILLO-JENKINS-GITEA-USER')
|
GITEA_CREDS = credentials('AMARILLO-JENKINS-GITEA-USER')
|
||||||
TWINE_REPO_URL = "https://git.gerhardt.io/api/packages/amarillo/pypi"
|
TWINE_REPO_URL = "https://git.gerhardt.io/api/packages/amarillo/pypi"
|
||||||
PLUGINS_REPO_URL = "git.gerhardt.io/api/packages/amarillo/pypi/simple"
|
PLUGINS_REPO_URL = "git.gerhardt.io/api/packages/amarillo/pypi/simple"
|
||||||
DOCKER_REGISTRY_URL = 'https://git.gerhardt.io'
|
DOCKER_REGISTRY = 'git.gerhardt.io'
|
||||||
DERIVED_DOCKERFILE = 'standard.Dockerfile'
|
DERIVED_DOCKERFILE = 'standard.Dockerfile'
|
||||||
OWNER = 'amarillo'
|
OWNER = 'amarillo'
|
||||||
BASE_IMAGE_NAME = 'amarillo-base'
|
BASE_IMAGE_NAME = 'amarillo-base'
|
||||||
|
|
@ -61,7 +61,7 @@ pipeline {
|
||||||
steps {
|
steps {
|
||||||
echo 'Pushing image to registry'
|
echo 'Pushing image to registry'
|
||||||
script {
|
script {
|
||||||
docker.withRegistry(DOCKER_REGISTRY_URL, 'AMARILLO-JENKINS-GITEA-USER'){
|
docker.withRegistry("https://${DOCKER_REGISTRY}", 'AMARILLO-JENKINS-GITEA-USER'){
|
||||||
def image = docker.image("${OWNER}/${BASE_IMAGE_NAME}:${TAG}")
|
def image = docker.image("${OWNER}/${BASE_IMAGE_NAME}:${TAG}")
|
||||||
image.push()
|
image.push()
|
||||||
image.push('latest')
|
image.push('latest')
|
||||||
|
|
@ -76,10 +76,10 @@ pipeline {
|
||||||
steps {
|
steps {
|
||||||
echo 'Building image'
|
echo 'Building image'
|
||||||
script {
|
script {
|
||||||
docker.withRegistry(DOCKER_REGISTRY_URL, 'AMARILLO-JENKINS-GITEA-USER'){
|
docker.withRegistry("https://${DOCKER_REGISTRY}", 'AMARILLO-JENKINS-GITEA-USER'){
|
||||||
docker.build("${OWNER}/${IMAGE_NAME}:${TAG}",
|
docker.build("${OWNER}/${IMAGE_NAME}:${TAG}",
|
||||||
//--no-cache to make sure plugins are updated
|
//--no-cache to make sure plugins are updated
|
||||||
"-f ${DERIVED_DOCKERFILE} --no-cache --build-arg='PACKAGE_REGISTRY_URL=${PLUGINS_REPO_URL}' --secret id=AMARILLO_REGISTRY_CREDENTIALS,env=GITEA_CREDS .")
|
"-f ${DERIVED_DOCKERFILE} --no-cache --build-arg='PACKAGE_REGISTRY_URL=${PLUGINS_REPO_URL}' --build-arg='DOCKER_REGISTRY=${DOCKER_REGISTRY}' --secret id=AMARILLO_REGISTRY_CREDENTIALS,env=GITEA_CREDS .")
|
||||||
// "--no-cache --build-arg='PACKAGE_REGISTRY_URL=${PLUGINS_REPO_URL}' --build-arg='PLUGINS=${PLUGINS}' --secret id=AMARILLO_REGISTRY_CREDENTIALS,env=GITEA_CREDS .")
|
// "--no-cache --build-arg='PACKAGE_REGISTRY_URL=${PLUGINS_REPO_URL}' --build-arg='PLUGINS=${PLUGINS}' --secret id=AMARILLO_REGISTRY_CREDENTIALS,env=GITEA_CREDS .")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -93,7 +93,7 @@ pipeline {
|
||||||
steps {
|
steps {
|
||||||
echo 'Pushing image to registry'
|
echo 'Pushing image to registry'
|
||||||
script {
|
script {
|
||||||
docker.withRegistry(DOCKER_REGISTRY_URL, 'AMARILLO-JENKINS-GITEA-USER'){
|
docker.withRegistry("https://${DOCKER_REGISTRY}", 'AMARILLO-JENKINS-GITEA-USER'){
|
||||||
def image = docker.image("${OWNER}/${IMAGE_NAME}:${TAG}")
|
def image = docker.image("${OWNER}/${IMAGE_NAME}:${TAG}")
|
||||||
image.push()
|
image.push()
|
||||||
image.push('latest')
|
image.push('latest')
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
FROM amarillo/amarillo-base
|
ARG DOCKER_REGISTRY
|
||||||
|
FROM ${DOCKER_REGISTRY}/amarillo/amarillo-base
|
||||||
|
|
||||||
ARG PLUGINS=\
|
ARG PLUGINS=\
|
||||||
"amarillo-metrics "\
|
"amarillo-metrics "\
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue