diff --git a/.circleci/config.yml b/.circleci/config.yml index 0cd964f03b30..c537018a99e7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,13 +3,6 @@ setup: true orbs: continuation: circleci/continuation@0.2.0 -aliases: - only-version-tags: &only-version-tags - tags: - only: /^v[0-9].*/ - branches: - ignore: /.*/ - jobs: generate-params: executor: continuation/default @@ -43,9 +36,3 @@ workflows: setup-workflow: jobs: - generate-params - - # NOTE: CircleCI only builds tags if you explicitly filter for them. - setup-workflow-tag: - jobs: - - generate-params: - filters: *only-version-tags diff --git a/.circleci/main.yml b/.circleci/main.yml index 2f1fcc16d624..b6bd73a8646b 100644 --- a/.circleci/main.yml +++ b/.circleci/main.yml @@ -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 @@ -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: @@ -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 @@ -423,35 +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