Skip to content

Commit

Permalink
refactored Go Tracer for Go version 1.23
Browse files Browse the repository at this point in the history
  • Loading branch information
Angith committed Aug 21, 2024
1 parent 99bed75 commit 9bd4706
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 3 deletions.
32 changes: 31 additions & 1 deletion .tekton/ci-build/github-eventlistener.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,36 @@ spec:
# After variable resolution, this has to be maximum 63 character long,
# lower case, RFC 1123 subdomain name. The regex used for validation is
# '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'
name: $(tt.params.git-branch-normalized)-go23-$(tt.params.git-commit-short-sha)
spec:
params:
- name: revision
value: $(tt.params.git-branch)
- name: git-commit-sha
value: $(tt.params.git-commit-sha)
- name: go-version
value: "1.23"
- name: excludeDirs
value: ""
pipelineRef:
name: go-tracer-ci-pipeline
workspaces:
- name: go-tracer-ci-pipeline-pvc
volumeClaimTemplate:
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
- name: cache-pvc
persistentVolumeClaim:
claimName: cache-pvc


- apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
name: $(tt.params.git-branch-normalized)-go22-$(tt.params.git-commit-short-sha)
spec:
params:
Expand All @@ -31,7 +61,7 @@ spec:
- name: go-version
value: "1.22"
- name: excludeDirs
value: ""
value: "./instrumentation/instacosmos"
pipelineRef:
name: go-tracer-ci-pipeline
workspaces:
Expand Down
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ endif
test: $(MODULES) legal

$(MODULES):
cd $@ && go get -d -t ./... && go test $(GOFLAGS) ./...
cd $@ && go get -t ./... && go test $(GOFLAGS) ./...
ifeq ($(RUN_LINTER),yes)
cd $@ && $(LINTER) run
endif
Expand Down Expand Up @@ -66,7 +66,8 @@ install:

# Make sure there is a copyright at the first line of each .go file
legal:
awk 'FNR==1 { if (tolower($$0) !~ "^//.+copyright") { print FILENAME" does not contain copyright header"; rc=1 } }; END { exit rc }' $$(find . -name '*.go' -type f | grep -v "/vendor/")
@printf "Verifying that Go files include copyright headers\n"
@awk 'FNR==1 { if (tolower($$0) !~ "^//.+copyright") { print FILENAME" does not contain copyright header"; rc=1 } }; END { print "Done!"; exit rc }' $$(find . -name '*.go' -type f | grep -v "/vendor/")

instrumentation/% :
mkdir -p $@
Expand Down

0 comments on commit 9bd4706

Please sign in to comment.