Fix docker build scheduled job
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
9665b15f96
commit
97285e4f1a
@ -190,30 +190,6 @@ pages:
|
||||
services:
|
||||
- docker:stable-dind
|
||||
cache: {}
|
||||
tags:
|
||||
- "privileged"
|
||||
|
||||
build-docker-main:
|
||||
<<: *docker
|
||||
rules:
|
||||
- if: '$CI_PROJECT_NAMESPACE != "framasoft"'
|
||||
when: never
|
||||
- if: '$CI_PIPELINE_SOURCE == "schedule"'
|
||||
before_script:
|
||||
# Login to DockerHub
|
||||
- mkdir -p ~/.docker
|
||||
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"auth\":\"$CI_REGISTRY_AUTH\",\"email\":\"$CI_REGISTRY_EMAIL\"}}}" > ~/.docker/config.json
|
||||
script:
|
||||
- docker build -t framasoft/mobilizon:main -f docker/production/Dockerfile .
|
||||
- docker push framasoft/mobilizon:main
|
||||
|
||||
build-docker-tag:
|
||||
<<: *docker
|
||||
rules: &tag-rules
|
||||
- if: '$CI_PROJECT_NAMESPACE != "framasoft"'
|
||||
when: never
|
||||
- if: $CI_COMMIT_TAG
|
||||
timeout: 3 hours
|
||||
before_script:
|
||||
# Install buildx
|
||||
- wget https://github.com/docker/buildx/releases/download/v0.6.3/buildx-v0.6.3.linux-amd64
|
||||
@ -229,6 +205,25 @@ build-docker-tag:
|
||||
# Login to DockerHub
|
||||
- mkdir -p ~/.docker
|
||||
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"auth\":\"$CI_REGISTRY_AUTH\",\"email\":\"$CI_REGISTRY_EMAIL\"}}}" > ~/.docker/config.json
|
||||
tags:
|
||||
- "privileged"
|
||||
|
||||
build-docker-main:
|
||||
<<: *docker
|
||||
rules:
|
||||
- if: '$CI_PROJECT_NAMESPACE != "framasoft"'
|
||||
when: never
|
||||
- if: '$CI_PIPELINE_SOURCE == "schedule"'
|
||||
script:
|
||||
- docker buildx build --push --platform linux/amd64 -t framasoft/mobilizon:main -f docker/production/Dockerfile .
|
||||
|
||||
build-docker-tag:
|
||||
<<: *docker
|
||||
rules: &tag-rules
|
||||
- if: '$CI_PROJECT_NAMESPACE != "framasoft"'
|
||||
when: never
|
||||
- if: $CI_COMMIT_TAG
|
||||
timeout: 3 hours
|
||||
script:
|
||||
- >
|
||||
docker buildx build
|
||||
|
Loading…
Reference in New Issue
Block a user