diff --git a/.env.tools b/.env.tools index 10565b5..cc1221b 100644 --- a/.env.tools +++ b/.env.tools @@ -1 +1 @@ -export TOOLS_BUILDNUMBER=20241007.3 +export TOOLS_BUILDNUMBER=20241108.3 \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3a7ddbc..f13d0c8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,8 +29,7 @@ jobs: repo-token: ${{ secrets.GITHUB_TOKEN }} - name: Generate, Test and Export run: | - # Note: it is by design that we don't use the builder - task local-all + task all - name: Show exports working-directory: exported/ diff --git a/Taskfile.yml b/Taskfile.yml index 9c33a8e..2b8c88a 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -21,60 +21,25 @@ includes: # dev-notes/build-warts.md#always-set-dir-relative-to-current-task-file dir: ./taskfiles -vars: - ACR: rkvstdev.azurecr.io - # Default to the stage master-latest builder image - # Note: the CI tags builder images with the build number of the avid-builder pipeline run, - # i.e. 20220607.10 - # For local builder development build run `task builder` in the avid-builder git repo to - # build a new local builder image, then run these tasks like - # task generate BUILDER_ACR=rkvstdev.azurecr.io BUILDER_IMAGE_TAG=dev-$USER - BUILDER_ACR: rkvststage.azurecr.io - BUILDER_IMAGE_TAG: master-latest - - BUILD_CONTAINER: go-datatrails-common-api-builder - tasks: - ### ------------------------- - # Docker container tasks - ### ------------------------- - - builder-start: - summary: | - Creates the build container for go-datatrails-common-api - - Many tasks docker exec into this container so DO NOT ADD --rm. - - Use defer to cleanup the docker container in top level workflow tasks - which create the builder container - vars: - BUILDER_IMAGE: '{{.BUILDER_ACR}}/avid-builder:{{.BUILDER_IMAGE_TAG}}' + default: + desc: Default task lists all available tasks to run. cmds: + - which task - | - docker run \ - --env CONCURRENCY={{.SKAFFOLD_CONCURRENCY | default 2}} \ - --name {{.BUILD_CONTAINER}} \ - -dt -u $(id -u):$(id -g) \ - --mount type=bind,src=$(pwd),dst=/avid -w /avid \ - {{.BUILDER_IMAGE}} + task --list - builder-cleanup: - summary: cleans up the forestrie build container + environment: + desc: Show environment and location of tools executables. cmds: - - docker rm -f {{.BUILD_CONTAINER}} + - env | sort + - which go ### ------------------------- # Primary workflow tasks ### ------------------------- all: - desc: "do everything necessary after clone (or rebase) in the builder" - cmds: - - task: builder-start - - defer: {task: builder-cleanup} - - docker exec -t {{.BUILD_CONTAINER}} task local-all - - local-all: desc: | do everything necessary after clone (or rebase) (faster as it RUNS ON NATIVE HOST) @@ -105,4 +70,4 @@ tasks: generate: desc: generates all the artifacts we need pre-build cmds: - - task: apis:generate \ No newline at end of file + - task: apis:generate diff --git a/taskfiles/Taskfile_apis.yml b/taskfiles/Taskfile_apis.yml index 3410b4c..ee68857 100644 --- a/taskfiles/Taskfile_apis.yml +++ b/taskfiles/Taskfile_apis.yml @@ -80,7 +80,6 @@ tasks: rm -rf {{.GOOGLE_COMMON_INC_ARCHIVE_BASEDIR}}-{{.GOOGLE_COMMON_PROTOS_VERSION}} find proto-include -type d - bootstrap:grpc_health: desc: download and prepare the grpc health definitions we require under proto-include dir: '..' @@ -114,15 +113,12 @@ tasks: github.com/envoyproxy/protoc-gen-validate cmds: - | - go get github.com/datatrails/go-datatrails-common-api-gen/tools - go install \ github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway \ github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2 \ google.golang.org/protobuf/cmd/protoc-gen-go \ google.golang.org/grpc/cmd/protoc-gen-go-grpc \ github.com/envoyproxy/protoc-gen-validate \ - github.com/lyft/protoc-gen-star/v2 \ github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc - for: { var: API_PROTO_DEPS } cmd: | @@ -278,4 +274,4 @@ tasks: # OUTPATH: datatrails-common-api OUTPATH: . GOBIN: - sh: echo ${GOBIN:-$HOME/go/bin} \ No newline at end of file + sh: echo ${GOBIN:-$HOME/go/bin}