I’m on a kubernetes pipeline deployed via helm, using latest versions and images.
I have a step that might perform an exit 78 as the first one of a series.
On pipelines where there’s just an additional step after the potential exit 78 it’s fine, the job will be skipped.
If the pipeline has more steps after the one that should be skipped they will get executed and will not show up in the UI properly.
in the examples above check-and-tag is the method that might return exit 78.
In the rails build screenshot as you can see restore-cache is skipped, but the rest is going on in the background.
Said step source is:
- name: check-and-tag
image: alpine/git
commands:
- if (git diff --exit-code $DRONE_COMMIT_BEFORE $DRONE_COMMIT_AFTER -- rails); then exit 78; fi
- export CUSTOM_BRANCH_NAME=$(basename "${DRONE_SOURCE_BRANCH}" | tr '[:upper:]' '[:lower:]' | sed 's/_/-/g')
- echo -n "$CUSTOM_BRANCH_NAME-$SHORT_SHA" > .tags
environment:
SHORT_SHA: "${DRONE_COMMIT_SHA:0:8}"
I’m not sure how to reproduce, something that comes to mind:
I have some services in the rails pipeline (the one with more steps)
I have more pipelines in the same drone.yml
I do not use failure: ignore or other commands to parallelize pipeline steps.
In this example other-step1, other-step2, other-step3 etc will get executed anyway if rails check-and-tag exits 78, although it will not show in the UI.
Did you install using our official helm chart at drone/charts ? I ask because some of the syntax in your example is from an experimental, deprecated kubernetes runtime. If you are using our official helm chart, please note that this chart does not install the :latest runner image, so you may be missing some newer features or bug fixes.
Please test with drone/drone-runner-kube:latest to ensure you are testing with the latest version of the software, and that we are not triaging something that has already been fixed. As this is beta software, the codebase evolves quickly, and it is very possible it was an issue previously, and has since been resolved.
For reference, the underlying code to handle exit 78 comes from this shared library and is used by all runners (docker, kubernetes, etc). You can further explore the code here:
I posted an update in my other thread - this issue with exit 78 not working when the pipeline contains a services: declaration seems to be common to both the Docker and Kubernetes runners.