Skip to content

Commit bc940f1

Browse files
satrRichard87
andauthored
Added stop scheduled-job commands (#116)
* Added stop scheduled-job commands * Added examples for the scheduled-job commands * Updated versions * Added autocomplete for jobs and batches * Update cmd/stopScheduledJobs.go Co-authored-by: Richard Hagen <[email protected]> * Added endpoints to stop jobs and batches for entire environment * Added command to get batches and jobs * Extended command to get batches and jobs * Added silence error option * Added batch summary test * Added job summary text --------- Co-authored-by: Richard Hagen <[email protected]>
1 parent 13a6146 commit bc940f1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+3243
-68
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,4 @@ jobs:
4848
- name: golangci-lint
4949
uses: golangci/golangci-lint-action@v6
5050
with:
51-
version: v1.60
51+
version: v1.64.3

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ ifndef HAS_SWAGGER
3232
go install github.com/go-swagger/go-swagger/cmd/[email protected]
3333
endif
3434
ifndef HAS_GOLANGCI_LINT
35-
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.58.2
35+
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.64.3
3636
endif
3737
ifndef HAS_GORELEASER
3838
go install github.com/goreleaser/[email protected]

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Visit https://github.com/equinor/radix-cli/releases/latest and download the appr
6464
Either run the tar command to extract the contents (replacing the filename with the one you downloaded)
6565

6666
```batch
67-
tar -xf radix-cli_0.0.16_Windows_x86_64.tar.gz
67+
tar -xf radix-cli_1.26.0_Windows_x86_64.tar.gz
6868
```
6969

7070
or use a third-party tool like _WinZip_, _WinRar_ or _7zip_ to extract it.
@@ -148,7 +148,7 @@ Want to [contribute](./CONTRIBUTING.md)?
148148

149149
Client code is generated from swagger contract definition of the latest contract of the Radix API server. We use [go-swagger](https://github.com/go-swagger/go-swagger/blob/master/docs/install.md). Install it by:
150150
```
151-
go install github.com/go-swagger/go-swagger/cmd/swagger@v0.30.5
151+
go install github.com/go-swagger/go-swagger/cmd/swagger@v0.31.0
152152
```
153153
The generated code should not be checked in, but will be generated on build of the CLI. When go-swagger is installed you can generate code using this command:
154154
```

cmd/createApplyConfigPipelineJob.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ var createApplyConfigPipelineJobCmd = &cobra.Command{
3636
Long: "Triggers applyConfig of a Radix application according to the radix config in its repository's master branch.",
3737
Example: ` # Create a Radix pipeline apply-config job to apply the radixconfig properties without re-building or re-deploying components.
3838
By default it applies changes to properties DNS alias, build secrets, and create new or soft-delete existing environments.
39-
rx create job apply-config --application radix-test
39+
rx create pipeline-job apply-config --application radix-test
4040
4141
# Create a Radix pipeline applyConfig-only job, short option versions
42-
rx create job apply-config -a radix-test
42+
rx create pipeline-job apply-config -a radix-test
4343
4444
# Create a Radix pipeline apply-config job with external DNS aliases
45-
rx create job apply-config -a radix-test --deploy-external-dns-alias true`,
45+
rx create pipeline-job apply-config -a radix-test --deploy-external-dns-alias true`,
4646
RunE: func(cmd *cobra.Command, args []string) error {
4747
var errs []error
4848
appName, err := config.GetAppNameFromConfigOrFromParameter(cmd, flagnames.Application)

cmd/createBuildDeployPipelineJob.go

+2-3
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,12 @@ import (
1919

2020
"github.com/equinor/radix-cli/generated/radixapi/client/application"
2121
"github.com/equinor/radix-cli/generated/radixapi/models"
22+
"github.com/equinor/radix-cli/pkg/client"
2223
"github.com/equinor/radix-cli/pkg/config"
24+
"github.com/equinor/radix-cli/pkg/flagnames"
2325
"github.com/equinor/radix-cli/pkg/model"
2426
"github.com/equinor/radix-cli/pkg/utils/completion"
2527
log "github.com/sirupsen/logrus"
26-
27-
"github.com/equinor/radix-cli/pkg/client"
28-
"github.com/equinor/radix-cli/pkg/flagnames"
2928
"github.com/spf13/cobra"
3029
)
3130

cmd/createDeployPipelineJob.go

+7-8
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,11 @@ import (
2121

2222
"github.com/equinor/radix-cli/generated/radixapi/client/application"
2323
"github.com/equinor/radix-cli/generated/radixapi/models"
24+
"github.com/equinor/radix-cli/pkg/client"
2425
"github.com/equinor/radix-cli/pkg/config"
26+
"github.com/equinor/radix-cli/pkg/flagnames"
2527
"github.com/equinor/radix-cli/pkg/utils/completion"
2628
log "github.com/sirupsen/logrus"
27-
28-
"github.com/equinor/radix-cli/pkg/client"
29-
"github.com/equinor/radix-cli/pkg/flagnames"
3029
"github.com/spf13/cobra"
3130
)
3231

@@ -35,19 +34,19 @@ var createDeployPipelineJobCmd = &cobra.Command{
3534
Short: "Will trigger deploy of a Radix application",
3635
Long: "Triggers deploy of a Radix application according to the radix config in its repository's master branch.",
3736
Example: ` # Create a Radix pipeline deploy-only job to deploy an application "radix-test" to an environment "dev"
38-
rx create job deploy --application radix-test --environment dev
37+
rx create pipeline-job deploy --application radix-test --environment dev
3938
4039
# Create a Radix pipeline deploy-only job, short option versions
41-
rx create job deploy -a radix-test -e dev
40+
rx create pipeline-job deploy -a radix-test -e dev
4241
4342
# Create a Radix pipeline deploy-only job to deploy an application with re-defined image-tags. These image tags will re-define
44-
rx create job deploy --application radix-test --environment dev --image-tag web-app=web-app-v2.1
43+
rx create pipeline-job deploy --application radix-test --environment dev --image-tag web-app=web-app-v2.1
4544
4645
# Create a Radix pipeline deploy-only job with re-defined image-tags for components, short option versions
47-
rx create job deploy -a radix-test -e dev -t web-app=web-app-v2.1 -t api-server=api-v1.0
46+
rx create pipeline-job deploy -a radix-test -e dev -t web-app=web-app-v2.1 -t api-server=api-v1.0
4847
4948
# Create a Radix pipeline deploy-only job to deploy only specific components
50-
rx create job deploy -a radix-test -e dev --component web-app --component api-server`,
49+
rx create pipeline-job deploy -a radix-test -e dev --component web-app --component api-server`,
5150
RunE: func(cmd *cobra.Command, args []string) error {
5251
var errs []error
5352
appName, err := config.GetAppNameFromConfigOrFromParameter(cmd, flagnames.Application)

cmd/createEnvironment.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ var createEnvironmentCmd = &cobra.Command{
6060

6161
func init() {
6262
createCmd.AddCommand(createEnvironmentCmd)
63-
createEnvironmentCmd.Flags().StringP(flagnames.Application, "a", "", "Name of the application namespace")
63+
createEnvironmentCmd.Flags().StringP(flagnames.Application, "a", "", "Name of the application")
6464
createEnvironmentCmd.Flags().StringP(flagnames.Environment, "e", "", "Name of the environment to create")
6565
_ = createEnvironmentCmd.RegisterFlagCompletionFunc(flagnames.Application, completion.ApplicationCompletion)
6666
_ = createEnvironmentCmd.RegisterFlagCompletionFunc(flagnames.Environment, completion.EnvironmentCompletion)

cmd/createPromotePipelineJob.go

+2-4
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,11 @@ import (
2222
"github.com/equinor/radix-cli/generated/radixapi/client/application"
2323
"github.com/equinor/radix-cli/generated/radixapi/client/environment"
2424
"github.com/equinor/radix-cli/generated/radixapi/models"
25+
"github.com/equinor/radix-cli/pkg/client"
2526
"github.com/equinor/radix-cli/pkg/config"
27+
"github.com/equinor/radix-cli/pkg/flagnames"
2628
"github.com/equinor/radix-cli/pkg/utils/completion"
27-
2829
log "github.com/sirupsen/logrus"
29-
30-
"github.com/equinor/radix-cli/pkg/client"
31-
"github.com/equinor/radix-cli/pkg/flagnames"
3230
"github.com/spf13/cobra"
3331
)
3432

0 commit comments

Comments
 (0)