Skip to content

Commit 378ee03

Browse files
author
Davor Gajic
committed
add pausing of apps
1 parent f0c07d1 commit 378ee03

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ require (
2727
github.com/mattn/go-isatty v0.0.20
2828
github.com/moby/moby v27.1.1+incompatible
2929
github.com/moby/term v0.5.0
30-
github.com/ninech/apis v0.0.0-20250414123537-0c072cefe5dc
30+
github.com/ninech/apis v0.0.0-20250422123651-106683d37e60
3131
github.com/posener/complete v1.2.3
3232
github.com/prometheus/common v0.55.0
3333
github.com/stretchr/testify v1.9.0

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -589,6 +589,8 @@ github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+
589589
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
590590
github.com/ninech/apis v0.0.0-20250414123537-0c072cefe5dc h1:ORI0kIZI0IzlrxRKVQUIQ7goWXxjxEsmnFJ2lOUgXUQ=
591591
github.com/ninech/apis v0.0.0-20250414123537-0c072cefe5dc/go.mod h1:6srtlYi3nj8GRxQkbhvSbanIBc9vsoPLFOp5VQzNNhM=
592+
github.com/ninech/apis v0.0.0-20250422123651-106683d37e60 h1:XnH0Xlt5VLPx3N4CSNh7Uo55jj3dscICxsvlL1WUEuY=
593+
github.com/ninech/apis v0.0.0-20250422123651-106683d37e60/go.mod h1:6srtlYi3nj8GRxQkbhvSbanIBc9vsoPLFOp5VQzNNhM=
592594
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
593595
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
594596
github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4=

update/application.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ type applicationCmd struct {
4949
DeleteScheduledJob *string `help:"Delete a scheduled job by name"`
5050
RetryRelease *bool `help:"Retries release for the application." placeholder:"false"`
5151
RetryBuild *bool `help:"Retries build for the application if set to true." placeholder:"false"`
52+
Pause *bool `help:"Pauses the application if set to true. Stops all costs." placeholder:"false"`
5253
GitInformationServiceURL string `help:"URL of the git information service." default:"https://git-info.deplo.io" env:"GIT_INFORMATION_SERVICE_URL" hidden:""`
5354
SkipRepoAccessCheck bool `help:"Skip the git repository access check" default:"false"`
5455
Debug bool `help:"Enable debug messages" default:"false"`
@@ -288,6 +289,10 @@ func (cmd *applicationCmd) applyUpdates(app *apps.Application) {
288289
}
289290
app.Spec.ForProvider.BuildEnv = util.UpdateEnvVars(app.Spec.ForProvider.BuildEnv, buildEnv, buildDelEnv)
290291

292+
if cmd.Pause != nil && *cmd.Pause {
293+
app.Spec.ForProvider.Paused = *cmd.Pause
294+
}
295+
291296
if cmd.DockerfileBuild.Path != nil {
292297
app.Spec.ForProvider.DockerfileBuild.DockerfilePath = *cmd.DockerfileBuild.Path
293298
warnIfDockerfileNotEnabled(app, "path")

0 commit comments

Comments
 (0)