Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't use the script file on the SCRIPT_RUN_ROLBACK stage #5214

Closed
ffjlabo opened this issue Sep 17, 2024 · 0 comments
Closed

Can't use the script file on the SCRIPT_RUN_ROLBACK stage #5214

ffjlabo opened this issue Sep 17, 2024 · 0 comments
Labels
kind/bug Something isn't working

Comments

@ffjlabo
Copy link
Member

ffjlabo commented Sep 17, 2024

What happened:

When using the script file on the onRollback field in app.pipecd.yaml, can't execute it on the SCRIPT_RUN_ROLLBACK stage.
PipeCD
(We can use the script file on the SCRIPT_RUN stage when setting the run option of this stage)

file structure

- app.pipecd.yaml
- script.sh

app.pipecd.yaml

apiVersion: pipecd.dev/v1beta1
kind: KubernetesApp
spec:
  name: script-run-like-jenkins
  labels:
    env: example
    team: product
  pipeline:
    stages:
      - 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

What you expected to happen:

It would be nice to execute the script file when SCRIPT_RUN_ROLLBACK stage is executed.

How to reproduce it:

Environment:

  • piped version:
  • control-plane version:
  • Others:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

1 participant