Skip to content

Commit

Permalink
Test build without push.
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinMind committed Mar 1, 2024
1 parent 306a20a commit 08f7cc8
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,9 @@ commands:
make_release:
description: "Builds and pushes a Docker image"
parameters:
push:
type: boolean
default: false
image_tag:
type: string
default: "latest"
Expand All @@ -368,8 +371,16 @@ commands:
docker version
docker login -u "${DOCKERHUB_USER}" -p "${DOCKERHUB_PASS}"
docker build -t app:build --label git.commit="$CIRCLE_SHA1" .
docker tag app:build "${DOCKERHUB_REPO}":<< parameters.image_tag >>
docker push "${DOCKERHUB_REPO}":<< parameters.image_tag >>
- when:
condition: << parameters.push >>
steps:
- run:
name: Wait for services to be ready
command: |
docker tag app:build "${DOCKERHUB_REPO}":<< parameters.image_tag >>
# Disable for now so we can test tagging on PR.
# docker push "${DOCKERHUB_REPO}":<< parameters.image_tag >>
better_checkout:
description: circle ci checkout step on steroids
Expand Down Expand Up @@ -610,19 +621,31 @@ jobs:
- run:
command: pytest -m "es_tests and not needs_locales_compilation and not static_assets" -v src/olympia/

build-image:
<<: *defaults-release
steps:
- checkout
- make_release:
# use invalid tag
image_tag: test
# explicitly don't push
push: false

release-master:
<<: *defaults-release
steps:
- checkout
- make_release:
image_tag: latest
push: true

release-tag:
<<: *defaults-release
steps:
- checkout
- make_release:
image_tag: "${CIRCLE_TAG}"
push: true

workflows:
version: 2
Expand All @@ -635,6 +658,7 @@ workflows:
- devhub
- docs
- main
- build-image
- reviewers-and-zadmin
- es-tests
- localization
Expand Down

0 comments on commit 08f7cc8

Please sign in to comment.