feat(GODT-3169): load pipeline env from bridge internal.

This commit is contained in:
Jakub 2024-01-23 11:49:50 +01:00
parent 773a230d14
commit 56aa497b9d
4 changed files with 32 additions and 41 deletions

View File

@ -16,8 +16,6 @@
# along with ProtonMail Bridge. If not, see <https://www.gnu.org/licenses/>.
---
image: gitlab.protontech.ch:4567/go/bridge-internal:test-go1.20
default:
tags:
- shared-small
@ -35,6 +33,7 @@ stages:
- build
include:
- local: ci/setup.yml
- local: ci/rules.yml
- local: ci/env.yml
- local: ci/test.yml

View File

@ -4,18 +4,8 @@
.env-windows:
before_script:
- export BRIDGE_SYNC_FORCE_MINIMUM_SPEC=1
- export GOROOT=/c/Go1.20/
- export PATH=$GOROOT/bin:$PATH
- export GOARCH=amd64
- export GOPATH=~/go1.20
- export GO111MODULE=on
- export PATH="${GOPATH}/bin:${PATH}"
- export MSYSTEM=
- export QT6DIR=/c/grrrQt/6.4.3/msvc2019_64
- export PATH=$PATH:${QT6DIR}/bin
- export PATH="/c/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin:$PATH"
- $(git config --global -l | grep -o 'url.*gitlab.protontech.ch.*insteadof' | xargs -L 1 git config --global --unset &> /dev/null) || echo "nothing to remove"
- git config --global url.https://gitlab-ci-token:${CI_JOB_TOKEN}@${CI_SERVER_HOST}.insteadOf https://${CI_SERVER_HOST}
- !reference [.before-script-windows-aws-build, before_script]
- !reference [.before-script-git-config, before_script]
- git config --global safe.directory '*'
- git status --porcelain
cache: {}
@ -25,23 +15,14 @@
.env-darwin:
before_script:
- export BRIDGE_SYNC_FORCE_MINIMUM_SPEC=1
- export PATH=/usr/local/bin:$PATH
- export PATH=/usr/local/opt/git/bin:$PATH
- export PATH=/usr/local/opt/make/libexec/gnubin:$PATH
- export PATH=/usr/local/opt/gnu-sed/libexec/gnubin:$PATH
- export GOROOT=~/local/opt/go@1.20
- export PATH="${GOROOT}/bin:$PATH"
- export GOPATH=~/go1.20
- export PATH="${GOPATH}/bin:$PATH"
- export QT6DIR=/opt/Qt/6.4.3/macos
- export PATH="${QT6DIR}/bin:$PATH"
- uname -a
- !reference [.before-script-darwin-build, before_script]
cache: {}
tags:
- macos-m1-bridge
.env-linux-build:
image: gitlab.protontech.ch:4567/go/bridge-internal:build-go1.20-qt6.4.3
extends:
- .image-linux-build
variables:
VCPKG_DEFAULT_BINARY_CACHE: ${CI_PROJECT_DIR}/.cache
cache:
@ -50,13 +31,11 @@
- .cache
when: 'always'
before_script:
- mkdir -p .cache/bin
- export BRIDGE_SYNC_FORCE_MINIMUM_SPEC=1
- !reference [.before-script-git-config, before_script]
- mkdir -p .cache/bin
- export PATH=$(pwd)/.cache/bin:$PATH
- export GOPATH="$CI_PROJECT_DIR/.cache"
- export PATH=$PATH:$QT6DIR/bin
- $(git config --global -l | grep -o 'url.*gitlab.protontech.ch.*insteadof' | xargs -L 1 git config --global --unset &> /dev/null) || echo "nothing to remove"
- git config --global url.https://gitlab-ci-token:${CI_JOB_TOKEN}@${CI_SERVER_HOST}.insteadOf https://${CI_SERVER_HOST}
tags:
- shared-large

7
ci/setup.yml Normal file
View File

@ -0,0 +1,7 @@
---
include:
- project: 'go/bridge-internal'
ref: 'feat/godt-3160'
file: 'ci/runners-setup.yml'

View File

@ -4,15 +4,17 @@
lint:
stage: test
extends:
- .image-linux-test
- .rules-branch-manual-br-tag-and-MR-and-devel-always
script:
- make lint
tags:
- shared-medium
bug-report-preview:
lint-bug-report-preview:
stage: test
extends:
- .image-linux-test
- .rules-branch-and-MR-manual
script:
- make lint-bug-report-preview
@ -31,13 +33,25 @@ bug-report-preview:
test-linux:
extends:
- .image-linux-test
- .script-test
tags:
- shared-large
test-windows:
extends:
- .env-windows
- .script-test
test-darwin:
extends:
- .env-darwin
- .script-test
fuzz-linux:
stage: test
extends:
- .image-linux-test
- .rules-branch-manual-MR-and-devel-always
script:
- make fuzz
@ -86,19 +100,10 @@ test-integration-nightly:
paths:
- nightly-job.log
test-windows:
extends:
- .env-windows
- .script-test
test-darwin:
extends:
- .env-darwin
- .script-test
test-coverage:
stage: test
extends:
- .image-linux-test
- .rules-branch-manual-scheduled-and-test-branch-always
script:
- ./utils/coverage.sh
@ -123,6 +128,7 @@ test-coverage:
go-vuln-check:
extends:
- .image-linux-test
- .rules-branch-manual-MR-and-devel-always
stage: test
tags: