mirror of
https://github.com/fumiama/terasu-cloudflared.git
synced 2026-06-23 04:30:32 +08:00
TUN-9800: Migrate cloudflared-ci pipelines to Gitlab CI
## Summary This commit migrates the cloduflared ci pipelines, that built, tested and component tested the linux binaries to gitlab ci. The only thing that is remaining to move from teamcity to gitlab are now the release pipelines that run on master. Relates to TUN-9800
This commit is contained in:
@@ -6,7 +6,7 @@ include:
|
||||
###################################
|
||||
.windows-build-defaults: &windows-build-defaults
|
||||
rules:
|
||||
- !reference [.default-rules, run-on-branch]
|
||||
- !reference [.default-rules, run-always]
|
||||
tags:
|
||||
- windows-x86
|
||||
cache: {}
|
||||
@@ -27,27 +27,20 @@ build-cloudflared-windows:
|
||||
### Load Environment Variables for Component Tests ###
|
||||
######################################################
|
||||
load-windows-env-variables:
|
||||
rules:
|
||||
- !reference [.default-rules, run-on-branch]
|
||||
stage: pre-build
|
||||
extends: .component-tests
|
||||
script:
|
||||
- echo "COMPONENT_TESTS_CONFIG=component-test-config.yaml" >> windows.env
|
||||
- echo "COMPONENT_TESTS_CONFIG_CONTENT=Y2xvdWRmbGFyZWRfYmluYXJ5OiBjbG91ZGZsYXJlZC5leGUKY3JlZGVudGlhbHNfZmlsZTogY3JlZC5qc29uCm9yaWdpbmNlcnQ6IGNlcnQucGVtCnpvbmVfZG9tYWluOiBhcmdvdHVubmVsdGVzdC5jb20Kem9uZV90YWc6IDQ4Nzk2ZjFlNzBiYjc2NjljMjliYjUxYmEyODJiZjY1" >> windows.env
|
||||
- echo "COMPONENT_TESTS_CONFIG=$COMPONENT_TESTS_CONFIG" >> windows.env
|
||||
- echo "COMPONENT_TESTS_CONFIG_CONTENT=$COMPONENT_TESTS_CONFIG_CONTENT" >> windows.env
|
||||
- echo "DNS_API_TOKEN=$DNS_API_TOKEN" >> windows.env
|
||||
# We have to encode the `COMPONENT_TESTS_ORIGINCERT` secret, because it content is a file, otherwise we can't export it using gitlab
|
||||
- echo "COMPONENT_TESTS_ORIGINCERT=$(echo "$COMPONENT_TESTS_ORIGINCERT" | base64 -w0)" >> windows.env
|
||||
secrets:
|
||||
DNS_API_TOKEN:
|
||||
vault: gitlab/cloudflare/tun/cloudflared/_dev/_terraform_atlantis/component_tests_token/data@kv
|
||||
file: false
|
||||
COMPONENT_TESTS_ORIGINCERT:
|
||||
vault: gitlab/cloudflare/tun/cloudflared/_dev/component_tests_cert_pem/data@kv
|
||||
file: false
|
||||
variables:
|
||||
COMPONENT_TESTS_CONFIG_CONTENT: Y2xvdWRmbGFyZWRfYmluYXJ5OiBjbG91ZGZsYXJlZC5leGUKY3JlZGVudGlhbHNfZmlsZTogY3JlZC5qc29uCm9yaWdpbmNlcnQ6IGNlcnQucGVtCnpvbmVfZG9tYWluOiBhcmdvdHVubmVsdGVzdC5jb20Kem9uZV90YWc6IDQ4Nzk2ZjFlNzBiYjc2NjljMjliYjUxYmEyODJiZjY1
|
||||
artifacts:
|
||||
access: 'none'
|
||||
reports:
|
||||
dotenv: windows.env
|
||||
cache: {}
|
||||
|
||||
###################################
|
||||
### Run Windows Component Tests ###
|
||||
@@ -60,6 +53,9 @@ component-tests-cloudflared-windows:
|
||||
# We have to decode the secret we encoded on the `load-windows-env-variables` job
|
||||
- $env:COMPONENT_TESTS_ORIGINCERT = [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($env:COMPONENT_TESTS_ORIGINCERT))
|
||||
- powershell -ExecutionPolicy Bypass -File ".\.ci\scripts\windows\go-wrapper.ps1" "${GO_VERSION}" ".\.ci\scripts\windows\component-test.ps1"
|
||||
artifacts:
|
||||
reports:
|
||||
junit: report.xml
|
||||
|
||||
################################
|
||||
### Package Windows Binaries ###
|
||||
|
||||
Reference in New Issue
Block a user