Skip to content

Commit

Permalink
💚(circle) allow executing jobs for pre-release tags
Browse files Browse the repository at this point in the history
We want to build and push `ralph-malph` package to PyPi for a pre-release.
We also want to build and push Ralph docker image for pre-releases.
We should be able to do so when tagging appropriately (e.g. `4.0.0-b1`).
This prevents executing the other jobs triggered on tags.
It also prevents tagging Ralph docker image as `latest` when triggered on tag.
  • Loading branch information
wilbrdt committed Dec 18, 2023
1 parent b04ddd1 commit 991cee5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,8 @@ jobs:
# - DOCKER_TAG: 1.1.2 (Git tag v1.1.2)
echo "DOCKER_TAG: ${DOCKER_TAG} (Git ${RELEASE_TYPE}${CIRCLE_TAG})"
docker tag ralph:${CIRCLE_SHA1} fundocker/ralph:${DOCKER_TAG}
if [[ -n "$CIRCLE_TAG" ]]; then
# Tag as "latest" for stable release git tags
if [[ -n "$CIRCLE_TAG" ]] && [[ "$CIRCLE_TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
docker tag ralph:${CIRCLE_SHA1} fundocker/ralph:latest
fi
docker images | grep -E "^fundocker/ralph\s*(${DOCKER_TAG}.*|latest|master)"
Expand All @@ -441,7 +442,7 @@ jobs:
# - DOCKER_TAG: 1.1.2 (Git tag v1.1.2)
echo "DOCKER_TAG: ${DOCKER_TAG} (Git ${RELEASE_TYPE}${CIRCLE_TAG})"
docker push fundocker/ralph:${DOCKER_TAG}
if [[ -n "$CIRCLE_TAG" ]]; then
if [[ -n "$CIRCLE_TAG" ]] && [[ "$CIRCLE_TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
docker push fundocker/ralph:latest
fi
Expand Down Expand Up @@ -667,8 +668,7 @@ workflows:
only: /^v.*/

# Publish the documentation website to GitHub Pages.
# Only do it for master and for tagged releases with a tag starting with
# the letter v.
# Only do it for master and for tagged stable releases with a tag in the format vX.Y.Z
- deploy-docs:
requires:
- tray
Expand All @@ -677,7 +677,7 @@ workflows:
branches:
only: master
tags:
only: /^v.*/
only: /^v[0-9]+\.[0-9]+\.[0-9]+$/

# Release
- release:
Expand All @@ -688,4 +688,4 @@ workflows:
branches:
only: master
tags:
only: /^v.*/
only: /^v[0-9]+\.[0-9]+\.[0-9]+$/

0 comments on commit 991cee5

Please sign in to comment.