From 746743634c8bde5077d8a7308ba149651179f056 Mon Sep 17 00:00:00 2001 From: Antoine GIRARD Date: Mon, 13 Jan 2020 19:11:19 +0100 Subject: [PATCH 1/5] ci: move some integration tests on arm64 --- .drone.yml | 162 +++++++++++++++++++++++++++++++++-------------------- 1 file changed, 102 insertions(+), 60 deletions(-) diff --git a/.drone.yml b/.drone.yml index 04c75891a226e..abc258708ffa4 100644 --- a/.drone.yml +++ b/.drone.yml @@ -55,7 +55,7 @@ steps: --- kind: pipeline -name: testing +name: testing-amd64 platform: os: linux @@ -73,19 +73,6 @@ services: MYSQL_ALLOW_EMPTY_PASSWORD: yes MYSQL_DATABASE: test - - name: mysql8 - pull: default - image: mysql:8.0 - environment: - MYSQL_ALLOW_EMPTY_PASSWORD: yes - MYSQL_DATABASE: testgitea - - - name: pgsql - pull: default - image: postgres:9.5 - environment: - POSTGRES_DB: test - - name: mssql pull: default image: microsoft/mssql-server-linux:latest @@ -119,7 +106,7 @@ steps: 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 - + - name: unit-test pull: always image: golang:1.13 @@ -175,20 +162,6 @@ steps: event: - tag - - name: test-sqlite - pull: always - image: golang:1.13 - commands: - - "curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash" - - apt-get install -y git-lfs - - timeout -s ABRT 20m make test-sqlite-migration - - timeout -s ABRT 20m make test-sqlite - environment: - GOPROXY: off - TAGS: bindata - depends_on: - - build - - name: test-mysql pull: always image: golang:1.13 @@ -228,36 +201,6 @@ steps: event: - tag - - name: test-mysql8 - pull: always - image: golang:1.13 - commands: - - "curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash" - - apt-get install -y git-lfs - - timeout -s ABRT 20m make test-mysql8-migration - - timeout -s ABRT 20m make test-mysql8 - environment: - GOPROXY: off - TAGS: bindata - TEST_LDAP: 1 - depends_on: - - build - - - name: test-pgsql - pull: always - image: golang:1.13 - commands: - - "curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash" - - apt-get install -y git-lfs - - timeout -s ABRT 20m make test-pgsql-migration - - timeout -s ABRT 20m make test-pgsql - environment: - GOPROXY: off - TAGS: bindata - TEST_LDAP: 1 - depends_on: - - build - - name: test-mssql pull: always image: golang:1.13 @@ -272,7 +215,7 @@ steps: TEST_LDAP: 1 depends_on: - build - + - name: generate-coverage pull: always image: golang:1.13 @@ -291,6 +234,7 @@ steps: - push - pull_request +#If this setup can be move to arm64 we could setup coverage on mysql8 and arm64 - name: coverage pull: always image: robertstettner/drone-codecov @@ -309,6 +253,104 @@ steps: - push - pull_request + + +--- +kind: pipeline +name: testing-arm64 + +platform: + os: linux + arch: arm64 + +workspace: + base: /go + path: src/code.gitea.io/gitea + +services: + - name: mysql8 + pull: default + image: mysql/mysql-server:8.0 + environment: + MYSQL_ALLOW_EMPTY_PASSWORD: yes + MYSQL_DATABASE: testgitea + + - name: pgsql + pull: default + image: postgres:9.5 + environment: + POSTGRES_DB: test + + - name: ldap + pull: default + image: gitea/test-openldap:latest + +steps: + - name: fetch-tags + pull: default + image: docker:git + commands: + - git fetch --tags --force + when: + event: + exclude: + - pull_request + + - name: build + pull: always + image: golang:1.13 + commands: + - curl -sL https://deb.nodesource.com/setup_12.x | bash - && apt -y install nodejs + - make build + 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 + + - name: test-sqlite + pull: always + image: golang:1.13 + commands: + - "curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash" + - apt-get install -y git-lfs + - timeout -s ABRT 20m make test-sqlite-migration + - timeout -s ABRT 20m make test-sqlite + environment: + GOPROXY: off + TAGS: bindata + depends_on: + - build + + - name: test-mysql8 + pull: always + image: golang:1.13 + commands: + - "curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash" + - apt-get install -y git-lfs + - timeout -s ABRT 20m make test-mysql8-migration + - timeout -s ABRT 20m make test-mysql8 + environment: + GOPROXY: off + TAGS: bindata + TEST_LDAP: 1 + depends_on: + - build + + - name: test-pgsql + pull: always + image: golang:1.13 + commands: + - "curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash" + - apt-get install -y git-lfs + - timeout -s ABRT 20m make test-pgsql-migration + - timeout -s ABRT 20m make test-pgsql + environment: + GOPROXY: off + TAGS: bindata + TEST_LDAP: 1 + depends_on: + - build + --- kind: pipeline name: translations From 178bc052c4ce50eebee9f8edf47c47ad94d0b2e6 Mon Sep 17 00:00:00 2001 From: Antoine GIRARD Date: Mon, 13 Jan 2020 19:13:27 +0100 Subject: [PATCH 2/5] ci: move some integration tests on arm64 --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index abc258708ffa4..fe2bee32442d8 100644 --- a/.drone.yml +++ b/.drone.yml @@ -55,7 +55,7 @@ steps: --- kind: pipeline -name: testing-amd64 +name: testing platform: os: linux From d1e11f939aa6733f6df57828a70f919100e7d406 Mon Sep 17 00:00:00 2001 From: Antoine GIRARD Date: Mon, 13 Jan 2020 19:31:27 +0100 Subject: [PATCH 3/5] ci:: move back mysql8 --- .drone.yml | 53 ++++++++++++++++++++++++++--------------------------- 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/.drone.yml b/.drone.yml index fe2bee32442d8..0affa3dae6ca0 100644 --- a/.drone.yml +++ b/.drone.yml @@ -73,6 +73,13 @@ services: MYSQL_ALLOW_EMPTY_PASSWORD: yes MYSQL_DATABASE: test + - name: mysql8 + pull: default + image: mysql/mysql-server:8.0 + environment: + MYSQL_ALLOW_EMPTY_PASSWORD: yes + MYSQL_DATABASE: testgitea + - name: mssql pull: default image: microsoft/mssql-server-linux:latest @@ -106,7 +113,7 @@ steps: 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 - + - name: unit-test pull: always image: golang:1.13 @@ -201,6 +208,21 @@ steps: event: - tag + - name: test-mysql8 + pull: always + image: golang:1.13 + commands: + - "curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash" + - apt-get install -y git-lfs + - timeout -s ABRT 20m make test-mysql8-migration + - timeout -s ABRT 20m make test-mysql8 + environment: + GOPROXY: off + TAGS: bindata + TEST_LDAP: 1 + depends_on: + - build + - name: test-mssql pull: always image: golang:1.13 @@ -215,7 +237,7 @@ steps: TEST_LDAP: 1 depends_on: - build - + - name: generate-coverage pull: always image: golang:1.13 @@ -234,7 +256,6 @@ steps: - push - pull_request -#If this setup can be move to arm64 we could setup coverage on mysql8 and arm64 - name: coverage pull: always image: robertstettner/drone-codecov @@ -268,13 +289,6 @@ workspace: path: src/code.gitea.io/gitea services: - - name: mysql8 - pull: default - image: mysql/mysql-server:8.0 - environment: - MYSQL_ALLOW_EMPTY_PASSWORD: yes - MYSQL_DATABASE: testgitea - - name: pgsql pull: default image: postgres:9.5 @@ -306,7 +320,7 @@ steps: 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 - + - name: test-sqlite pull: always image: golang:1.13 @@ -321,21 +335,6 @@ steps: depends_on: - build - - name: test-mysql8 - pull: always - image: golang:1.13 - commands: - - "curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash" - - apt-get install -y git-lfs - - timeout -s ABRT 20m make test-mysql8-migration - - timeout -s ABRT 20m make test-mysql8 - environment: - GOPROXY: off - TAGS: bindata - TEST_LDAP: 1 - depends_on: - - build - - name: test-pgsql pull: always image: golang:1.13 @@ -350,7 +349,7 @@ steps: TEST_LDAP: 1 depends_on: - build - + --- kind: pipeline name: translations From d7c56a38ba253a110875a5f89798bdca52f1355f Mon Sep 17 00:00:00 2001 From: Antoine GIRARD Date: Mon, 13 Jan 2020 19:35:10 +0100 Subject: [PATCH 4/5] ci: rename steps --- .drone.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.drone.yml b/.drone.yml index 0affa3dae6ca0..a265bc4efd1e1 100644 --- a/.drone.yml +++ b/.drone.yml @@ -55,7 +55,7 @@ steps: --- kind: pipeline -name: testing +name: testing-amd64 platform: os: linux @@ -435,7 +435,8 @@ trigger: - push depends_on: - - testing + - testing-amd64 + - testing-arm64 - translations steps: @@ -533,7 +534,8 @@ trigger: - tag depends_on: - - testing + - testing-arm64 + - testing-amd64 steps: - name: fetch-tags @@ -646,7 +648,8 @@ workspace: path: src/code.gitea.io/gitea depends_on: - - testing + - testing-amd64 + - testing-arm64 trigger: ref: @@ -724,7 +727,8 @@ workspace: path: src/code.gitea.io/gitea depends_on: - - testing + - testing-amd64 + - testing-arm64 trigger: ref: @@ -806,7 +810,8 @@ when: - failure depends_on: - - testing + - testing-amd64 + - testing-arm64 - translations - release-version - release-master From a37d6de61f0530345e39a4d4f46accb00eb7e0aa Mon Sep 17 00:00:00 2001 From: Antoine GIRARD Date: Mon, 13 Jan 2020 21:08:10 +0100 Subject: [PATCH 5/5] ci: move back mysql8 --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index a265bc4efd1e1..cec0a278acb8f 100644 --- a/.drone.yml +++ b/.drone.yml @@ -75,7 +75,7 @@ services: - name: mysql8 pull: default - image: mysql/mysql-server:8.0 + image: mysql:8.0 environment: MYSQL_ALLOW_EMPTY_PASSWORD: yes MYSQL_DATABASE: testgitea