Skip to content

Commit 7f5259e

Browse files
authored
CR-15239-fix-url-concat (#629)
* concact endpoint using url.JoinPath * updated to 0.0.569 * updated to go 1.19 * update golangci-lint to 1.50.1
1 parent 5adbce9 commit 7f5259e

File tree

6 files changed

+14
-9
lines changed

6 files changed

+14
-9
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.18.4-alpine3.16 as base
1+
FROM golang:1.19-alpine3.16 as base
22

33
WORKDIR /go/src/github.com/codefresh-io/cli-v2
44

@@ -26,7 +26,7 @@ RUN go mod verify
2626

2727
############################### CLI ###############################
2828
### Compile
29-
FROM golang:1.18.4-alpine3.16 as codefresh-build
29+
FROM golang:1.19-alpine3.16 as codefresh-build
3030

3131
WORKDIR /go/src/github.com/codefresh-io/cli-v2
3232

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VERSION=v0.0.568
1+
VERSION=v0.0.569
22

33
OUT_DIR=dist
44
YEAR?=$(shell date +"%Y")
@@ -173,7 +173,7 @@ $(GOBIN)/mockgen:
173173
$(GOBIN)/golangci-lint:
174174
@mkdir dist || true
175175
@echo installing: golangci-lint
176-
@curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOBIN) v1.47.3
176+
@curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOBIN) v1.50.1
177177

178178
.PHONY: e2e-local-manifests
179179
e2e-local-manifests:

cmd/commands/runtime_install.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1932,12 +1932,17 @@ func createReporterEventSource(repofs fs.FS, path, namespace string, reporterCre
19321932
}
19331933

19341934
func createSensor(repofs fs.FS, name, path, namespace, eventSourceName string, triggers []string, dataKey string) error {
1935+
triggerUrl, err := url.JoinPath(cfConfig.GetCurrentContext().URL, store.Get().EventReportingEndpoint)
1936+
if err != nil {
1937+
return err
1938+
}
1939+
19351940
sensor := eventsutil.CreateSensor(&eventsutil.CreateSensorOptions{
19361941
Name: name,
19371942
Namespace: namespace,
19381943
EventSourceName: eventSourceName,
19391944
EventBusName: store.Get().EventBusName,
1940-
TriggerURL: cfConfig.GetCurrentContext().URL + store.Get().EventReportingEndpoint,
1945+
TriggerURL: triggerUrl,
19411946
Triggers: triggers,
19421947
TriggerDestKey: dataKey,
19431948
})

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

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

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/codefresh-io/cli-v2
22

3-
go 1.18
3+
go 1.19
44

55
require (
66
github.com/Masterminds/semver/v3 v3.1.1

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.568
8+
version: 0.0.569
99
bootstrapSpecifier: github.com/codefresh-io/cli-v2.git/manifests/argo-cd
1010
components:
1111
- name: events

0 commit comments

Comments
 (0)