Skip to content

ci: re-ordering Drone CI for optimizing time #9719

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 30 commits into from
Jan 13, 2020
Merged
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
7819a84
ci: try re-ordering for optimizing time
sapk Jan 12, 2020
e1fa574
ci: try re-ordering for optimizing time
sapk Jan 12, 2020
dff29f1
ci: try re-ordering for optimizing time
sapk Jan 12, 2020
2585337
ci: try re-ordering for optimizing time
sapk Jan 12, 2020
d91127a
ci: try re-ordering for optimizing time
sapk Jan 12, 2020
24aaa2d
ci: try re-ordering for optimizing time
sapk Jan 12, 2020
c60de5d
ci: try offloading mysql8 to arm64
sapk Jan 12, 2020
ec38ee2
Revert "ci: try offloading mysql8 to arm64"
sapk Jan 12, 2020
443efe2
ci: try offloading pgsql to arm64
sapk Jan 12, 2020
91e3454
ci: activate ldap on arm64
sapk Jan 12, 2020
a6ddf35
Merge branch 'master' into optimize-ci
sapk Jan 12, 2020
dd88cc4
ci: test mysql8 in place pgsql arm64
sapk Jan 12, 2020
b1c53ba
chore: clean un-needed move
sapk Jan 12, 2020
e278a9c
typo
sapk Jan 12, 2020
00a48e1
Merge branch 'master' into optimize-ci
zeripath Jan 12, 2020
20cbb24
Merge branch 'master' into optimize-ci
lunny Jan 12, 2020
3f117fd
Merge branch 'master' into optimize-ci
sapk Jan 12, 2020
1c827e5
Merge branch 'master' into optimize-ci
sapk Jan 12, 2020
796c14d
ci: revert runnning mysql on arm64
sapk Jan 12, 2020
d0030d4
Merge branch 'optimize-ci' of github.com:sapk-fork/gitea into optimiz…
sapk Jan 12, 2020
23382ad
Merge branch 'master' into optimize-ci
sapk Jan 12, 2020
447d19b
Merge branch 'master' into optimize-ci
sapk Jan 12, 2020
ca91ccd
ci: run compliance on arm
sapk Jan 12, 2020
ce45672
chore: limit change
sapk Jan 12, 2020
7823709
chore: readd maybe need for release fetch-tags
sapk Jan 12, 2020
240e209
Merge branch 'master' into optimize-ci
sapk Jan 13, 2020
8177573
ci: remove docker-linux-amd64-dry-run
sapk Jan 13, 2020
a3b14cd
Merge branch 'optimize-ci' of github.com:sapk-fork/gitea into optimiz…
sapk Jan 13, 2020
0715f65
ci: remove docker-linux-amd64-dry-run
sapk Jan 13, 2020
1d26650
Revert "ci: remove docker-linux-amd64-dry-run"
sapk Jan 13, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
169 changes: 88 additions & 81 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -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
name: testing
Expand Down Expand Up @@ -54,51 +109,11 @@ steps:
exclude:
- 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
pull: always
image: golang:1.13
commands:
- 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
environment:
GOPROXY: https://goproxy.cn # proxy.golang.org is blocked in China, this proxy is not
Expand All @@ -113,8 +128,6 @@ steps:
environment:
GOPROXY: off
TAGS: bindata sqlite sqlite_unlock_notify
depends_on:
- build
when:
branch:
- master
Expand All @@ -130,8 +143,6 @@ steps:
environment:
GOPROXY: off
TAGS: bindata sqlite sqlite_unlock_notify
depends_on:
- build
when:
branch:
- "release/*"
Expand Down Expand Up @@ -583,7 +594,7 @@ steps:

---
kind: pipeline
name: docker-linux-amd64
name: docker-linux-amd64-release

platform:
os: linux
Expand All @@ -600,31 +611,13 @@ trigger:
ref:
- refs/heads/master
- "refs/tags/**"
- "refs/pull/**"

steps:
- name: fetch-tags
pull: default
image: docker:git
commands:
- 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
pull: always
Expand All @@ -646,7 +639,7 @@ steps:

---
kind: pipeline
name: docker-linux-arm64
name: docker-linux-arm64-dry-run

platform:
os: linux
Expand All @@ -657,25 +650,13 @@ workspace:
path: src/code.gitea.io/gitea

depends_on:
- testing
- compliance

trigger:
ref:
- refs/heads/master
- "refs/tags/**"
- "refs/pull/**"

steps:
- name: fetch-tags
pull: default
image: docker:git
commands:
- git fetch --tags --force
when:
event:
exclude:
- pull_request

- name: dryrun
pull: always
image: plugins/docker:linux-arm64
Expand All @@ -689,6 +670,32 @@ steps:
event:
- pull_request

---
kind: pipeline
name: docker-linux-arm64-release

platform:
os: linux
arch: arm64

workspace:
base: /go
path: src/code.gitea.io/gitea

depends_on:
- testing

trigger:
ref:
- refs/heads/master
- "refs/tags/**"
steps:
- name: fetch-tags
pull: default
image: docker:git
commands:
- git fetch --tags --force

- name: publish
pull: always
image: plugins/docker:linux-arm64
Expand Down Expand Up @@ -734,8 +741,8 @@ trigger:
- "refs/tags/**"

depends_on:
- docker-linux-amd64
- docker-linux-arm64
- docker-linux-amd64-release
- docker-linux-arm64-release

---
kind: pipeline
Expand All @@ -762,8 +769,8 @@ depends_on:
- translations
- release-version
- release-master
- docker-linux-amd64
- docker-linux-arm64
- docker-linux-amd64-release
- docker-linux-arm64-release
- docker-manifest
- docs

Expand Down