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

Separate map_new_plugins into two jobs and allow re-run #1426

Merged
merged 1 commit into from
Oct 31, 2024
Merged
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
21 changes: 13 additions & 8 deletions .github/workflows/map_new_plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ on:

jobs:
# Trigger Layer Mapping only on web_submissions OR if trigger-mapping label is added to PR
trigger_layer_mapping:
name: Trigger Layer Mapping
check_jenkins_jobs:
name: Check Triggers
runs-on: ubuntu-latest
outputs:
all_checks_passed: ${{ steps.set_output.outputs.all_checks_passed }}
if: |
(
(
Expand All @@ -28,6 +30,7 @@ jobs:
run: |
required_checks=("Brain-Score Plugins Unit tests (AWS Jenkins, AWS Execution)" "Brain-Score Non-Plugin Unit tests (AWS Jenkins, AWS Execution)")
completed_checks=0
all_checks_passed=true

echo "Using github PR head sha: ${{ github.event.pull_request.head.sha }}"

Expand All @@ -45,17 +48,19 @@ jobs:
((completed_checks+=1))
else
echo "Job '$check' is NOT successful."
all_checks_passed=false
fi
done

echo "Completed checks: $completed_checks / ${#required_checks[@]}"
echo "::set-output name=all_checks_passed::$all_checks_passed"

# Fail this step if not all required jobs are completed
if [ "$completed_checks" -ne "${#required_checks[@]}" ]; then
echo "Not all required Jenkins jobs are complete. Exiting."
exit 1
fi

trigger_layer_mapping:
name: Trigger Layer Mapping
runs-on: ubuntu-latest
needs: check_jenkins_jobs
if: ${{ needs.check_jenkins_jobs.outputs.all_checks_passed == 'true' }}
steps:
# Check out PR head
- name: Check out repository code
uses: actions/checkout@v4
Expand Down
Loading