teleport/build.assets
Alan Parra 0d9354a424
Run tests and lint libfido2 code on buildbox (#11547)
- Lint libfido2 (and other) Go build tags
- `make test-go` exercises the libfido2 build tag, as long as `libfido2` is present in the system
- Install `libfido2` (and dependencies) in the teleport-buildbox image

Libraries are installed from source, instead of apt or ppas, so we can guarantee deterministic (and current!) versions.
(Binary releases are not available.)

At the present moment, `librdp_client` and `libfido2` can't be used together. This is because `librdp_client` embeds
openssl/`libcrypto`, which is also a dependency for `libfido2`, causing duplicate symbol errors. In practice both
libraries never coexist in the same binary, so it's easy to sidestep the issue (`librdp_client` links to `teleport`,
while FIDO2 code is only used by `tsh`). I may be able to make them coexist, but not without changes to how go-libfido2
builds.

This change is only for linting/testing libfido2 code, I'll address `tsh` releases in a future PR.

#9160

* Install libfido2 in buildbox

libfido2 and libcbor are installed from source to make sure we get
deterministic versions (apt is outdated and ppas are likely to move
forward with time).

* Run libfido2 tests on test-go
* Lint libfido2 Go build tag
* Lint other Go build tags
* Comment build tags that break the linter
* Tidy modules
* Re-enable roletester linter
* Pass tags conditionally to golangci-lint
* Clarify and improve libfido2 wildcard
* Drop `:$LD_LIBRARY_PATH` from variable
* Replace LD_LIBRARY_PATH with `ldconfig`
* Test for ARM homebrew location too
2022-03-30 17:52:29 +00:00
..
charts docker: Add libelf1 as a dependency for building Teleport container images 2021-07-14 15:02:40 -07:00
gomod Update gomod path for beta/alpha pre-releases. (#10866) 2022-03-10 01:44:24 +00:00
pam add PAM environment with interpolation support 2021-03-30 18:23:38 +02:00
rpm rpm: Don't include build-id artifacts in packages (#7080) 2021-05-31 09:52:30 -07:00
rpm-sign rpm: Don't include build-id artifacts in packages (#7080) 2021-05-31 09:52:30 -07:00
tooling Do not block apt publishing if there is a more current pre-release (#10804) 2022-03-04 06:46:27 +00:00
webapps Update the PR description for auto webassets udpates (#10212) 2022-02-08 19:10:47 +00:00
.bashrc Integrated mkdocs into Teleport builds 2016-03-18 17:32:41 -07:00
.gitignore pam: trigger pam_authenticate on login (#3966) 2020-07-10 20:28:33 +00:00
build-package.sh Fix 32-bit arm deb and 64-bit arm rpm packages (#11318) 2022-03-29 16:46:55 +00:00
Dockerfile Run tests and lint libfido2 code on buildbox (#11547) 2022-03-30 17:52:29 +00:00
Dockerfile-arm Upgrade buildbox to go 1.17.7 & tag as teleport10 (#10611) 2022-03-01 15:31:46 +11:00
Dockerfile-arm-fips Upgrade buildbox to go 1.17.7 & tag as teleport10 (#10611) 2022-03-01 15:31:46 +11:00
Dockerfile-centos7 Upgrade buildbox to go 1.17.7 & tag as teleport10 (#10611) 2022-03-01 15:31:46 +11:00
Dockerfile-centos7-fips Create separate builds for CentOS7 (+fips) 2021-12-02 10:30:03 -07:00
Dockerfile-cron docker: Add libelf1 as a dependency for building Teleport container images 2021-07-14 15:02:40 -07:00
Dockerfile-fips Reduced shared library dependencies. 2021-08-09 19:17:06 -07:00
install Include tbot binary in Teleport packages and installs (#10646) 2022-03-03 03:25:23 +00:00
locale.gen Jenkins build target 2015-12-23 10:41:51 -08:00
Makefile Add Helm unit tests (#11062) 2022-03-20 19:01:58 +00:00
profile Jenkins build target 2015-12-23 10:41:51 -08:00
README.md instructions and dockerfile for building dynamodb static binaries 2016-12-14 15:51:55 -08:00

Dockerized Teleport Build

This directory is used to produce a containerized production Teleport build. No need to have Golang. Only Docker is required.

It is a part of Gravitational CI/CD pipeline. To build Teleport type:

make

DynamoDB static binary docker build

The static binary will be built along with all nodejs assets inside the container. From the root directory of the source checkout run:

docker build -f build.assets/Dockerfile.dynamodb -t teleportbuilder .

Then you can upload the result to an S3 bucket for release.

docker run -it -e AWS_ACL=public-read -e S3_BUCKET=my-teleport-releases -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY teleportbuilder

Or simply copy the binary out of the image using a volume (it will be copied to current directory/build/teleport.

docker run -v $(pwd)/build:/builds -it teleportbuilder cp /gopath/src/github.com/gravitational/teleport/teleport.tgz /builds