You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
98 lines
3.3 KiB
98 lines
3.3 KiB
version: 2
|
|
jobs:
|
|
cansetup:
|
|
machine:
|
|
docker_layer_caching: true
|
|
steps:
|
|
- checkout
|
|
- run:
|
|
command: |
|
|
cd .circleci
|
|
sudo ./test-install.sh
|
|
# Define in CircleCi Project Variables: $DOCKERHUB_REPO, $DOCKERHUB_USER, $DOCKERHUB_PASS
|
|
# Publish jobs require those variables
|
|
amd64:
|
|
machine:
|
|
docker_layer_caching: true
|
|
steps:
|
|
- checkout
|
|
- run:
|
|
command: |
|
|
cd docker-compose-generator
|
|
sudo docker login --username=$DOCKERHUB_USER --password=$DOCKERHUB_PASS
|
|
sudo docker build --pull -t $DOCKERHUB_REPO:latest-amd64 -f linuxamd64.Dockerfile .
|
|
sudo docker push $DOCKERHUB_REPO:latest-amd64
|
|
|
|
arm32v7:
|
|
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-arm32v7 -f linuxarm32v7.Dockerfile .
|
|
sudo docker push $DOCKERHUB_REPO:latest-arm32v7
|
|
arm64v8:
|
|
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:
|
|
enabled: true
|
|
image: circleci/classic:201808-01
|
|
steps:
|
|
- run:
|
|
command: |
|
|
# Turn on Experimental features
|
|
sudo mkdir $HOME/.docker
|
|
sudo sh -c 'echo "{ \"experimental\": \"enabled\" }" >> $HOME/.docker/config.json'
|
|
#
|
|
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 $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-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
|
|
|
|
workflows:
|
|
version: 2
|
|
publish:
|
|
jobs:
|
|
- cansetup:
|
|
filters:
|
|
branches:
|
|
only: master
|
|
- amd64:
|
|
filters:
|
|
branches:
|
|
only: dcg-latest
|
|
- arm32v7:
|
|
filters:
|
|
branches:
|
|
only: dcg-latest
|
|
- arm64v8:
|
|
filters:
|
|
branches:
|
|
only: dcg-latest
|
|
- multiarch:
|
|
requires:
|
|
- amd64
|
|
- arm32v7
|
|
- arm64v8
|
|
filters:
|
|
branches:
|
|
only: dcg-latest
|
|
|