Skip to content

Commit 60ff218

Browse files
committed
Use apim
The assets proto file is now suitable for APIM Removed the requirement for avid-builder Added standard default and environment runes AB#10288
1 parent 9e1cecf commit 60ff218

File tree

3 files changed

+11
-50
lines changed

3 files changed

+11
-50
lines changed

.env.tools

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export TOOLS_BUILDNUMBER=20241007.3
1+
export TOOLS_BUILDNUMBER=20241108.3

Taskfile.yml

+9-44
Original file line numberDiff line numberDiff line change
@@ -21,60 +21,25 @@ includes:
2121
# dev-notes/build-warts.md#always-set-dir-relative-to-current-task-file
2222
dir: ./taskfiles
2323

24-
vars:
25-
ACR: rkvstdev.azurecr.io
26-
# Default to the stage master-latest builder image
27-
# Note: the CI tags builder images with the build number of the avid-builder pipeline run,
28-
# i.e. 20220607.10
29-
# For local builder development build run `task builder` in the avid-builder git repo to
30-
# build a new local builder image, then run these tasks like
31-
# task generate BUILDER_ACR=rkvstdev.azurecr.io BUILDER_IMAGE_TAG=dev-$USER
32-
BUILDER_ACR: rkvststage.azurecr.io
33-
BUILDER_IMAGE_TAG: master-latest
34-
35-
BUILD_CONTAINER: go-datatrails-common-api-builder
36-
3724
tasks:
3825

39-
### -------------------------
40-
# Docker container tasks
41-
### -------------------------
42-
43-
builder-start:
44-
summary: |
45-
Creates the build container for go-datatrails-common-api
46-
47-
Many tasks docker exec into this container so DO NOT ADD --rm.
48-
49-
Use defer to cleanup the docker container in top level workflow tasks
50-
which create the builder container
51-
vars:
52-
BUILDER_IMAGE: '{{.BUILDER_ACR}}/avid-builder:{{.BUILDER_IMAGE_TAG}}'
26+
default:
27+
desc: Default task lists all available tasks to run.
5328
cmds:
29+
- which task
5430
- |
55-
docker run \
56-
--env CONCURRENCY={{.SKAFFOLD_CONCURRENCY | default 2}} \
57-
--name {{.BUILD_CONTAINER}} \
58-
-dt -u $(id -u):$(id -g) \
59-
--mount type=bind,src=$(pwd),dst=/avid -w /avid \
60-
{{.BUILDER_IMAGE}}
31+
task --list
6132
62-
builder-cleanup:
63-
summary: cleans up the forestrie build container
33+
environment:
34+
desc: Show environment and location of tools executables.
6435
cmds:
65-
- docker rm -f {{.BUILD_CONTAINER}}
36+
- env | sort
37+
- which go
6638

6739
### -------------------------
6840
# Primary workflow tasks
6941
### -------------------------
7042
all:
71-
desc: "do everything necessary after clone (or rebase) in the builder"
72-
cmds:
73-
- task: builder-start
74-
- defer: {task: builder-cleanup}
75-
- docker exec -t {{.BUILD_CONTAINER}} task local-all
76-
77-
local-all:
7843
desc: |
7944
do everything necessary after clone (or rebase) (faster as it RUNS ON NATIVE HOST)
8045
@@ -105,4 +70,4 @@ tasks:
10570
generate:
10671
desc: generates all the artifacts we need pre-build
10772
cmds:
108-
- task: apis:generate
73+
- task: apis:generate

taskfiles/Taskfile_apis.yml

+1-5
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ tasks:
8080
rm -rf {{.GOOGLE_COMMON_INC_ARCHIVE_BASEDIR}}-{{.GOOGLE_COMMON_PROTOS_VERSION}}
8181
find proto-include -type d
8282
83-
8483
bootstrap:grpc_health:
8584
desc: download and prepare the grpc health definitions we require under proto-include
8685
dir: '..'
@@ -114,15 +113,12 @@ tasks:
114113
github.com/envoyproxy/protoc-gen-validate
115114
cmds:
116115
- |
117-
go get github.com/datatrails/go-datatrails-common-api-gen/tools
118-
119116
go install \
120117
github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway \
121118
github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2 \
122119
google.golang.org/protobuf/cmd/protoc-gen-go \
123120
google.golang.org/grpc/cmd/protoc-gen-go-grpc \
124121
github.com/envoyproxy/protoc-gen-validate \
125-
github.com/lyft/protoc-gen-star/v2 \
126122
github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc
127123
- for: { var: API_PROTO_DEPS }
128124
cmd: |
@@ -278,4 +274,4 @@ tasks:
278274
# OUTPATH: datatrails-common-api
279275
OUTPATH: .
280276
GOBIN:
281-
sh: echo ${GOBIN:-$HOME/go/bin}
277+
sh: echo ${GOBIN:-$HOME/go/bin}

0 commit comments

Comments
 (0)