CircleCI: Add dockerhub build (#3792)

CircleCI: Add dockerhub build
This commit is contained in:
Evaldo Felipe
2022-01-31 19:23:27 -03:00
committed by GitHub
parent 4b4b183550
commit 85a67a0165
3 changed files with 34 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
#!/bin/bash
cat << 'EOF'
docker-publish-latest:
machine:
image: ubuntu-2004:202010-01
resource_class: large
steps:
- restore_cache:
key: protocol-completed-build-{{ .Environment.CIRCLE_SHA1 }}
- run:
name: Build Docker image
command: |
cd /home/circleci/protocol
docker build -t umaprotocol/protocol:latest .
- run:
name: Publish Docker Image to Docker Hub
command: |
echo $DOCKERHUB_PASS | docker login -u $DOCKERHUB_USERNAME --password-stdin
docker push umaprotocol/protocol:latest
EOF
+11
View File
@@ -0,0 +1,11 @@
#!/bin/bash
cat << EOF
- docker-publish-latest:
context: dockerhub-publish
requires:
- tests-required
filters:
branches:
only: master
EOF
+2
View File
@@ -34,6 +34,7 @@ else
/bin/bash $TESTS_PATH/test-required.sh >> $CI_CONFIG_FILE
/bin/bash ci/dockerhub.sh >> $CI_CONFIG_FILE
printf "\n\nworkflows:\n version: 2.1\n build_and_test:\n jobs:\n" >> $CI_CONFIG_FILE
@@ -76,5 +77,6 @@ EOF
done
# printf " - test-integration" >> $CI_CONFIG_FILE
/bin/bash ci/dockerhub_workflow.sh >> $CI_CONFIG_FILE
fi