Skip to content

Commit

Permalink
wip: ci debug policy
Browse files Browse the repository at this point in the history
  • Loading branch information
boromir674 committed Nov 11, 2023
1 parent 4824c4e commit 385c084
Showing 1 changed file with 2 additions and 50 deletions.
52 changes: 2 additions & 50 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,8 @@ env:
DOCKER_JOB_ON: "true"

### END JOB ON/OFF SWITCHES ###


#### Behaviour - Docker build and Publich ####

# Override policy-dependent decision-making and
# Accept any ALL (branch/build) to Publish to Dockerhub
ALWAYS_BUILD_N_PUBLSIH_DOCKER: "false"
Expand All @@ -64,53 +62,6 @@ env:
## CDelivery : Builds and Publishes if Tests Passed or if Tests were Skipped
# DOCKER_JOB_POLICY: "CDelivery"


## Lower level config ##

# 2 bit state machine
# 0 0 Never build and publish, aka No Admitance, guarantee NO Dockerhub publish
# 0 1 Always build and publish, aka Admit All
# 1 0 pure CI/CD mode, aka Admit if Pass, Require Pass, guarantee quality
# 1 1 CI/CD with Bypass Opt, aka Admit Tested and when Test is OFF, Admit when Test OFF

# alternative 2 bits representations:
# 1. Accept all for Docker 1/0 (1bit), Mode (CICD, or CICD + allow if test OFF) (1bit)
# 2. No Docker Bypass 0/1 (1 bit), Accept all 0/1 (1 bit).

# Define the Policy that our Job uses to decide whether to run the Docker build and publish to Dockerhub

# Pol 1: Run Docker build and publish to Dockerhub only if Tests passed (and ran!)
# aka: Continous Integration / Continuous Deployment
# aka: guranteed quality, everything published is tested
# aka: 'required succesful evaluation', 'accept only a Pass'

# accepted criteria (any of which suffices): [PASS]
# if Docker Job is

# DOCKER_JOB_POLICY: "CI_CD"

# Pol 2: Always run Docker build and publish to Dockerhub
# aka 'Free Admitance', 'No Entry Barrier', 'Free Entrance'

# DOCKER_JOB_POLICY: "ALWAYS_RUN"

# Pol 3: Run Docker build and publish to Dockerhub, if Tests ran and passed, but also if Tests were skipped
# aka: Continous Integration / Continuous Delivery
# aka: 'accepted_when_Test_OFF', 'accept a Pass or a Skip'
# aka:

# accepted criteria (any of which suffices): [PASS, TESTS_SKIPPED]

# DOCKER_JOB_POLICY: "RUN_ON_TEST_PASS_OR_SKIP"

# WIP Pol 4: Never run Docker build and publish to Dockerhub
# aka: garantee that nothing is published
# aka: 'Shutdown', 'No Admitance'

# DOCKER_JOB_POLICY: "NEVER_RUN"

#### End Behaviour ####

##### END Pipeline Settings ######


Expand Down Expand Up @@ -629,6 +580,7 @@ jobs:

docker_build2:
needs: [read_docker_settings, test_suite]
if: always()
uses: boromir674/automated-workflows/.github/workflows/docker.yml@test
with:
DOCKER_USER: ${{ vars.DOCKER_USER }}
Expand Down

0 comments on commit 385c084

Please sign in to comment.