mirror of
https://github.com/offen/docker-volume-backup.git
synced 2024-11-10 00:30:29 +01:00
65 lines
1.8 KiB
YAML
65 lines
1.8 KiB
YAML
version: 2.1
|
|
|
|
jobs:
|
|
canary:
|
|
machine:
|
|
image: ubuntu-1604:202007-01
|
|
working_directory: ~/docker-volume-backup
|
|
steps:
|
|
- checkout
|
|
- run:
|
|
name: Build
|
|
command: |
|
|
docker build . -t offen/docker-volume-backup:canary
|
|
- run:
|
|
name: Run tests
|
|
command: |
|
|
for test in test/**/test.sh; do
|
|
/bin/sh $test
|
|
done
|
|
|
|
build:
|
|
docker:
|
|
- image: cimg/base:2020.06
|
|
environment:
|
|
DOCKER_BUILDKIT: '1'
|
|
DOCKER_CLI_EXPERIMENTAL: enabled
|
|
working_directory: ~/docker-volume-backup
|
|
steps:
|
|
- checkout
|
|
- setup_remote_docker:
|
|
version: 20.10.6
|
|
- docker/install-docker-credential-helper
|
|
- docker/configure-docker-credentials-store
|
|
- run:
|
|
name: Push to Docker Hub
|
|
command: |
|
|
echo "$DOCKER_ACCESSTOKEN" | docker login --username offen --password-stdin
|
|
# This is required for building ARM: https://gitlab.alpinelinux.org/alpine/aports/-/issues/12406
|
|
docker run --rm --privileged linuxkit/binfmt:v0.8
|
|
docker context create docker-volume-backup
|
|
docker buildx create docker-volume-backup --name docker-volume-backup --use
|
|
docker buildx inspect --bootstrap
|
|
docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 \
|
|
-t offen/docker-volume-backup:$CIRCLE_TAG \
|
|
-t offen/docker-volume-backup:latest \
|
|
. --push
|
|
|
|
workflows:
|
|
version: 2
|
|
docker_image:
|
|
jobs:
|
|
- canary:
|
|
filters:
|
|
tags:
|
|
ignore: /^v.*/
|
|
- build:
|
|
filters:
|
|
branches:
|
|
ignore: /.*/
|
|
tags:
|
|
only: /^v.*/
|
|
|
|
orbs:
|
|
docker: circleci/docker@1.0.1
|