Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: clean up old GHA and Docker Hub deployment workflows #765

Merged
merged 2 commits into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
116 changes: 25 additions & 91 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -355,65 +355,6 @@ jobs:
- autopush-locust.tar

deploy:
docker:
- image: docker:18.03.0-ce
auth:
username: $DOCKER_USER
password: $DOCKER_PASS
parameters:
image:
type: string
repo:
type: string
steps:
- setup_remote_docker
- docker_login
- attach_workspace:
at: /cache
- run:
name: Restore Docker image cache
command: docker load -i /cache/docker.tar
- run:
name: Deploy to Dockerhub
command: |
if [ "${CIRCLE_BRANCH}" == "master" ]; then
# deploy master
docker login -u $DOCKER_USER -p $DOCKER_PASS
docker tag <<parameters.image>> <<parameters.repo>>:latest
docker push <<parameters.repo>>:latest
elif [ ! -z "${CIRCLE_TAG}" ]; then
# deploy a release tag
docker login -u $DOCKER_USER -p $DOCKER_PASS
echo "<<parameters.repo>>:${CIRCLE_TAG}"
docker tag <<parameters.image>> "<<parameters.repo>>:${CIRCLE_TAG}"
docker images
docker push "<<parameters.repo>>:${CIRCLE_TAG}"
fi

deploy-load-test:
docker:
- image: cimg/base:2024.06
steps:
- checkout
- attach_workspace:
at: /tmp/workspace
- setup_remote_docker
- run:
name: Load Docker Image From Workspace
command: docker load -i /tmp/workspace/autopush-locust.tar
- docker_login:
load: True
- run:
name: Push to Docker Hub
command: |
echo ${DOCKERHUB_LOAD_TEST_REPO}:${CIRCLE_SHA1}
docker tag autopush-locust ${DOCKERHUB_LOAD_TEST_REPO}:${CIRCLE_SHA1}
docker tag autopush-locust ${DOCKERHUB_LOAD_TEST_REPO}:latest
docker images
docker push "${DOCKERHUB_LOAD_TEST_REPO}:${CIRCLE_SHA1}"
docker push "${DOCKERHUB_LOAD_TEST_REPO}:latest"

deploy-to-gar:
executor: gcp-gcr/default
parameters:
build_tag:
Expand Down Expand Up @@ -461,6 +402,29 @@ jobs:
registry-url: <<parameters.registry-url>>
tag: $GAR_TAG,latest

deploy-load-test:
docker:
- image: cimg/base:2024.06
steps:
- checkout
- attach_workspace:
at: /tmp/workspace
- setup_remote_docker
- run:
name: Load Docker Image From Workspace
command: docker load -i /tmp/workspace/autopush-locust.tar
- docker_login:
load: True
- run:
name: Push to Docker Hub
command: |
echo ${DOCKERHUB_LOAD_TEST_REPO}:${CIRCLE_SHA1}
docker tag autopush-locust ${DOCKERHUB_LOAD_TEST_REPO}:${CIRCLE_SHA1}
docker tag autopush-locust ${DOCKERHUB_LOAD_TEST_REPO}:latest
docker images
docker push "${DOCKERHUB_LOAD_TEST_REPO}:${CIRCLE_SHA1}"
docker push "${DOCKERHUB_LOAD_TEST_REPO}:latest"

workflows:
build-test-deploy:
jobs:
Expand Down Expand Up @@ -511,11 +475,10 @@ workflows:
tags:
only: /.*/

# Comment out the following four sections for local CircleCI testing.
# Comment out the following two sections for local CircleCI testing.
- deploy:
name: deploy-autoconnect
image: autoconnect:build
repo: ${DOCKERHUB_CONNECT_REPO}
image: autoconnect
requires:
- build-autoconnect
- Integration Tests
Expand All @@ -529,35 +492,6 @@ workflows:

- deploy:
name: deploy-autoendpoint
image: autoendpoint:build
repo: ${DOCKERHUB_ENDPOINT_REPO}
requires:
- build-autoendpoint
- Integration Tests
- Rust Unit Tests
- Rust Formatting Check
filters:
tags:
only: /.*/
branches:
only: master

- deploy-to-gar:
name: deploy-autoconnect-gar
image: autoconnect
requires:
- build-autoconnect
- Integration Tests
- Rust Unit Tests
- Rust Formatting Check
filters:
tags:
only: /.*/
branches:
only: master

- deploy-to-gar:
name: deploy-autoendpoint-gar
image: autoendpoint
requires:
- build-autoendpoint
Expand Down
88 changes: 0 additions & 88 deletions .github/workflows/build-and-push-image.yml

This file was deleted.

65 changes: 0 additions & 65 deletions .github/workflows/docker.yml

This file was deleted.