Commit graph

424 commits

Author SHA1 Message Date
Rafał Cieślak 3ac5a0aedb
Refactor prehog & teleterm protos to match project conventions (#20810)
* Adjust go_package of lib/prehog Go protobufs

This makes them follow the pattern set out by api/proto and proto.

* Adjust go_package of lib/teleterm Go protobufs

* Use single buf.gen.yaml to generate JS protos

This also entailed changing the location of lib/teleterm protos and changing
the value of their package specifier to match the conventions in other parts
of the codebase. This is a breaking change but that is fine for Connect
as the protos are used locally only and each build ships with matching
protobufs.

* Make web/packages/teleterm use protobufs from gen-proto-js

We used to copy protobufs over to web/packages/teleterm/src/services/tshd
since webapps used to be in a separate repo.

This is no longer the case, so we can just make teleterm use protobufs
from gen-proto-js.

* Move prehog & teleterm protos into proto/teleport/lib

* Generate JS protos to gen/proto/js

* Move lib/teleterm Go protobufs to gen/proto/go

* Move lib/prehog Go protobufs to gen/proto/go

* Rename lib/teleterm proto package

* Re-enable linter rules for teleterm & prehog

* Update prehogv1 path in usagereporter_test.go

* Use except instead of ignore_only to allow Google API-style responses

* Add UNARY_RPC to api/proto & proto

* Ignore gen/ when running addlicense

* buf-js.gen.yaml: Remove comment about lack of go_package for JS

* Move prehog protos to proto/prehog/v1alpha

* Adjust prehog's go_package to match proto package
2023-02-03 14:47:06 +00:00
Justinas Stankevičius 6213ccf42d
Add Plugin resource schema, methods (#20990)
* Add Plugin resource schema, methods

* Improve shebang of genproto.sh

Execute using bash, no matter where it actually lives

* Use Metadata.Expiry()

Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>

* Remove field reservations from PluginStatusCode

* Add plugin (un)marshaling

* Snake case fields of Plugin (and children)

* Ensure timestamp fields on Plugin are always UTC

https://github.com/gogo/protobuf/issues/519

* Rename credentials according to proto conventions

* Fold check for nil settings into the type switch

* Remove extraneous field checks

These are set in setStaticFields()

* Add missing godocs

---------

Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>
2023-02-03 11:04:53 +00:00
Alan Parra e5f02f4eaa
Update Go toolchain to 1.20 (#21111)
* Update Go to 1.20

* Run `make dronegen`

* Update e/ reference
2023-02-02 14:22:04 +00:00
Michael Wilson 6bf65b0f4d
Add check if protos are up to date. (#21066)
* Add check if protos are up to date.

A new check has been added that will detect if protobufs are up to date. The
script will exit abnormally if protobufs need to be regenerated.

* Alan's feedback.

* Restoring the script.

* Update script comment.

* Add in the set -eu.

* Add a comment for the pull_request/merge_group bit in the new github action.

* Remove helper script.

* Reduce the runner size.
2023-02-02 05:54:20 +00:00
Michael Wilson 996a6b038d
Conditionally build the UI if there are changes. (#20489)
* Conditionally build the UI if there are changes.

`ensure-webassets` and `ensure-webassets-e` will now build the UI if the
hash-of-hashes has changed since the last time the webassets were built.

* Update Makefile

Co-authored-by: Jeff Pihach <hatched@users.noreply.github.com>

* Check for the existence of the make command.

* Choose a shasum exec from a preconfigured list or use an override.

* Shellcheck fix.

* Remove yarn.lock from sha calculation.

* Recalc SHA on successful build.

* Fix linting issues.

* Use Python instead of shasum.

* Remove unnecessary comments from sh file.

* Unconditionally rebuild if Python executable is not found.

* Revert "Unconditionally rebuild if Python executable is not found."

This reverts commit 9d2b0e3409.

* Revert "Remove unnecessary comments from sh file."

This reverts commit 600e02811b.

* Revert use of Python, use simplified shell scripting.

* Linting fixes.

* Apply suggestions from code review

Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>

* Remove reference to realpath as apparently the MacOS builder doesn't have it.

* calculate_sha must return 0.

* Use echo in calculate_sha or else set -o pipefail causes failures.

* Suppress SC2005.

---------

Co-authored-by: Jeff Pihach <hatched@users.noreply.github.com>
Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>
2023-01-31 20:06:00 +00:00
Hugo Shaka 12cec1db15
Pin helm-unittest plugin because of a broken release (#21013) 2023-01-31 20:02:01 +00:00
Alan Parra 4f30210153
Bump Buf to v1.13.1 (#20856) 2023-01-28 00:42:15 +00:00
Zac Bergquist 19eae4a738
Update Rust to 1.67.0 (#20821)
Fix lint errors with cargo clippy --fix
2023-01-28 00:34:14 +00:00
Alan Parra 9e4ece3688
Rearrange buildbox layers for faster updates (#20822)
Rearrange buildbox layers so we take better advantage of layer caching, leading
to faster build times and better layer reuse for small changes.
2023-01-27 17:49:14 +00:00
Alan Parra bbcfc05ca4
Bump Buf to 1.13.0 (#20814)
Keep up with the latest updates.

No format, lint or codegen changes.

https://github.com/bufbuild/buf/releases/tag/v1.13.0
2023-01-27 17:34:36 +00:00
Rafał Cieślak 81d898628c
Add docs on how to safely update build box Dockerfiles (#20559) 2023-01-26 14:13:28 +00:00
Rafał Cieślak 6791b48da9
Remove grpc-teleterm Make target and Dockerfile-teleterm (#20032)
* Remove CLANG_FORMAT from Makefiles

It was used to format protos but we use Buf for that since v10.

* Move installing grpc_node_plugin into Dockerfile

This commit basically takes grpc_node_plugin compilation from
Dockerfile-teleterm and moves it to Dockerfile.

* Replace Dockerfile-teleterm with Dockerfile

After moving grpc_node_plugin compilation to Dockerfile, the only remaining
thing that Dockerfile-teleterm does is installing rpm so that we can make
an RPM package for Connect during tag builds.

Installing this package can be simply moved to Dockerfile.

* Remove grpc-teleterm Make target in favor of grpc

* Add updated protobufs

It looks like they're a result of someone changing protos in lib/prehog
without running `make grpc-teleterm` separately. Which is why we're getting
rid of grpc-teleterm as a separate Make target in the first place. ;)
2023-01-26 09:41:07 +01:00
Jeff Pihach 839385774c
Add BUILDARCH arg to fips dockerfile. (#20495) 2023-01-20 20:07:05 +00:00
Jeff Pihach ba2c1fc34a
Add nodejs to the fips dockerfile. (#20487) 2023-01-20 17:27:42 +00:00
Jakub Nyckowski 8108230136
Run webassets build in Docker as current OS user (#20426)
Set the current user when running webassets builds. In this way, the build artifacts will have correct permissions.
2023-01-19 23:01:36 +00:00
Roman Tkachenko bf4ad5db62
Update version to 13.0.0-dev (#20372) 2023-01-18 19:01:11 -05:00
Jeff Pihach 34f102bdeb
Enable building teleport with the new UI location (#20361)
* Changes for merging webapps into teleport.
2023-01-18 22:22:25 +00:00
Roman Tkachenko a4967833e2
Add flaky tests detector. (#20320)
Co-authored-by: Victor Sokolov <gzigzigzeo@gmail.com>
2023-01-18 10:29:10 -08:00
Jeff Pihach 30d51b6680
Add node and yarn to the buildboxes in preparation for the webapps merge (#20339)
* Add node and yarn to the buildboxes in preparation for the webapps merge.
2023-01-18 17:56:04 +00:00
Jakub Nyckowski 86ac5afd07
Update Rust to 1.66.1 (#20197)
Bump up the Rust version to mitigate CVE-2022-46176, context: https://blog.rust-lang.org/2023/01/10/cve-2022-46176.html
2023-01-13 17:32:41 +00:00
Alan Parra e1a8604179
Bump Buf to v1.12.0 (#20155)
Keep up with the latest releases.

No lint, format, or codegen changes.

https://github.com/bufbuild/buf/releases/tag/v1.12.0
2023-01-13 15:18:12 +00:00
fheinecke bbb652bf25
Added binary signing for darwin tarballs (#18719)
Added binary signing for darwin tarballs
2023-01-12 04:58:50 +00:00
Alan Parra 71e0ac95e6
chore: Bump Go to 1.19.5 (#20060)
Update Go to the latest patch.

Bumps api/go.mod to 1.19 as well, as it seems to be lagging.
2023-01-11 14:54:26 +00:00
Rafał Cieślak 50213556db
Use one Buf workspace instead of three (#19774) 2023-01-09 11:31:35 +00:00
rosstimothy c357272e63
Add Connection Proxy protobuf definitions (#19805)
Add definitions for Connection Proxy RPCs.

ProxyService is fairly isolated from other services, so it is generated using plain protoc-gen-go instead of Gogo.
2023-01-06 16:38:38 -05:00
Alan Parra ac0129bd9d
Bump libcbor from v0.9.0 to v0.10.1 (#19797)
Keep up with latest releases.

Dropped `-DCBOR_CUSTOM_ALLOC=ON`, since it's now obsolete (custom alloc is always on).

Release notes:
* https://github.com/PJK/libcbor/releases/tag/v0.10.0
* https://github.com/PJK/libcbor/releases/tag/v0.10.1
2023-01-04 15:26:46 +00:00
Trent Clarke 60264f5f62
Moves GHA docker invocation from action to Makefile (#19784)
Consolidates more of the build logic into the build.assets Makefile, transplanted from the workflow file in teleport.e

See comment gravitational/teleport.e#673 (comment)
2023-01-04 03:04:36 +00:00
Trent Clarke d9ac0d43ae
Update makefile with targets to build from GHA (#19637)
The existing `build.assets` makefile targets had the actual build steps 
coupled together with building the build box image. Because of how GHA
image builds work, we need to uncouple those tasks.

GHA also builds OSS and Enterprise teleports in parallel, so we needed 
a new target to build the Enterprise release without also automatically
building the OSS bundle in series.

Co-authored-by: Roman Tkachenko <roman@goteleport.com>
2022-12-28 23:16:57 +00:00
Tim Buckley 07de55d45d
Generate prehog protos in genproto.sh (#19631)
This adds a `buf generate` for the prehog protos in `genproto.sh`,
which was previously missing from the usual `make grpc` flow.
2022-12-28 09:32:31 -07:00
Łukasz Kozłowski d85795c7af
Fix Rust warnings (#19643) 2022-12-23 15:03:40 +00:00
Łukasz Kozłowski 3a781212c9
Update Rust to 1.66.0 (#19605) 2022-12-23 11:29:14 +01:00
Trent Clarke b0de5a2752
Fix GOLANG_VERSION in multiarch buildbox (#19599)
Update use of $GOLANG_VERSION to expect a leading go
2022-12-23 03:21:09 +00:00
Roman Tkachenko c286e4cd94
Run GHA tests on Dockerfile updates (#19622) 2022-12-22 20:08:52 +00:00
Roman Tkachenko 1b387aba2c
Run GHA tests when build.assets/Makefile changes (#19616) 2022-12-22 19:04:44 +00:00
Trent Clarke e29fabd3b1
Adds GitHub App based auth (#19562)
As we're now using a GitHub app to dispatch workflow requests from Drone to GHA, this patch updates the workflow runner script to handle app authentication.
2022-12-22 03:09:07 +00:00
Trent Clarke afd1fa7934
Adds a multiarch buildbox Dockerfile (#19509)
Currently only supports a minimal build of teleport on ARM32 and ARM64,
but the intent is to expand it until it becomes the single source of
truth for the linux buildboxes for all supported architectures.
2022-12-21 06:38:55 +00:00
Alan Parra 4237ad3cc7
Bump Buf to v1.11.0 (#19515)
Update Buf to the latest release. No formatting, linter, or codegen changes.

https://github.com/bufbuild/buf/releases/tag/v1.11.0
2022-12-20 22:42:27 +00:00
Trent Clarke 397d9005a5
Adds tooling to invoke a GitHub Actions Workflow (#19268)
In preparation for moving some builds from Drone to GHA, we need some
way for Drone to invoke a workflow in GHA and await the result. Handles
timeouts and workflow inputs as well.

Co-authored-by: Nic Klaassen <nic@goteleport.com>
Co-authored-by: Anton Miniailo <anton@goteleport.com>
2022-12-20 10:03:28 +00:00
Steven Martin e1ebc332f8
spell fixes (#19419) 2022-12-16 19:01:28 +00:00
Alan Parra f87fdc9f49
Bump shellcheck to v0.9.0 (#19379)
Keep up with new shellcheck releases.
2022-12-14 22:49:38 +00:00
Brian Joerger 68511c4a75
Add PIV tag to docker builds through drone. (#18266) 2022-12-12 19:56:19 +00:00
Alan Parra f0333a34a5
Bump Buf to v1.10.0 (#19162)
Bump Buf to the latest version (housekeeping so we keep up with the releases).
No lint/format/generate changes.

See https://github.com/bufbuild/buf/releases/tag/v1.10.0.
2022-12-07 22:13:41 +00:00
Alan Parra c4d88ee28b
Update Go to 1.19.4 (#19120)
Update Go to latest security patch.
2022-12-07 13:52:04 +00:00
Hugo Shaka 207567b548
helm: use new helm-unittest plugin (#18964)
* Invoke helm plugins with correct path
* helm: breaking - change helm unittest plugin
* helm: document test plugin fork choice
* Add Makefile target checking helm plugins
2022-12-05 18:58:32 +00:00
Hugo Shaka 16b3059a24
Add new helm unittest plugin fork into the buildbox (#18945) 2022-12-02 22:38:50 +00:00
Łukasz Kozłowski ac4f8b5fb3
Fix FIPS builds (#18851) 2022-11-30 13:44:54 +01:00
Roman Tkachenko cda4be5273
Add Go version to GHA cache key and CI image workflow (#18877)
* Include Go version in the cache key to prevent cache reuse when upgrading Go.
* Push buildboxes to Github container registry to avoid public ECR rate limiting.

Signed-off-by: Roman Tkachenko <roman@goteleport.com>
Co-authored-by: Victor Sokolov <gzigzigzeo@gmail.com>
2022-11-30 00:25:45 +00:00
Nic Klaassen a68a805e78
feat: add login rule protobuf type (#18879) 2022-11-29 22:55:03 +00:00
Jakub Nyckowski bbeb879b69
Fix buildbox build on arm64 (#18745) 2022-11-25 18:58:35 +00:00
Łukasz Kozłowski b6bbe28f3a
Add FIPS support for Desktop Access (#18076) 2022-11-23 15:32:53 +01:00