2018-10-28 12:06:04 +01:00
|
|
|
version: 2
|
|
|
|
jobs:
|
2019-06-03 08:32:20 +02:00
|
|
|
fast_tests:
|
|
|
|
machine:
|
2019-10-12 13:38:41 +02:00
|
|
|
enabled: true
|
2019-06-03 08:32:20 +02:00
|
|
|
steps:
|
2018-10-28 12:06:04 +01:00
|
|
|
- checkout
|
2019-06-03 08:32:20 +02:00
|
|
|
- run:
|
|
|
|
command: |
|
|
|
|
cd .circleci && ./run-tests.sh "Fast=Fast"
|
|
|
|
selenium_tests:
|
|
|
|
machine:
|
2019-10-12 13:38:41 +02:00
|
|
|
enabled: true
|
2019-06-03 08:32:20 +02:00
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- run:
|
|
|
|
command: |
|
|
|
|
cd .circleci && ./run-tests.sh "Selenium=Selenium"
|
|
|
|
integration_tests:
|
|
|
|
machine:
|
2019-10-12 13:38:41 +02:00
|
|
|
enabled: true
|
2019-06-03 08:32:20 +02:00
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- run:
|
|
|
|
command: |
|
|
|
|
cd .circleci && ./run-tests.sh "Integration=Integration"
|
|
|
|
external_tests:
|
2018-12-18 15:27:57 +01:00
|
|
|
machine:
|
2019-10-12 13:38:41 +02:00
|
|
|
enabled: true
|
2018-10-28 12:06:04 +01:00
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- run:
|
|
|
|
command: |
|
2019-10-25 23:56:18 +02:00
|
|
|
if [ "$CIRCLE_PROJECT_USERNAME" == "btcpayserver" ] && [ "$CIRCLE_PROJECT_REPONAME" == "btcpayserver" ]; then
|
|
|
|
cd .circleci && ./run-tests.sh "ExternalIntegration=ExternalIntegration"
|
|
|
|
else
|
|
|
|
echo "Skipping running ExternalIntegration tests outside of context of main user and repository that have access to secrets"
|
|
|
|
fi
|
2019-06-03 08:32:20 +02:00
|
|
|
|
2018-11-23 03:21:01 +01:00
|
|
|
|
|
|
|
# publish jobs require $DOCKERHUB_REPO, $DOCKERHUB_USER, $DOCKERHUB_PASS defined
|
2019-06-03 08:20:20 +02:00
|
|
|
amd64:
|
2018-11-23 03:21:01 +01:00
|
|
|
machine:
|
2019-10-12 13:38:41 +02:00
|
|
|
enabled: true
|
2018-11-23 03:21:01 +01:00
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- run:
|
|
|
|
command: |
|
|
|
|
LATEST_TAG=${CIRCLE_TAG:1} #trim v from tag
|
|
|
|
#
|
2019-06-03 08:20:20 +02:00
|
|
|
sudo docker build --pull -t $DOCKERHUB_REPO:$LATEST_TAG-amd64 -f amd64.Dockerfile .
|
2018-11-23 03:21:01 +01:00
|
|
|
sudo docker login --username=$DOCKERHUB_USER --password=$DOCKERHUB_PASS
|
|
|
|
sudo docker push $DOCKERHUB_REPO:$LATEST_TAG-amd64
|
|
|
|
|
2019-06-03 08:20:20 +02:00
|
|
|
arm32v7:
|
2018-11-23 03:21:01 +01:00
|
|
|
machine:
|
2019-10-12 13:38:41 +02:00
|
|
|
enabled: true
|
2018-11-23 03:21:01 +01:00
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- run:
|
|
|
|
command: |
|
|
|
|
sudo docker run --rm --privileged multiarch/qemu-user-static:register --reset
|
|
|
|
LATEST_TAG=${CIRCLE_TAG:1} #trim v from tag
|
|
|
|
#
|
2019-06-03 08:20:20 +02:00
|
|
|
sudo docker build --pull -t $DOCKERHUB_REPO:$LATEST_TAG-arm32v7 -f arm32v7.Dockerfile .
|
2018-11-23 03:21:01 +01:00
|
|
|
sudo docker login --username=$DOCKERHUB_USER --password=$DOCKERHUB_PASS
|
|
|
|
sudo docker push $DOCKERHUB_REPO:$LATEST_TAG-arm32v7
|
|
|
|
|
2020-01-11 14:54:08 +01:00
|
|
|
arm64v8:
|
|
|
|
machine:
|
|
|
|
enabled: true
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- run:
|
|
|
|
command: |
|
|
|
|
sudo docker run --rm --privileged multiarch/qemu-user-static:register --reset
|
|
|
|
LATEST_TAG=${CIRCLE_TAG:1} #trim v from tag
|
|
|
|
#
|
|
|
|
sudo docker build --pull -t $DOCKERHUB_REPO:$LATEST_TAG-arm64v8 -f arm64v8.Dockerfile .
|
|
|
|
sudo docker login --username=$DOCKERHUB_USER --password=$DOCKERHUB_PASS
|
|
|
|
sudo docker push $DOCKERHUB_REPO:$LATEST_TAG-arm64v8
|
|
|
|
|
2019-06-03 08:20:20 +02:00
|
|
|
multiarch:
|
2018-11-23 03:21:01 +01:00
|
|
|
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
|
|
|
|
#
|
|
|
|
LATEST_TAG=${CIRCLE_TAG:1} #trim v from tag
|
2020-01-11 14:54:08 +01:00
|
|
|
sudo docker manifest create --amend $DOCKERHUB_REPO:$LATEST_TAG $DOCKERHUB_REPO:$LATEST_TAG-amd64 $DOCKERHUB_REPO:$LATEST_TAG-arm32v7 $DOCKERHUB_REPO:$LATEST_TAG-arm64v8
|
2018-11-23 03:21:01 +01:00
|
|
|
sudo docker manifest annotate $DOCKERHUB_REPO:$LATEST_TAG $DOCKERHUB_REPO:$LATEST_TAG-amd64 --os linux --arch amd64
|
|
|
|
sudo docker manifest annotate $DOCKERHUB_REPO:$LATEST_TAG $DOCKERHUB_REPO:$LATEST_TAG-arm32v7 --os linux --arch arm --variant v7
|
2020-01-11 14:54:08 +01:00
|
|
|
sudo docker manifest annotate $DOCKERHUB_REPO:$LATEST_TAG $DOCKERHUB_REPO:$LATEST_TAG-arm64v8 --os linux --arch arm64 --variant v8
|
2018-11-23 03:21:01 +01:00
|
|
|
sudo docker manifest push $DOCKERHUB_REPO:$LATEST_TAG -p
|
|
|
|
|
2018-10-28 12:06:04 +01:00
|
|
|
workflows:
|
|
|
|
version: 2
|
|
|
|
build_and_test:
|
|
|
|
jobs:
|
2019-06-03 08:32:20 +02:00
|
|
|
- fast_tests
|
|
|
|
- selenium_tests
|
|
|
|
- integration_tests
|
2019-06-03 08:41:44 +02:00
|
|
|
- external_tests:
|
|
|
|
filters:
|
|
|
|
branches:
|
|
|
|
only: master
|
2018-11-23 03:21:01 +01:00
|
|
|
|
|
|
|
publish:
|
|
|
|
jobs:
|
2019-06-03 08:20:20 +02:00
|
|
|
- amd64:
|
2018-11-23 03:21:01 +01:00
|
|
|
filters:
|
|
|
|
# ignore any commit on any branch by default
|
|
|
|
branches:
|
|
|
|
ignore: /.*/
|
2019-11-10 14:00:30 +01:00
|
|
|
# only act on version tags v1.0.0.88
|
2019-11-15 04:00:39 +01:00
|
|
|
# OR feature tags like vlndseedbackup
|
2018-11-23 03:21:01 +01:00
|
|
|
tags:
|
2019-11-15 04:00:39 +01:00
|
|
|
only: /(v[1-9]+(\.[0-9]+)*)|(v[a-z]+)/
|
2019-06-03 08:20:20 +02:00
|
|
|
- arm32v7:
|
2018-11-23 03:21:01 +01:00
|
|
|
filters:
|
|
|
|
branches:
|
|
|
|
ignore: /.*/
|
|
|
|
tags:
|
2019-11-15 04:00:39 +01:00
|
|
|
only: /(v[1-9]+(\.[0-9]+)*)|(v[a-z]+)/
|
2020-01-11 14:54:08 +01:00
|
|
|
- arm64v8:
|
|
|
|
filters:
|
|
|
|
branches:
|
|
|
|
ignore: /.*/
|
|
|
|
tags:
|
|
|
|
only: /(v[1-9]+(\.[0-9]+)*)|(v[a-z]+)/
|
2019-06-03 08:20:20 +02:00
|
|
|
- multiarch:
|
2018-11-23 03:21:01 +01:00
|
|
|
requires:
|
2019-06-03 08:20:20 +02:00
|
|
|
- amd64
|
|
|
|
- arm32v7
|
2020-01-12 05:42:04 +01:00
|
|
|
- arm64v8
|
2018-11-23 03:21:01 +01:00
|
|
|
filters:
|
|
|
|
branches:
|
|
|
|
ignore: /.*/
|
|
|
|
tags:
|
2019-11-15 04:00:39 +01:00
|
|
|
only: /(v[1-9]+(\.[0-9]+)*)|(v[a-z]+)/
|