Last active
August 10, 2020 21:24
-
-
Save dojci/dee775544c73139a140931d7c028540e to your computer and use it in GitHub Desktop.
cf-approval-cache-issue
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
version: "1.0" | |
mode: "parallel" | |
stages: | |
- "prepare" | |
- "test" | |
- "finish" | |
steps: | |
loadPipelineVars: | |
stage: "prepare" | |
title: "Load pipeline variables" | |
image: "alpine:latest" | |
commands: | |
# Helper pipeline variables | |
- cf_export PIPELINE_CACHE_PATH=${CF_VOLUME_PATH}/pipeline_cache | |
preparePipelineCache: | |
stage: "prepare" | |
title: "Prepare pipeline cache" | |
image: "alpine:latest" | |
commands: | |
- mkdir -p ${PIPELINE_CACHE_PATH} | |
- touch ${PIPELINE_CACHE_PATH}/foo | |
when: | |
condition: | |
all: | |
dependsOnPipelineVars: steps.loadPipelineVars.result == 'success' | |
showPipelineCacheContentBeforeApproval: | |
stage: "test" | |
title: "Show pipeline cache content before approval step" | |
image: "alpine:latest" | |
commands: | |
- ls ${PIPELINE_CACHE_PATH} | |
when: | |
condition: | |
all: | |
dependsOnPipelineCache: steps.preparePipelineCache.result == 'success' | |
waitForApproval: | |
stage: "test" | |
title: "Cache content exists ?" | |
type: pending-approval | |
fail_fast: false | |
when: | |
condition: | |
all: | |
dependsOnPipelineCacheContent: steps.showPipelineCacheContentBeforeApproval.result == 'success' | |
dependsOnPipelineCache: steps.preparePipelineCache.result == 'success' | |
showPipelineCacheContentAfterApproval: | |
stage: "test" | |
title: "Show pipeline cache content after approval step" | |
image: "alpine:latest" | |
commands: | |
- ls ${PIPELINE_CACHE_PATH} | |
when: | |
condition: | |
all: | |
dependsOnExchangeConfigsApproval: steps.waitForApproval.result == 'approved' | |
dependsOnPipelineCache: steps.preparePipelineCache.result == 'success' | |
finishPipeline: | |
stage: "finish" | |
title: "Finish" | |
image: "alpine:latest" | |
commands: | |
- echo Finished | |
when: | |
condition: | |
all: | |
dependsOnPipelineStaus: workflow.result == 'terminated' || workflow.result == 'failure' || workflow.result == 'success' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment