Skip to content

Commit 63ec9c6

Browse files
Bump argocd autopilot (#299)
* bumped argocd-autopilot * bump * codegen
1 parent c029206 commit 63ec9c6

14 files changed

+41
-13
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VERSION=v0.0.274
1+
VERSION=v0.0.275
22

33
OUT_DIR=dist
44
YEAR?=$(shell date +"%Y")

cmd/commands/git-source.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ func NewGitSourceCreateCommand() *cobra.Command {
194194

195195
cmd.Flags().BoolVar(&createRepo, "create-repo", false, "If true, will create the specified git-source repo in case it doesn't already exist")
196196

197-
insCloneOpts = apu.AddCloneFlags(cmd, &apu.CloneFlagsOptions{})
197+
insCloneOpts = apu.AddCloneFlags(cmd, &apu.CloneFlagsOptions{CloneForWrite: true})
198198
gsCloneOpts = apu.AddCloneFlags(cmd, &apu.CloneFlagsOptions{
199199
Prefix: "git-src",
200200
Optional: true,
@@ -564,7 +564,7 @@ func NewGitSourceDeleteCommand() *cobra.Command {
564564
},
565565
}
566566

567-
insCloneOpts = apu.AddCloneFlags(cmd, &apu.CloneFlagsOptions{})
567+
insCloneOpts = apu.AddCloneFlags(cmd, &apu.CloneFlagsOptions{CloneForWrite: true})
568568

569569
return cmd
570570
}
@@ -637,6 +637,7 @@ func NewGitSourceEditCommand() *cobra.Command {
637637

638638
insCloneOpts = apu.AddCloneFlags(cmd, &apu.CloneFlagsOptions{
639639
CreateIfNotExist: true,
640+
CloneForWrite: true,
640641
})
641642

642643
gsCloneOpts = apu.AddCloneFlags(cmd, &apu.CloneFlagsOptions{

cmd/commands/runtime.go

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@ func NewRuntimeInstallCommand() *cobra.Command {
263263

264264
installationOpts.InsCloneOpts = apu.AddCloneFlags(cmd, &apu.CloneFlagsOptions{
265265
CreateIfNotExist: true,
266+
CloneForWrite: true,
266267
})
267268

268269
installationOpts.GsCloneOpts = &git.CloneOptions{
@@ -1393,7 +1394,7 @@ func NewRuntimeUninstallCommand() *cobra.Command {
13931394
cmd.Flags().BoolVar(&uninstallationOpts.Force, "force", false, "If true, will guarantee the runtime is removed from the platform, even in case of errors while cleaning the repo and the cluster")
13941395
cmd.Flags().BoolVar(&uninstallationOpts.FastExit, "fast-exit", false, "If true, will not wait for deletion of cluster resources. This means that full resource deletion will not be verified")
13951396

1396-
uninstallationOpts.CloneOpts = apu.AddCloneFlags(cmd, &apu.CloneFlagsOptions{})
1397+
uninstallationOpts.CloneOpts = apu.AddCloneFlags(cmd, &apu.CloneFlagsOptions{CloneForWrite: true})
13971398
uninstallationOpts.KubeFactory = kube.AddFlags(cmd.Flags())
13981399

13991400
return cmd
@@ -1667,7 +1668,7 @@ func NewRuntimeUpgradeCommand() *cobra.Command {
16671668
}
16681669

16691670
cmd.Flags().StringVar(&versionStr, "version", "", "The runtime version to upgrade to, defaults to latest")
1670-
opts.CloneOpts = apu.AddCloneFlags(cmd, &apu.CloneFlagsOptions{})
1671+
opts.CloneOpts = apu.AddCloneFlags(cmd, &apu.CloneFlagsOptions{CloneForWrite: true})
16711672

16721673
return cmd
16731674
}
@@ -1919,10 +1920,19 @@ func createEventsReporter(ctx context.Context, cloneOpts *git.CloneOptions, opts
19191920
}
19201921

19211922
resPath := cloneOpts.FS.Join(apstore.Default.AppsDir, store.Get().EventsReporterName, opts.RuntimeName, "resources")
1923+
u, err := url.Parse(cloneOpts.URL())
1924+
if err != nil {
1925+
return fmt.Errorf("failed to parse url: %w", err)
1926+
}
1927+
u.Path += "/" + resPath
1928+
q := u.Query()
1929+
q.Add("ref", cloneOpts.Revision())
1930+
u.RawQuery = q.Encode()
1931+
19221932
appDef := &runtime.AppDef{
19231933
Name: store.Get().EventsReporterName,
19241934
Type: application.AppTypeDirectory,
1925-
URL: cloneOpts.URL() + "/" + resPath,
1935+
URL: u.String(),
19261936
IsInternal: true,
19271937
}
19281938
if err := appDef.CreateApp(ctx, opts.KubeFactory, cloneOpts, opts.RuntimeName, store.Get().CFComponentType, "", ""); err != nil {
@@ -1950,10 +1960,19 @@ func createEventsReporter(ctx context.Context, cloneOpts *git.CloneOptions, opts
19501960

19511961
func createReporter(ctx context.Context, cloneOpts *git.CloneOptions, opts *RuntimeInstallOptions, reporterCreateOpts reporterCreateOptions) error {
19521962
resPath := cloneOpts.FS.Join(apstore.Default.AppsDir, reporterCreateOpts.reporterName, opts.RuntimeName, "resources")
1963+
u, err := url.Parse(cloneOpts.URL())
1964+
if err != nil {
1965+
return fmt.Errorf("failed to parse url: %w", err)
1966+
}
1967+
u.Path += "/" + resPath
1968+
q := u.Query()
1969+
q.Add("ref", cloneOpts.Revision())
1970+
u.RawQuery = q.Encode()
1971+
19531972
appDef := &runtime.AppDef{
19541973
Name: reporterCreateOpts.reporterName,
19551974
Type: application.AppTypeDirectory,
1956-
URL: cloneOpts.URL() + "/" + resPath,
1975+
URL: u.String(),
19571976
IsInternal: reporterCreateOpts.IsInternal,
19581977
}
19591978
if err := appDef.CreateApp(ctx, opts.KubeFactory, cloneOpts, opts.RuntimeName, store.Get().CFComponentType, "", ""); err != nil {

docs/commands/cli-v2_git-source_create.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ cli-v2 git-source create RUNTIME_NAME GITSOURCE_NAME [flags]
2525
-u, --git-user string Your git provider user name [GIT_USER] (not required in GitHub)
2626
-h, --help help for create
2727
--repo string Repository URL [GIT_REPO]
28+
-b, --upsert-branch If true will try to checkout the specified branch and create it if it doesn't exist
2829
```
2930

3031
### Options inherited from parent commands

docs/commands/cli-v2_git-source_delete.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ cli-v2 git-source delete RUNTIME_NAME GITSOURCE_NAME [flags]
2121
-u, --git-user string Your git provider user name [GIT_USER] (not required in GitHub)
2222
-h, --help help for delete
2323
--repo string Repository URL [GIT_REPO]
24+
-b, --upsert-branch If true will try to checkout the specified branch and create it if it doesn't exist
2425
```
2526

2627
### Options inherited from parent commands

docs/commands/cli-v2_git-source_edit.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ cli-v2 git-source edit RUNTIME_NAME GITSOURCE_NAME [flags]
2626
-h, --help help for edit
2727
--provider string The git provider, one of: azure|gitea|github|gitlab
2828
--repo string Repository URL [GIT_REPO]
29+
-b, --upsert-branch If true will try to checkout the specified branch and create it if it doesn't exist
2930
```
3031

3132
### Options inherited from parent commands

docs/commands/cli-v2_runtime_install.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ cli-v2 runtime install [runtime_name] [flags]
4444
--repo string Repository URL [GIT_REPO]
4545
--skip-cluster-checks Skips the cluster's checks
4646
--skip-ingress Skips the creation of ingress resources
47+
-b, --upsert-branch If true will try to checkout the specified branch and create it if it doesn't exist
4748
--version string The runtime version to install (default: latest)
4849
--wait-timeout duration How long to wait for the runtime components to be ready (default 8m0s)
4950
```

docs/commands/cli-v2_runtime_uninstall.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ cli-v2 runtime uninstall [RUNTIME_NAME] [flags]
3838
-n, --namespace string If present, the namespace scope for this CLI request
3939
--repo string Repository URL [GIT_REPO]
4040
--skip-checks If true, will not verify that runtime exists before uninstalling
41+
-b, --upsert-branch If true will try to checkout the specified branch and create it if it doesn't exist
4142
--wait-timeout duration How long to wait for the runtime components to be deleted (default 8m0s)
4243
```
4344

docs/commands/cli-v2_runtime_upgrade.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ cli-v2 runtime upgrade [RUNTIME_NAME] [flags]
3232
-u, --git-user string Your git provider user name [GIT_USER] (not required in GitHub)
3333
-h, --help help for upgrade
3434
--repo string Repository URL [GIT_REPO]
35+
-b, --upsert-branch If true will try to checkout the specified branch and create it if it doesn't exist
3536
--version string The runtime version to upgrade to, defaults to latest
3637
```
3738

docs/releases/release_notes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ cf version
2323

2424
```bash
2525
# download and extract the binary
26-
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.274/cf-linux-amd64.tar.gz | tar zx
26+
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.275/cf-linux-amd64.tar.gz | tar zx
2727

2828
# move the binary to your $PATH
2929
mv ./cf-linux-amd64 /usr/local/bin/cf
@@ -36,7 +36,7 @@ cf version
3636

3737
```bash
3838
# download and extract the binary
39-
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.274/cf-darwin-amd64.tar.gz | tar zx
39+
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.275/cf-darwin-amd64.tar.gz | tar zx
4040

4141
# move the binary to your $PATH
4242
mv ./cf-darwin-amd64 /usr/local/bin/cf

0 commit comments

Comments
 (0)