|
@ -2,7 +2,7 @@ version: 2 |
|
|
jobs: |
|
|
jobs: |
|
|
# Define in CircleCi Project Variables: $DOCKERHUB_REPO, $DOCKERHUB_USER, $DOCKERHUB_PASS |
|
|
# Define in CircleCi Project Variables: $DOCKERHUB_REPO, $DOCKERHUB_USER, $DOCKERHUB_PASS |
|
|
# Publish jobs require those variables |
|
|
# Publish jobs require those variables |
|
|
publish_docker_linuxamd64: |
|
|
amd64: |
|
|
machine: |
|
|
machine: |
|
|
docker_layer_caching: true |
|
|
docker_layer_caching: true |
|
|
steps: |
|
|
steps: |
|
@ -14,7 +14,7 @@ jobs: |
|
|
sudo docker build --pull -t $DOCKERHUB_REPO:latest-amd64 -f linuxamd64.Dockerfile . |
|
|
sudo docker build --pull -t $DOCKERHUB_REPO:latest-amd64 -f linuxamd64.Dockerfile . |
|
|
sudo docker push $DOCKERHUB_REPO:latest-amd64 |
|
|
sudo docker push $DOCKERHUB_REPO:latest-amd64 |
|
|
|
|
|
|
|
|
publish_docker_linuxarm32v7: |
|
|
arm32v7: |
|
|
machine: |
|
|
machine: |
|
|
docker_layer_caching: true |
|
|
docker_layer_caching: true |
|
|
steps: |
|
|
steps: |
|
@ -27,8 +27,20 @@ jobs: |
|
|
sudo docker login --username=$DOCKERHUB_USER --password=$DOCKERHUB_PASS |
|
|
sudo docker login --username=$DOCKERHUB_USER --password=$DOCKERHUB_PASS |
|
|
sudo docker build --pull -t $DOCKERHUB_REPO:latest-arm32v7 -f linuxarm32v7.Dockerfile . |
|
|
sudo docker build --pull -t $DOCKERHUB_REPO:latest-arm32v7 -f linuxarm32v7.Dockerfile . |
|
|
sudo docker push $DOCKERHUB_REPO:latest-arm32v7 |
|
|
sudo docker push $DOCKERHUB_REPO:latest-arm32v7 |
|
|
|
|
|
arm64v8: |
|
|
publish_docker_multiarch: |
|
|
machine: |
|
|
|
|
|
docker_layer_caching: true |
|
|
|
|
|
steps: |
|
|
|
|
|
- checkout |
|
|
|
|
|
- run: |
|
|
|
|
|
command: | |
|
|
|
|
|
sudo docker run --rm --privileged multiarch/qemu-user-static:register --reset |
|
|
|
|
|
# |
|
|
|
|
|
cd docker-compose-generator |
|
|
|
|
|
sudo docker login --username=$DOCKERHUB_USER --password=$DOCKERHUB_PASS |
|
|
|
|
|
sudo docker build --pull -t $DOCKERHUB_REPO:latest-arm64v8 -f linuxarm64v8.Dockerfile . |
|
|
|
|
|
sudo docker push $DOCKERHUB_REPO:latest-arm64v8 |
|
|
|
|
|
multiarch: |
|
|
machine: |
|
|
machine: |
|
|
enabled: true |
|
|
enabled: true |
|
|
image: circleci/classic:201808-01 |
|
|
image: circleci/classic:201808-01 |
|
@ -41,27 +53,29 @@ jobs: |
|
|
# |
|
|
# |
|
|
sudo docker login --username=$DOCKERHUB_USER --password=$DOCKERHUB_PASS |
|
|
sudo docker login --username=$DOCKERHUB_USER --password=$DOCKERHUB_PASS |
|
|
# |
|
|
# |
|
|
sudo docker manifest create --amend $DOCKERHUB_REPO:latest $DOCKERHUB_REPO:latest-amd64 $DOCKERHUB_REPO:latest-arm32v7 |
|
|
sudo docker manifest create --amend $DOCKERHUB_REPO:latest $DOCKERHUB_REPO:latest-amd64 $DOCKERHUB_REPO:latest-arm32v7 $DOCKERHUB_REPO:latest-arm64v8 |
|
|
sudo docker manifest annotate $DOCKERHUB_REPO:latest $DOCKERHUB_REPO:latest-amd64 --os linux --arch amd64 |
|
|
sudo docker manifest annotate $DOCKERHUB_REPO:latest $DOCKERHUB_REPO:latest-amd64 --os linux --arch amd64 |
|
|
sudo docker manifest annotate $DOCKERHUB_REPO:latest $DOCKERHUB_REPO:latest-arm32v7 --os linux --arch arm --variant v7 |
|
|
sudo docker manifest annotate $DOCKERHUB_REPO:latest $DOCKERHUB_REPO:latest-arm32v7 --os linux --arch arm --variant v7 |
|
|
|
|
|
sudo docker manifest annotate $DOCKERHUB_REPO:latest $DOCKERHUB_REPO:latest-arm64v8 --os linux --arch arm64 --variant v8 |
|
|
sudo docker manifest push $DOCKERHUB_REPO:latest -p |
|
|
sudo docker manifest push $DOCKERHUB_REPO:latest -p |
|
|
|
|
|
|
|
|
workflows: |
|
|
workflows: |
|
|
version: 2 |
|
|
version: 2 |
|
|
publish: |
|
|
publish: |
|
|
jobs: |
|
|
jobs: |
|
|
- publish_docker_linuxamd64: |
|
|
- amd64: |
|
|
filters: |
|
|
filters: |
|
|
branches: |
|
|
branches: |
|
|
only: dcg-latest |
|
|
only: dcg-latest |
|
|
- publish_docker_linuxarm32v7: |
|
|
- arm32v7: |
|
|
filters: |
|
|
filters: |
|
|
branches: |
|
|
branches: |
|
|
only: dcg-latest |
|
|
only: dcg-latest |
|
|
- publish_docker_multiarch: |
|
|
- multiarch: |
|
|
requires: |
|
|
requires: |
|
|
- publish_docker_linuxamd64 |
|
|
- amd64 |
|
|
- publish_docker_linuxarm32v7 |
|
|
- arm32v7 |
|
|
|
|
|
- arm64v8 |
|
|
filters: |
|
|
filters: |
|
|
branches: |
|
|
branches: |
|
|
only: dcg-latest |
|
|
only: dcg-latest |
|
|