I have pipeline setup that looks similar to that of the pseudo code pasted below.
I am facing a problem with availability of `artifacts.txt` file in the Third step if in-case the Second step is skipped, which is a valid scenario for us.
But looks like whenever the second step is skipped, the artifacts file are not available for third step as well.
How can we get this enabled? Because as per the official documentation:
Artifacts that are created in a step are available to all the following steps.
But it doesn't mentioned what happens if one of the steps in between is skipped, do we have a way around this?
pipelines:
branches:
develop:
- step:
name: Generate Artifacts
script:
- echo "Generate Some Artifact" > artifacts.txt
artifacts:
- artifacts.txt
- step:
name: Optional Build Step
condition:
changesets:
includePaths:
- "build_dir/**"
script:
- echo "Only build if changes made in specific directory"
- step:
name: Mandatory Final Step
script:
- echo "Use artifacts.txt generated in step 1"
- DATA=$(cat artifacts.txt)
- echo "Some final steps of build"