Skip to content

Commit e661476

Browse files
CR-11429 (#607)
* CR-11429-block git repo with http * CR-14720-remove support for old releases of k8s under 1.21.0
1 parent e98cc54 commit e661476

File tree

7 files changed

+13
-8
lines changed

7 files changed

+13
-8
lines changed

CHANGELOG.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

Makefile

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

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

cmd/commands/common.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,10 @@ func getRepoFromUserInput(cmd *cobra.Command) error {
154154
repoPrompt := promptui.Prompt{
155155
Label: "Repository URL",
156156
Validate: func(value string) error {
157+
if strings.HasPrefix(value, "http:") {
158+
return fmt.Errorf("Invalid URL for Git repository - http is not allowed")
159+
}
160+
157161
host, orgRepo, _, _, _, _, _ := aputil.ParseGitUrl(value)
158162
if host != "" && orgRepo != "" {
159163
return nil

cmd/commands/runtime_install.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,10 @@ func ensureGitData(cmd *cobra.Command, opts *RuntimeInstallOptions) error {
398398
return err
399399
}
400400

401+
if strings.HasPrefix(opts.InsCloneOpts.Repo, "http:") {
402+
return fmt.Errorf("Invalid URL for Git repository - http is not allowed")
403+
}
404+
401405
baseURL, _, _, _, _, _, _ := aputil.ParseGitUrl(opts.InsCloneOpts.Repo)
402406
opts.gitProvider, err = cfgit.GetProvider(cfgit.ProviderType(opts.InsCloneOpts.Provider), baseURL)
403407
if err != nil {

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.555/cf-linux-amd64.tar.gz | tar zx
26+
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.556/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.555/cf-darwin-amd64.tar.gz | tar zx
39+
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.556/cf-darwin-amd64.tar.gz | tar zx
4040

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

manifests/runtime.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ metadata:
55
namespace: "{{ namespace }}"
66
spec:
77
defVersion: 2.1.1
8-
version: 0.0.555
8+
version: 0.0.556
99
bootstrapSpecifier: github.com/codefresh-io/cli-v2/manifests/argo-cd
1010
components:
1111
- name: events

pkg/store/store.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ func init() {
243243
s.NetworkTesterImage = "quay.io/codefresh/cf-venona-network-tester:latest"
244244
s.TCPConnectionTesterGenerateName = "cf-tcp-connections-tester-"
245245
s.TCPConnectionTesterName = "cf-tcp-connections-tester"
246-
s.MinKubeVersion = "v1.18.0"
246+
s.MinKubeVersion = "v1.21.0"
247247
s.MaxKubeVersion = "v1.25.0"
248248
s.MasterIngressName = "-master"
249249
s.InClusterPath = "/bootstrap/cluster-resources/in-cluster"

0 commit comments

Comments
 (0)