diff --git a/.drone.yml b/.drone.yml index eb5c497..82359ee 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,23 +1,21 @@ kind: pipeline name: default +type: kubernetes -workspace: - base: /go - path: src/github.com/oliver006/drone-cloud-run steps: - name: tests - image: "golang:1.16" + image: "golang:1.20" environment: COVERALLS_TOKEN: from_secret: coveralls-token commands: - - 'echo " ! gofmt -d *.go 2>&1 | read " | bash' - 'go vet ./...' - "go build" - "go test -v -covermode=atomic -cover -race -coverprofile=coverage.txt" - - "go get github.com/mattn/goveralls" + - "go install github.com/mattn/goveralls@v0.0.11" - "/go/bin/goveralls -v -coverprofile=coverage.txt -service=drone.io" + - 'echo " ! gofmt -d *.go 2>&1 | read " | bash' when: event: - push @@ -56,77 +54,7 @@ steps: - pull_request - push - tag - - - - name: update-dummy-docker-tst-image - image: plugins/docker - settings: - username: _json_key - password: - from_secret: google_credentials - repo: gcr.io/phone-21zoo-com/drone-cloud-run-test - registry: gcr.io - tags: latest - dockerfile: tst/Dockerfile - when: - branch: - - master - event: - - push - - - - name: build-and-publish-new-drone-image-for-test - image: plugins/docker - settings: - repo: oliver006/drone-cloud-run - tags: test - debug: true - build_args: - - 'TAG=test' - - 'SHA1=${DRONE_COMMIT_SHA}' - username: - from_secret: docker_username - password: - from_secret: docker_password - when: - branch: - - master - event: - - push - - - - name: sleep-10s - image: alpine - commands: - - sleep 10 - when: - branch: - - master - event: - - push - - - - name: deploy-using-new-test-drone-image - image: oliver006/drone-cloud-run:test - pull: always - settings: - action: deploy - service: test-drone-cloud-run-master - image: gcr.io/phone-21zoo-com/drone-cloud-run-test:latest - memory: 128Mi - region: us-central1 - allow_unauthenticated: true - environment: - VAR_1: "var01" - VERSION: "${DRONE_COMMIT_SHA}" - token: - from_secret: google_credentials - when: - branch: - - master - event: - - push - + - name: on-tag-build-and-publish-new-drone-image image: plugins/docker