Fix docker build scheduled job
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
1bfff235f3
commit
822a5604e0
@ -190,30 +190,6 @@ pages:
|
|||||||
services:
|
services:
|
||||||
- docker:stable-dind
|
- docker:stable-dind
|
||||||
cache: {}
|
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:
|
before_script:
|
||||||
# Install buildx
|
# Install buildx
|
||||||
- wget https://github.com/docker/buildx/releases/download/v0.6.3/buildx-v0.6.3.linux-amd64
|
- 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
|
# Login to DockerHub
|
||||||
- mkdir -p ~/.docker
|
- mkdir -p ~/.docker
|
||||||
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"auth\":\"$CI_REGISTRY_AUTH\",\"email\":\"$CI_REGISTRY_EMAIL\"}}}" > ~/.docker/config.json
|
- 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:
|
script:
|
||||||
- >
|
- >
|
||||||
docker buildx build
|
docker buildx build
|
||||||
|
Loading…
Reference in New Issue
Block a user