forked from openshift-helm-charts/development
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b51d4a7
commit bfe03ad
Showing
1 changed file
with
102 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
name: CI | ||
|
||
on: | ||
milestone: | ||
types: [opened] | ||
|
||
jobs: | ||
|
||
setup: | ||
name: "Zero" | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- run: echo "tamaman" | ||
|
||
|
||
validate-submission: | ||
name: "First" | ||
runs-on: ubuntu-22.04 | ||
needs: [setup] | ||
|
||
steps: | ||
- run: echo "Ah que coucou" | ||
|
||
- run: exit 1 | ||
|
||
|
||
chart-verifier: | ||
name: "Second" | ||
runs-on: ubuntu-22.04 | ||
needs: [setup, validate-submission] | ||
|
||
outputs: | ||
chart-verifier-outcome: ${{ steps.chart-verifier-step.conclusion }} | ||
chart-verifier-step: ${{ steps.chart-verifier-step.outputs.chart-verifier-step }} | ||
|
||
steps: | ||
- run: exit 1 | ||
- id: chart-verifier-step | ||
run: echo "chart-verifier-step=Tu-veux-voir" | tee -a $GITHUB_OUTPUT | ||
|
||
# - run: exit 1 | ||
|
||
manage-pr: | ||
name: "Third" | ||
runs-on: ubuntu-22.04 | ||
needs: [setup, chart-verifier, validate-submission] | ||
|
||
# Run manage-pr as long as setup was successfull, independently from potential errors in validate-submission or chart-verifier | ||
if: ${{ always() && needs.setup.result == 'success' }} | ||
|
||
steps: | ||
- run: echo "MA BITE !" | ||
|
||
# - name: "Sanitize output in case chart-verifier job did not run" | ||
# run: | | ||
# if "${{ needs.chart-verifier.result }}" == ""; then | ||
# echo "chart-verifier-outcome=skipped" | tee -a $GITHUB_OUTPUT | ||
|
||
- run: | | ||
echo "chart verifier job result: " ${{ needs.chart-verifier.result || 'custom skip1' }} | ||
echo "chart verifier step outcome: " ${{ needs.chart-verifier.outputs.chart-verifier-outcome || 'custom skip2' }} | ||
echo "Value from chart verifier step: " ${{ needs.chart-verifier.outputs.chart-verifier-step || 'custom skip3' }} | ||
# env: | ||
# three: ${{ needs.chart-verifier.outputs.chart-verifier-step || 'custom skip3' }} | ||
# one: ${{ needs.chart-verifier.result || 'custom skip' }} | ||
# two: ${{ needs.chart-verifier.result == "toto" && "custom skip" || "tata" }} | ||
# steps: | ||
# - run: python3 --version | ||
|
||
# - run: pip install environs | ||
|
||
# - id: my_output | ||
# run: | | ||
# cat << EOF > script1.py | ||
# import os | ||
|
||
# def add_output(name, value): | ||
# with open(os.environ["GITHUB_OUTPUT"], "a") as fh: | ||
# print(f"Adding to GITHUB_OUTPUT: {name}={value}") | ||
# print(f"{name}={value}", file=fh) | ||
|
||
# # add_output("web_catalog_only", True) | ||
# EOF | ||
|
||
# python3 script1.py | ||
|
||
# - env: | ||
# WEB_CATALOG_ONLY: ${{ steps.my_output.outputs.web_catalog_only }} | ||
# run: | | ||
# echo $WEB_CATALOG_ONLY | ||
|
||
# cat << EOF > script2.py | ||
# from environs import Env | ||
# env = Env() | ||
# web_catalog_only = env.bool("WEB_CATALOG_ONLY", False) | ||
# print("type is: " + str(type(web_catalog_only))) | ||
# print("value is: " + str(web_catalog_only)) | ||
# EOF | ||
|
||
# python3 script2.py |