Skip to content

Commit

Permalink
added gha trigger to release and put the unless condition under the s…
Browse files Browse the repository at this point in the history
…ame 'when' condition as the release (#1744)
  • Loading branch information
Yonatan-Kaplounov authored Jan 8, 2024
1 parent 3bb1161 commit ae087fa
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 30 deletions.
77 changes: 47 additions & 30 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,18 @@ parameters:
description: Deci ai ORB version https://circleci.com/developer/orbs/orb/deci-ai/circleci-common-orb
default: "10.5.1"
# default: "dev:alpha"
GHA_Event:
type: string
default: ""
GHA_Actor:
type: string
default: ""
GHA_Action:
type: string
default: ""
GHA_Meta:
type: string
default: ""

orbs:
deci-common: deci-ai/circleci-common-orb@<< pipeline.parameters.orb_version >>
Expand Down Expand Up @@ -873,33 +885,33 @@ jobs:
dockerfile: 'scripts/Dockerfile.branch'

workflows:
sanity_tests:
when: << pipeline.parameters.run_sanity_tests_flow >>
jobs:
- hydra_sweeper_test:
context:
- slack
- recipe_sanity_tests_classification_pt1:
context:
- slack
- recipe_sanity_tests_classification_pt2:
context:
- slack
- recipe_sanity_tests_segmentation:
context:
- slack
- recipe_sanity_tests_detection:
context:
- slack
- recipe_sanity_tests_pose_estimation:
context:
- slack
- recipe_accuracy_tests:
context:
- slack
- run_and_convert_notebooks_to_docs:
context:
- slack
# sanity_tests:
# when: << pipeline.parameters.run_sanity_tests_flow >>
# jobs:
# - hydra_sweeper_test:
# context:
# - slack
# - recipe_sanity_tests_classification_pt1:
# context:
# - slack
# - recipe_sanity_tests_classification_pt2:
# context:
# - slack
# - recipe_sanity_tests_segmentation:
# context:
# - slack
# - recipe_sanity_tests_detection:
# context:
# - slack
# - recipe_sanity_tests_pose_estimation:
# context:
# - slack
# - recipe_accuracy_tests:
# context:
# - slack
# - run_and_convert_notebooks_to_docs:
# context:
# - slack
run_and_convert_notebooks_to_docs:
when: << pipeline.parameters.run_and_convert_notebooks_to_docs >>
jobs:
Expand All @@ -908,10 +920,15 @@ workflows:
- slack

release:
unless:
when:
or:
- << pipeline.parameters.ad_hoc_container_build >>
- << pipeline.parameters.ad_hoc_container_build_code_only >>
- and:
- << pipeline.parameters.GHA_Action >>
- equal: [ "release", << pipeline.parameters.GHA_Event >> ]
- or:
- << pipeline.parameters.ad_hoc_container_build >>
- << pipeline.parameters.ad_hoc_container_build_code_only >>

jobs:
- deci-common/persist_version_info:
version_override: $CIRCLE_TAG
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/trigger-release-flow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: 'Ci Release Trigger'

on:
release:
types: [ published ]

workflow_dispatch:


jobs:
trigger-circleci:
runs-on: ubuntu-latest
steps:
- name: Trigger Circle CI
id: trigger_circle_ci
uses: CircleCI-Public/trigger-circleci-pipeline-action@v1.1.0
env:
CCI_TOKEN: ${{ secrets.CIRCLE_CI_TOKEN }}

3 comments on commit ae087fa

@ranrubin
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure (and it's not documented) what the change meant to fix. I'm changing it back, and @Yonatan-Kaplounov you can explain what you did here and we can re-enter your changes.

@Yonatan-Kaplounov
Copy link
Contributor Author

@Yonatan-Kaplounov Yonatan-Kaplounov commented on ae087fa Jan 23, 2024 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ranrubin
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation that is missing is why you did the changes, and what issue they meant to fix. Nothing is mentioned in the PR (#1744 ) as well.
I highly doubt that a release flow that runs for ~2 years will stop behaving the same one morning, so when you come back, you can gather proofs for your claims and we can take a second look and re-enter your changes :)

Please sign in to comment.