cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Overwrite App when deploying using github action

dubois_david
Guide

I have written a github action to try to deploy our custom app when changes are made.  When doing so I am being asked to choose whether I want to overwrite the existing app or not.  Since this is automation I do not want to have this question pop up but instead wish it to automatically overwrite.

deployapp.jpg

Is there a way to do this?

3 REPLIES 3

dubois_david
Guide

I determined if I use the command Run npx dt-app deploy --force-overwrite instead of npm run deploy the overwrite works.

christian_kreuz
Dynatrace Advisor
Dynatrace Advisor

When trying to add parameters to "npm run", you have to do say via adding an additional "--" in between, e.g.:

npm run deploy -- --force-overwrite

See https://docs.npmjs.com/cli/v10/commands/npm-run-script for details.

Alternatively, as you also mentioned in your comment bellow, you can use "dt-app deploy --force-overwrite".

haris
Dynatrace Advisor
Dynatrace Advisor

Starting with 0.138.0, dt-app overwrites previously deployed apps by default without the need to provide cli parameter --force-overwrite. In fact dt-app now displays a warning if you try to use the --force-overwrite flag:

 
 
Warning ──────────────────────────────────────────────────────────────────────────────────────── The --force-overwrite flag is deprecated. Apps, deployed by other users, are now overwritten by default ────────────────────────────────────────────────────────────────────────────────────────────────

Featured Posts