Skip to content

Commit

Permalink
chore: remove dockerhub push from circleci
Browse files Browse the repository at this point in the history
  • Loading branch information
lidel committed Sep 28, 2021
1 parent dec9b2e commit 23ecce5
Showing 1 changed file with 2 additions and 94 deletions.
96 changes: 2 additions & 94 deletions .circleci/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@ aliases:
paths:
- ~/go/pkg/mod
- ~/.cache/go-build/
only-version-tags: &only-version-tags
tags:
only: /^v[0-9].*/
branches:
ignore: /.*/

default_environment: &default_environment
SERVICE: circle-ci
Expand Down Expand Up @@ -331,6 +326,8 @@ jobs:
key: v1-ipfs-webui-{{ checksum "~/ipfs/go-ipfs/ipfs-webui/package-lock.json" }}
paths:
- ~/ipfs/go-ipfs/ipfs-webui/node_modules
# We only run build as a test here. DockerHub images are built and published
# by Github Action now: https://github.com/ipfs/go-ipfs/pull/8467
docker-build:
executor: dockerizer
steps:
Expand All @@ -341,62 +338,6 @@ jobs:
name: Build Docker image
command: |
docker build -t $IMAGE_NAME:$WIP_IMAGE_TAG .
- run:
name: Archive Docker image
command: docker save -o go-ipfs-image.tar $IMAGE_NAME
- persist_to_workspace:
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:
- checkout
- setup_remote_docker:
version: "19.03.13"
- attach_workspace:
at: /tmp/workspace
- run:
name: Load archived Docker image
command: docker load -i /tmp/workspace/go-ipfs-image.tar
- run:
name: Publish Docker 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" "$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 All @@ -423,36 +364,3 @@ workflows:
requires:
- build
- docker-build
- docker-push:
# Requires dockerhub credentials, from circleci context.
context: dockerhub
requires:
- docker-build
- golint
- gotest
- sharness
- interop
- go-ipfs-api
- go-ipfs-http-client
- ipfs-webui
filters:
branches:
only:
- master
# the bifrost-* branches are used for deploying code that hasn't hit master yet (e.g. for testing)
- /^bifrost-.*/


# NOTE: CircleCI only builds tags if you explicitly filter for them. That
# also means tag-based jobs can only depend on other tag-based jobs, so we
# use a separate workflow because every job needs to be tagged together.
# see: https://circleci.com/docs/2.0/workflows/#executing-workflows-for-a-git-tag
docker-on-tag:
jobs:
- docker-build:
filters: *only-version-tags
- docker-push:
context: dockerhub
filters: *only-version-tags
requires:
- docker-build

0 comments on commit 23ecce5

Please sign in to comment.