SCRIPT_RUN_ROLLBACK failed when executing multiple SCRIPT_RUN stages.
Open
@ffjlabo is already working on this.
Since Oct 23, 2024.
kind/bug
- Dominant language
- Go
- Stars
- 1.4k
- Forks
- 364
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 84
Description
What happened:
If you perform a rollback with multiple Script Runs specified, the execution of the SCRIPT_RUN_ROLLBACK stage will fail.
What you expected to happen:
Successfully finish executing the SCRIPT_RUN_ROLLBACK stage.
How to reproduce it:
Execute the deployment with multiple SCRIPT_RUN stage, and cancel after some of them are in the executing.
apiVersion: pipecd.dev/v1beta1
kind: KubernetesApp
spec:
name: script-run-like-jenkins
labels:
env: example
team: product
pipeline:
stages:
- name: SCRIPT_RUN
with:
run: |
sh script.sh
onRollback: |
echo rollback
- name: SCRIPT_RUN
with:
run: |
sleep 10
sh script.sh
onRollback: |
echo $SR_DEPLOYMENT_ID
echo $SR_APPLICATION_ID
echo $SR_APPLICATION_NAME
echo $SR_TRIGGERED_AT
echo $SR_TRIGGERED_COMMIT_HASH
echo $SR_REPOSITORY_URL
echo $SR_SUMMARY
echo $SR_CONTEXT_RAW
sh script.sh
- name: SCRIPT_RUN
with:
run: |
sleep 10
sh script.sh
Environment:
pipedversion:control-planeversion:- Others:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.