ci: re-ordering Drone CI for optimizing time (#9719)
* ci: try re-ordering for optimizing time * ci: try re-ordering for optimizing time * ci: try re-ordering for optimizing time * ci: try re-ordering for optimizing time * ci: try re-ordering for optimizing time * ci: try re-ordering for optimizing time * ci: try offloading mysql8 to arm64 * Revert "ci: try offloading mysql8 to arm64" This reverts commit c60de5db1cf8b5984c3014a57da6490f06c8d980. * ci: try offloading pgsql to arm64 * ci: activate ldap on arm64 * ci: test mysql8 in place pgsql arm64 * chore: clean un-needed move * typo * ci: revert runnning mysql on arm64 * ci: run compliance on arm * chore: limit change * chore: readd maybe need for release fetch-tags * ci: remove docker-linux-amd64-dry-run * ci: remove docker-linux-amd64-dry-run * Revert "ci: remove docker-linux-amd64-dry-run" This reverts commit 0715f65b11c37869359aaaa5d22901da512e8184. Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
parent
80bfd5145c
commit
b787aafc17
1 changed files with 94 additions and 87 deletions
181
.drone.yml
181
.drone.yml
|
@ -1,3 +1,58 @@
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
name: compliance
|
||||||
|
|
||||||
|
platform:
|
||||||
|
os: linux
|
||||||
|
arch: arm64
|
||||||
|
|
||||||
|
workspace:
|
||||||
|
base: /go
|
||||||
|
path: src/code.gitea.io/gitea
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: pre-build
|
||||||
|
pull: always
|
||||||
|
image: node:10 # this step is kept at the lowest version of node that we support
|
||||||
|
commands:
|
||||||
|
- make css
|
||||||
|
- make js
|
||||||
|
|
||||||
|
- name: build-without-gcc
|
||||||
|
pull: always
|
||||||
|
image: golang:1.11 # this step is kept as the lowest version of golang that we support
|
||||||
|
environment:
|
||||||
|
GO111MODULE: on
|
||||||
|
GOPROXY: off
|
||||||
|
commands:
|
||||||
|
- go build -mod=vendor -o gitea_no_gcc # test if build succeeds without the sqlite tag
|
||||||
|
|
||||||
|
- name: build-linux-386
|
||||||
|
pull: always
|
||||||
|
image: golang:1.13
|
||||||
|
environment:
|
||||||
|
GO111MODULE: on
|
||||||
|
GOPROXY: off
|
||||||
|
GOOS: linux
|
||||||
|
GOARCH: 386
|
||||||
|
commands:
|
||||||
|
- go build -mod=vendor -o gitea_linux_386 # test if compatible with 32 bit
|
||||||
|
|
||||||
|
- name: check
|
||||||
|
pull: always
|
||||||
|
image: golang:1.13
|
||||||
|
commands:
|
||||||
|
- make clean
|
||||||
|
- make golangci-lint
|
||||||
|
- make revive
|
||||||
|
- make swagger-check
|
||||||
|
- make swagger-validate
|
||||||
|
- make test-vendor
|
||||||
|
environment:
|
||||||
|
GOPROXY: https://goproxy.cn # proxy.golang.org is blocked in China, this proxy is not
|
||||||
|
GOSUMDB: sum.golang.org
|
||||||
|
TAGS: bindata sqlite sqlite_unlock_notify
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
name: testing
|
name: testing
|
||||||
|
@ -54,51 +109,11 @@ steps:
|
||||||
exclude:
|
exclude:
|
||||||
- pull_request
|
- pull_request
|
||||||
|
|
||||||
- name: pre-build
|
|
||||||
pull: always
|
|
||||||
image: node:10 # this step is kept at the lowest version of node that we support
|
|
||||||
commands:
|
|
||||||
- make css
|
|
||||||
- make js
|
|
||||||
|
|
||||||
- name: build-without-gcc
|
|
||||||
pull: always
|
|
||||||
image: golang:1.11 # this step is kept as the lowest version of golang that we support
|
|
||||||
environment:
|
|
||||||
GO111MODULE: on
|
|
||||||
GOPROXY: off
|
|
||||||
commands:
|
|
||||||
- curl -sL https://deb.nodesource.com/setup_12.x | bash - && apt -y install nodejs
|
|
||||||
- go build -mod=vendor -o gitea_no_gcc # test if build succeeds without the sqlite tag
|
|
||||||
|
|
||||||
- name: build-linux-386
|
|
||||||
pull: always
|
|
||||||
image: golang:1.13
|
|
||||||
environment:
|
|
||||||
GO111MODULE: on
|
|
||||||
GOPROXY: off
|
|
||||||
GOOS: linux
|
|
||||||
GOARCH: 386
|
|
||||||
commands:
|
|
||||||
- curl -sL https://deb.nodesource.com/setup_12.x | bash - && apt -y install nodejs
|
|
||||||
- go build -mod=vendor -o gitea_linux_386 # test if compatible with 32 bit
|
|
||||||
|
|
||||||
- name: golangci-lint
|
|
||||||
pull: always
|
|
||||||
image: golangci/golangci-lint:v1.22.2
|
|
||||||
commands:
|
|
||||||
- golangci-lint run -v --timeout 5m
|
|
||||||
|
|
||||||
- name: build
|
- name: build
|
||||||
pull: always
|
pull: always
|
||||||
image: golang:1.13
|
image: golang:1.13
|
||||||
commands:
|
commands:
|
||||||
- curl -sL https://deb.nodesource.com/setup_12.x | bash - && apt -y install nodejs
|
- curl -sL https://deb.nodesource.com/setup_12.x | bash - && apt -y install nodejs
|
||||||
- make clean
|
|
||||||
- make revive
|
|
||||||
- make swagger-check
|
|
||||||
- make swagger-validate
|
|
||||||
- make test-vendor
|
|
||||||
- make build
|
- make build
|
||||||
environment:
|
environment:
|
||||||
GOPROXY: https://goproxy.cn # proxy.golang.org is blocked in China, this proxy is not
|
GOPROXY: https://goproxy.cn # proxy.golang.org is blocked in China, this proxy is not
|
||||||
|
@ -113,8 +128,6 @@ steps:
|
||||||
environment:
|
environment:
|
||||||
GOPROXY: off
|
GOPROXY: off
|
||||||
TAGS: bindata sqlite sqlite_unlock_notify
|
TAGS: bindata sqlite sqlite_unlock_notify
|
||||||
depends_on:
|
|
||||||
- build
|
|
||||||
when:
|
when:
|
||||||
branch:
|
branch:
|
||||||
- master
|
- master
|
||||||
|
@ -130,8 +143,6 @@ steps:
|
||||||
environment:
|
environment:
|
||||||
GOPROXY: off
|
GOPROXY: off
|
||||||
TAGS: bindata sqlite sqlite_unlock_notify
|
TAGS: bindata sqlite sqlite_unlock_notify
|
||||||
depends_on:
|
|
||||||
- build
|
|
||||||
when:
|
when:
|
||||||
branch:
|
branch:
|
||||||
- "release/*"
|
- "release/*"
|
||||||
|
@ -583,7 +594,7 @@ steps:
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
name: docker-linux-amd64
|
name: docker-linux-amd64-release
|
||||||
|
|
||||||
platform:
|
platform:
|
||||||
os: linux
|
os: linux
|
||||||
|
@ -600,7 +611,6 @@ trigger:
|
||||||
ref:
|
ref:
|
||||||
- refs/heads/master
|
- refs/heads/master
|
||||||
- "refs/tags/**"
|
- "refs/tags/**"
|
||||||
- "refs/pull/**"
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: fetch-tags
|
- name: fetch-tags
|
||||||
|
@ -608,23 +618,6 @@ steps:
|
||||||
image: docker:git
|
image: docker:git
|
||||||
commands:
|
commands:
|
||||||
- git fetch --tags --force
|
- git fetch --tags --force
|
||||||
when:
|
|
||||||
event:
|
|
||||||
exclude:
|
|
||||||
- pull_request
|
|
||||||
|
|
||||||
- name: dryrun
|
|
||||||
pull: always
|
|
||||||
image: plugins/docker:linux-amd64
|
|
||||||
settings:
|
|
||||||
dry_run: true
|
|
||||||
repo: gitea/gitea
|
|
||||||
tags: linux-amd64
|
|
||||||
build_args:
|
|
||||||
- GOPROXY=off
|
|
||||||
when:
|
|
||||||
event:
|
|
||||||
- pull_request
|
|
||||||
|
|
||||||
- name: publish
|
- name: publish
|
||||||
pull: always
|
pull: always
|
||||||
|
@ -646,7 +639,40 @@ steps:
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
name: docker-linux-arm64
|
name: docker-linux-arm64-dry-run
|
||||||
|
|
||||||
|
platform:
|
||||||
|
os: linux
|
||||||
|
arch: arm64
|
||||||
|
|
||||||
|
workspace:
|
||||||
|
base: /go
|
||||||
|
path: src/code.gitea.io/gitea
|
||||||
|
|
||||||
|
depends_on:
|
||||||
|
- compliance
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
ref:
|
||||||
|
- "refs/pull/**"
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: dryrun
|
||||||
|
pull: always
|
||||||
|
image: plugins/docker:linux-arm64
|
||||||
|
settings:
|
||||||
|
dry_run: true
|
||||||
|
repo: gitea/gitea
|
||||||
|
tags: linux-arm64
|
||||||
|
build_args:
|
||||||
|
- GOPROXY=off
|
||||||
|
when:
|
||||||
|
event:
|
||||||
|
- pull_request
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
name: docker-linux-arm64-release
|
||||||
|
|
||||||
platform:
|
platform:
|
||||||
os: linux
|
os: linux
|
||||||
|
@ -663,31 +689,12 @@ trigger:
|
||||||
ref:
|
ref:
|
||||||
- refs/heads/master
|
- refs/heads/master
|
||||||
- "refs/tags/**"
|
- "refs/tags/**"
|
||||||
- "refs/pull/**"
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: fetch-tags
|
- name: fetch-tags
|
||||||
pull: default
|
pull: default
|
||||||
image: docker:git
|
image: docker:git
|
||||||
commands:
|
commands:
|
||||||
- git fetch --tags --force
|
- git fetch --tags --force
|
||||||
when:
|
|
||||||
event:
|
|
||||||
exclude:
|
|
||||||
- pull_request
|
|
||||||
|
|
||||||
- name: dryrun
|
|
||||||
pull: always
|
|
||||||
image: plugins/docker:linux-arm64
|
|
||||||
settings:
|
|
||||||
dry_run: true
|
|
||||||
repo: gitea/gitea
|
|
||||||
tags: linux-arm64
|
|
||||||
build_args:
|
|
||||||
- GOPROXY=off
|
|
||||||
when:
|
|
||||||
event:
|
|
||||||
- pull_request
|
|
||||||
|
|
||||||
- name: publish
|
- name: publish
|
||||||
pull: always
|
pull: always
|
||||||
|
@ -734,8 +741,8 @@ trigger:
|
||||||
- "refs/tags/**"
|
- "refs/tags/**"
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- docker-linux-amd64
|
- docker-linux-amd64-release
|
||||||
- docker-linux-arm64
|
- docker-linux-arm64-release
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
|
@ -762,8 +769,8 @@ depends_on:
|
||||||
- translations
|
- translations
|
||||||
- release-version
|
- release-version
|
||||||
- release-master
|
- release-master
|
||||||
- docker-linux-amd64
|
- docker-linux-amd64-release
|
||||||
- docker-linux-arm64
|
- docker-linux-arm64-release
|
||||||
- docker-manifest
|
- docker-manifest
|
||||||
- docs
|
- docs
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue