TUN-8129: Use the same build command between branch and release builds

This commit is contained in:
chungthuang 2024-01-09 11:33:00 +00:00 committed by Chung-Ting Huang
parent 28685a5055
commit cf5be91d2d
3 changed files with 17 additions and 6 deletions

View File

@ -1,3 +1,4 @@
#!/bin/bash
VERSION=$(git describe --tags --always --match "[0-9][0-9][0-9][0-9].*.*") VERSION=$(git describe --tags --always --match "[0-9][0-9][0-9][0-9].*.*")
echo $VERSION echo $VERSION

View File

@ -1,8 +1,10 @@
#!/bin/bash
VERSION=$(git describe --tags --always --match "[0-9][0-9][0-9][0-9].*.*") VERSION=$(git describe --tags --always --match "[0-9][0-9][0-9][0-9].*.*")
echo $VERSION echo $VERSION
# Disable FIPS module in go-boring # Disable FIPS module in go-boring
export GOEXPERIMENT=noboringcrypto export GOEXPERIMENT=noboringcrypto
export CGO_ENABLED=0
# This controls the directory the built artifacts go into # This controls the directory the built artifacts go into
export ARTIFACT_DIR=built_artifacts/ export ARTIFACT_DIR=built_artifacts/

View File

@ -9,22 +9,30 @@ buster: &buster
- *pinned_go - *pinned_go
- build-essential - build-essential
- gotest-to-teamcity - gotest-to-teamcity
- fakeroot
- rubygem-fpm
- rpm
- libffi-dev
- reprepro
- createrepo
pre-cache: &build_pre_cache pre-cache: &build_pre_cache
- export GOCACHE=/cfsetup_build/.cache/go-build - export GOCACHE=/cfsetup_build/.cache/go-build
- go install golang.org/x/tools/cmd/goimports@latest - go install golang.org/x/tools/cmd/goimports@latest
post-cache: post-cache:
- export GOOS=linux # TODO: TUN-8126 this is temporary to make sure packages can be built before release
- export GOARCH=amd64 - ./build-packages.sh
- make cloudflared # Build binary for component test
- GOOS=linux GOARCH=amd64 make cloudflared
build-fips: build-fips:
build_dir: *build_dir build_dir: *build_dir
builddeps: *build_deps builddeps: *build_deps
pre-cache: *build_pre_cache pre-cache: *build_pre_cache
post-cache: post-cache:
- export GOOS=linux
- export GOARCH=amd64
- make cloudflared
- export FIPS=true - export FIPS=true
# TODO: TUN-8126 this is temporary to make sure packages can be built before release
- ./build-packages-fips.sh
# Build binary for component test
- GOOS=linux GOARCH=amd64 make cloudflared
cover: cover:
build_dir: *build_dir build_dir: *build_dir
builddeps: *build_deps builddeps: *build_deps