Skip to content

Commit

Permalink
fix drone file to use k8s, simplify a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
oliver006 committed Jul 9, 2023
1 parent 4a0bda8 commit 6b51343
Showing 1 changed file with 5 additions and 77 deletions.
82 changes: 5 additions & 77 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 6b51343

Please sign in to comment.