Browse Source

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 c60de5db1c.

* 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 0715f65b11.

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
for-closed-social
Antoine GIRARD 4 years ago
committed by GitHub
parent
commit
b787aafc17
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 88 additions and 81 deletions
  1. +88
    -81
      .drone.yml

+ 88
- 81
.drone.yml View File

@ -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,7 @@ steps:
--- ---
kind: pipeline kind: pipeline
name: docker-linux-arm64
name: docker-linux-arm64-dry-run
platform: platform:
os: linux os: linux
@ -657,25 +650,13 @@ workspace:
path: src/code.gitea.io/gitea path: src/code.gitea.io/gitea
depends_on: depends_on:
- testing
- compliance
trigger: trigger:
ref: ref:
- refs/heads/master
- "refs/tags/**"
- "refs/pull/**" - "refs/pull/**"
steps: steps:
- name: fetch-tags
pull: default
image: docker:git
commands:
- git fetch --tags --force
when:
event:
exclude:
- pull_request
- name: dryrun - name: dryrun
pull: always pull: always
image: plugins/docker:linux-arm64 image: plugins/docker:linux-arm64
@ -689,6 +670,32 @@ steps:
event: event:
- pull_request - 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 - name: publish
pull: always pull: always
image: plugins/docker:linux-arm64 image: plugins/docker:linux-arm64
@ -734,8 +741,8 @@ trigger:
- "refs/tags/**" - "refs/tags/**"
depends_on: depends_on:
- docker-linux-amd64
- docker-linux-arm64
- docker-linux-amd64-release
- 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-arm64
- docker-linux-amd64-release
- docker-linux-arm64-release
- docker-manifest - docker-manifest
- docs - docs

Loading…
Cancel
Save