From 1837194882c860d1faa6bfd3a637199e1d2317d5 Mon Sep 17 00:00:00 2001 From: Lauris BH Date: Sat, 23 Sep 2017 12:33:52 +0300 Subject: [PATCH] Backport changes for latest drone (#2586) --- .drone.yml | 87 +++++++++++++++++++++++++----------------------------- 1 file changed, 41 insertions(+), 46 deletions(-) diff --git a/.drone.yml b/.drone.yml index aa7e1a3a0..b3f56e2d1 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 @@ -34,35 +34,21 @@ pipeline: TAGS: bindata sqlite GOPATH: /srv/app commands: - - apk -U add openssh-client - make test 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 - - test-sqlite: - image: webhippie/golang:edge - pull: true - environment: - TAGS: bindata - GOPATH: /srv/app - commands: - - echo "Needs to be fixed" # make test-sqlite - when: - event: [ push, tag, pull_request ] + # Commented until db locking have been resolved! + # test-sqlite: + # image: webhippie/golang:edge + # pull: true + # environment: + # TAGS: bindata + # GOPATH: /srv/app + # commands: + # - make test-sqlite + # when: + # event: [ push, tag, pull_request ] test-mysql: image: webhippie/golang:edge @@ -97,24 +83,19 @@ 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: event: [ tag ] 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: @@ -122,8 +103,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: @@ -131,7 +113,11 @@ pipeline: branch: [ master ] release: - image: plugins/s3 + image: plugins/s3:1 + pull: true + secrets: [ aws_access_key_id, aws_secret_access_key ] + bucket: releases + endpoint: https://storage.gitea.io path_style: true strip_prefix: dist/release/ source: dist/release/* @@ -140,7 +126,11 @@ pipeline: event: [ tag ] release: - image: plugins/s3 + image: plugins/s3:1 + pull: true + secrets: [ aws_access_key_id, aws_secret_access_key ] + bucket: releases + endpoint: https://storage.gitea.io path_style: true strip_prefix: dist/release/ source: dist/release/* @@ -150,7 +140,11 @@ pipeline: branch: [ release/* ] release: - image: plugins/s3 + image: plugins/s3:1 + pull: true + secrets: [ aws_access_key_id, aws_secret_access_key ] + bucket: releases + endpoint: https://storage.gitea.io path_style: true strip_prefix: dist/release/ source: dist/release/* @@ -160,16 +154,17 @@ pipeline: branch: [ master ] github: - image: plugins/github-release + image: plugins/github-release:1 + pull: true files: - dist/release/* when: event: [ tag ] 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 ]