From 4b8fef143ea399d6bf5c23adda7fb0b191d4ded2 Mon Sep 17 00:00:00 2001 From: Thomas Boerger Date: Thu, 7 Sep 2017 19:22:15 +0200 Subject: [PATCH] Changes for latest DroneCI (#2362) --- .drone.yml | 79 +++++++++++++++++++++++++------------------------- .drone.yml.sig | 1 - Makefile | 4 +-- 3 files changed, 42 insertions(+), 42 deletions(-) delete mode 100644 .drone.yml.sig diff --git a/.drone.yml b/.drone.yml index 156cf95f5e..e852007172 100644 --- a/.drone.yml +++ b/.drone.yml @@ -2,12 +2,13 @@ workspace: base: /srv/app path: src/code.gitea.io/gitea -pipeline: - clone: - image: plugins/git +clone: + git: + image: plugins/git:1 depth: 50 tags: true +pipeline: build: image: webhippie/golang:edge pull: true @@ -15,7 +16,6 @@ pipeline: TAGS: bindata sqlite GOPATH: /srv/app commands: - - apk -U add openssh-client - make clean - make generate - make vet @@ -30,43 +30,31 @@ pipeline: test: image: webhippie/golang:edge pull: true + group: test environment: TAGS: bindata sqlite GOPATH: /srv/app commands: - - apk -U add openssh-client - - make test + - make coverage when: - event: [ tag, pull_request ] - - test-coverage: - image: webhippie/golang:edge - pull: true - environment: - TAGS: bindata sqlite - GOPATH: /srv/app - commands: - - apk -U add openssh-client - - go get github.com/wadey/gocovmerge - - make test-coverage - when: - event: [ push ] - branch: master + event: [ push, tag, pull_request ] test-sqlite: image: webhippie/golang:edge pull: true + group: test environment: TAGS: bindata GOPATH: /srv/app commands: - - echo "Needs to be fixed" # make test-sqlite + - make test-sqlite when: event: [ push, tag, pull_request ] test-mysql: image: webhippie/golang:edge pull: true + group: test environment: TAGS: bindata GOPATH: /srv/app @@ -78,6 +66,7 @@ pipeline: test-pgsql: image: webhippie/golang:edge pull: true + group: test environment: TAGS: bindata GOPATH: /srv/app @@ -86,6 +75,12 @@ pipeline: when: event: [ push, tag, pull_request ] + # coverage: + # image: plugins/coverage:latest + # pull: true + # secrets: [ github_token ] + # server: https://coverage.gitea.io + static: image: karalabe/xgo-latest:latest pull: true @@ -97,16 +92,10 @@ pipeline: when: event: [ push, tag ] - # coverage: - # image: plugins/coverage - # server: https://coverage.gitea.io - # when: - # event: [ push ] - # branch: master - docker: - image: plugins/docker + image: plugins/docker:17.05 pull: true + secrets: [ docker_username, docker_password ] repo: gitea/gitea tags: [ '${DRONE_TAG##v}' ] when: @@ -114,8 +103,9 @@ pipeline: branch: [ refs/tags/* ] docker: - image: plugins/docker + image: plugins/docker:17.05 pull: true + secrets: [ docker_username, docker_password ] repo: gitea/gitea tags: [ '${DRONE_BRANCH##release/v}' ] when: @@ -123,8 +113,9 @@ pipeline: branch: [ release/* ] docker: - image: plugins/docker + image: plugins/docker:17.05 pull: true + secrets: [ docker_username, docker_password ] repo: gitea/gitea tags: [ 'latest' ] when: @@ -132,7 +123,10 @@ pipeline: branch: [ master ] release: - image: plugins/s3 + image: plugins/s3:1 + pull: true + secrets: [ s3_access_key, s3_secret_key ] + endpoint: https://storage.gitea.io path_style: true strip_prefix: dist/release/ source: dist/release/* @@ -142,7 +136,10 @@ pipeline: branch: [ refs/tags/* ] release: - image: plugins/s3 + image: plugins/s3:1 + pull: true + secrets: [ s3_access_key, s3_secret_key ] + endpoint: https://storage.gitea.io path_style: true strip_prefix: dist/release/ source: dist/release/* @@ -152,7 +149,10 @@ pipeline: branch: [ release/* ] release: - image: plugins/s3 + image: plugins/s3:1 + pull: true + secrets: [ s3_access_key, s3_secret_key ] + endpoint: https://storage.gitea.io path_style: true strip_prefix: dist/release/ source: dist/release/* @@ -162,7 +162,8 @@ pipeline: branch: [ master ] github: - image: plugins/github-release + image: plugins/github-release:1 + pull: true files: - dist/release/* when: @@ -170,9 +171,9 @@ pipeline: branch: [ refs/tags/* ] discord: - image: appleboy/drone-discord:0.0.4 - webhook_id: ${WEBHOOK_ID} - webhook_token: ${WEBHOOK_TOKEN} + image: appleboy/drone-discord:1.0.0 + pull: true + secrets: [ discord_webhook_id, discord_webhook_token ] when: event: [ push, tag, pull_request ] status: [ changed, failure ] diff --git a/.drone.yml.sig b/.drone.yml.sig deleted file mode 100644 index 348724c549..0000000000 --- a/.drone.yml.sig +++ /dev/null @@ -1 +0,0 @@ -eyJhbGciOiJIUzI1NiJ9.d29ya3NwYWNlOgogIGJhc2U6IC9zcnYvYXBwCiAgcGF0aDogc3JjL2NvZGUuZ2l0ZWEuaW8vZ2l0ZWEKCnBpcGVsaW5lOgogIGNsb25lOgogICAgaW1hZ2U6IHBsdWdpbnMvZ2l0CiAgICBkZXB0aDogNTAKICAgIHRhZ3M6IHRydWUKCiAgYnVpbGQ6CiAgICBpbWFnZTogd2ViaGlwcGllL2dvbGFuZzplZGdlCiAgICBwdWxsOiB0cnVlCiAgICBlbnZpcm9ubWVudDoKICAgICAgVEFHUzogYmluZGF0YSBzcWxpdGUKICAgICAgR09QQVRIOiAvc3J2L2FwcAogICAgY29tbWFuZHM6CiAgICAgIC0gYXBrIC1VIGFkZCBvcGVuc3NoLWNsaWVudAogICAgICAtIG1ha2UgY2xlYW4KICAgICAgLSBtYWtlIGdlbmVyYXRlCiAgICAgIC0gbWFrZSB2ZXQKICAgICAgLSBtYWtlIGxpbnQKICAgICAgLSBtYWtlIHN0eWxlc2hlZXRzLWNoZWNrCiAgICAgIC0gbWFrZSBtaXNzcGVsbC1jaGVjawogICAgICAtIG1ha2UgdGVzdC12ZW5kb3IKICAgICAgLSBtYWtlIGJ1aWxkCiAgICB3aGVuOgogICAgICBldmVudDogWyBwdXNoLCB0YWcsIHB1bGxfcmVxdWVzdCBdCgogIHRlc3Q6CiAgICBpbWFnZTogd2ViaGlwcGllL2dvbGFuZzplZGdlCiAgICBwdWxsOiB0cnVlCiAgICBlbnZpcm9ubWVudDoKICAgICAgVEFHUzogYmluZGF0YSBzcWxpdGUKICAgICAgR09QQVRIOiAvc3J2L2FwcAogICAgY29tbWFuZHM6CiAgICAgIC0gYXBrIC1VIGFkZCBvcGVuc3NoLWNsaWVudAogICAgICAtIG1ha2UgdGVzdAogICAgd2hlbjoKICAgICAgZXZlbnQ6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joKICAgIGltYWdlOiBwbHVnaW5zL2dpdGh1Yi1yZWxlYXNlCiAgICBmaWxlczoKICAgICAgLSBkaXN0L3JlbGVhc2UvKgogICAgd2hlbjoKICAgICAgZXZlbnQ6IFsgdGFnIF0KICAgICAgYnJhbmNoOiBbIHJlZnMvdGFncy8qIF0KCiAgZGlzY29yZDoKICAgIGltYWdlOiBhcHBsZWJveS9kcm9uZS1kaXNjb3JkOjAuMC40CiAgICB3ZWJob29rX2lkOiAke1dFQkhPT0tfSUR9CiAgICB3ZWJob29rX3Rva2VuOiAke1dFQkhPT0tfVE9LRU59CiAgICB3aGVuOgogICAgICBldmVudDogWyBwdXNoLCB0YWcsIHB1bGxfcmVxdWVzdCBdCiAgICAgIHN0YXR1czogWyBjaGFuZ2VkLCBmYWlsdXJlIF0KCnNlcnZpY2VzOgogIG15c3FsOgogICAgaW1hZ2U6IG15c3FsOjUuNwogICAgZW52aXJvbm1lbnQ6CiAgICAgIC0gTVlTUUxfREFUQUJBU0U9dGVzdAogICAgICAtIE1ZU1FMX0FMTE9XX0VNUFRZX1BBU1NXT1JEPXllcwogICAgd2hlbjoKICAgICAgZXZlbnQ6IFsgcHVzaCwgdGFnLCBwdWxsX3JlcXVlc3QgXQoKICBwZ3NxbDoKICAgIGltYWdlOiBwb3N0Z3Jlczo5LjUKICAgIGVudmlyb25tZW50OgogICAgICAtIFBPU1RHUkVTX0RCPXRlc3QKICAgIHdoZW46CiAgICAgIGV2ZW50OiBbIHB1c2gsIHRhZywgcHVsbF9yZXF1ZXN0IF0K.YjokR0t3vMOWmF63boAMgPNYjVeJ0ymcGEUIM7nynxU \ No newline at end of file diff --git a/Makefile b/Makefile index 5f1f420ebd..a67aa0c040 100644 --- a/Makefile +++ b/Makefile @@ -125,8 +125,8 @@ fmt-check: required-gofmt-version test: fmt-check $(GO) test $(PACKAGES) -.PHONY: test-coverage -test-coverage: unit-test-coverage integration-test-coverage +.PHONY: coverage +coverage: unit-test-coverage integration-test-coverage @hash gocovmerge > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ $(GO) get -u github.com/wadey/gocovmerge; \ fi