Skip to content

Commit

Permalink
fix: update circleci versions
Browse files Browse the repository at this point in the history
  • Loading branch information
kstdl committed Oct 16, 2024
1 parent 46f588d commit 57dce96
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
# https://circleci.com/docs/env-vars/#alpine-linux
shell: /bin/sh -leo pipefail
docker:
- image: docker:20-git
- image: docker:24-git
environment:
- IMAGE: taraxa-indexer
- GOOGLE_PROJECT_ID: jovial-meridian-249123
Expand All @@ -21,23 +21,22 @@ jobs:
echo "export VERSION=$(git rev-parse --short HEAD)" >> $BASH_ENV
- run:
name: Login into gcr
command: |
name: Login into gcr
command: |
echo ${GCLOUD_SERVICE_KEY} | docker login -u _json_key --password-stdin https://gcr.io
- setup_remote_docker:
version: 20.10.14
docker_layer_caching: true

- run:
name: Build docker image
command: |
command: |
docker build -t ${IMAGE}:${VERSION} .
- run:
name: Tag docker image
command: |
command: |
if [[ ${CIRCLE_BRANCH} == "main" ]]; then
docker tag ${IMAGE}:${VERSION} ${GCP_IMAGE}:${CIRCLE_SHA1}
docker tag ${IMAGE}:${VERSION} ${GCP_IMAGE}:${VERSION}
Expand All @@ -57,7 +56,7 @@ jobs:
- run:
name: Push docker image to registry
command: |
command: |
if [[ ${CIRCLE_BRANCH} == "main" ]]; then
docker push ${GCP_IMAGE}:${CIRCLE_SHA1}
Expand All @@ -77,15 +76,14 @@ jobs:
fi
workflows:

build-and-push-docker-image:
jobs:
- build_and_push_docker_image:
context:
- GCR
filters:
branches:
only:
only:
- main
- develop
tags:
Expand Down

0 comments on commit 57dce96

Please sign in to comment.