You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would nice if there were a ignore_error option that could be set to true and default to false.
Use case: I want to execute kubectl delete job <job-name> and not fail if the job doesn't exist, so that in the next stage I can execute kubectl apply -f job.yaml
Here is my current workaround
- name: Delete Migration Jobif: ${{ contains(fromJSON('["prod"]'), matrix.env) }}env:
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}run: | set -e if [ ! -f "$HOME/.kube/config" ]; then if [ ! -z "${KUBE_CONFIG}" ]; then mkdir -p $HOME/.kube echo "$KUBE_CONFIG" | base64 -d > $HOME/.kube/config fi fi kubectl delete job accounts-migrate-database || true
- name: Run Database Migration Jobif: ${{ contains(fromJSON('["prod"]'), matrix.env) }}uses: actions-hub/kubectl@masterenv:
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}with:
args: apply -f kube/job-db-migrate.yaml
The text was updated successfully, but these errors were encountered:
spencerdcarlson
changed the title
Feature Request: ignore error
Feature Request: ignore error flag
Jan 3, 2024
It would nice if there were a
ignore_error
option that could be set totrue
and default tofalse
.Use case: I want to execute
kubectl delete job <job-name>
and not fail if the job doesn't exist, so that in the next stage I can executekubectl apply -f job.yaml
Here is my current workaround
The text was updated successfully, but these errors were encountered: