Skip to content

Commit

Permalink
Merge pull request #8142 from ipfs/ci-build-docker-with-plugins
Browse files Browse the repository at this point in the history
Build a go-ipfs:extras docker image
  • Loading branch information
guseggert authored Aug 5, 2021
2 parents e9b1e2d + 499b596 commit 64df3ea
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 4 deletions.
33 changes: 33 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,23 @@ jobs:
root: .
paths:
- ./go-ipfs-image.tar
docker-build-extras:
executor: dockerizer
steps:
- checkout
- setup_remote_docker:
version: "19.03.13"
- run:
name: Build Docker Extras image
command: |
docker build --build-arg IPFS_PLUGINS="peerlog" -t "$IMAGE_NAME-extras:$WIP_IMAGE_TAG" .
- run:
name: Archive Docker Extras image
command: docker save -o go-ipfs-extras-image.tar $IMAGE_NAME
- persist_to_workspace:
root: .
paths:
- ./go-ipfs-extras-image.tar
docker-push:
executor: dockerizer
steps:
Expand All @@ -347,6 +364,22 @@ jobs:
command: |
echo "$DOCKERHUB_PASS" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin
./bin/push-docker-tags.sh $(date -u +%F) "$CIRCLE_SHA1" "$CIRCLE_BRANCH" "$CIRCLE_TAG"
docker-push-extras:
executor: dockerizer
steps:
- checkout
- setup_remote_docker:
version: "19.03.13"
- attach_workspace:
at: /tmp/workspace
- run:
name: Load archived Docker Extras image
command: docker load -i /tmp/workspace/go-ipfs-extras-image.tar
- run:
name: Publish Docker Extras Image to Docker Hub
command: |
echo "$DOCKERHUB_PASS" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin
./bin/push-docker-tags.sh $(date -u +%F) "$CIRCLE_SHA1" "$CIRCLE_BRANCH" "extras"
workflows:
version: 2
Expand Down
4 changes: 0 additions & 4 deletions bin/push-docker-tags.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,6 @@ elif [[ $GIT_TAG =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
pushTag "latest"
pushTag "release" # see: https://github.com/ipfs/go-ipfs/issues/3999#issuecomment-742228981

elif [ "$GIT_BRANCH" = "feat/stabilize-dht" ]; then
pushTag "bifrost-${BUILD_NUM}-${GIT_SHA1_SHORT}"
pushTag "bifrost-latest"

elif [ "$GIT_BRANCH" = "master" ]; then
pushTag "master-${BUILD_NUM}-${GIT_SHA1_SHORT}"
pushTag "master-latest"
Expand Down

0 comments on commit 64df3ea

Please sign in to comment.