Commit graph

141 commits

Author SHA1 Message Date
fheinecke b022fea56b
Added YUM implementation of OS package build tool (#14203)
* Added YUM implementation of OS package build tool

* Addressed PR comments

* Added YUM migrations

* Added curl to YUM dependencies

* Changed pipelines to use golang:1.18.4-bullseye for Go

* Implemented proper repo downloading logic

* Fixed other merge conflicts

* Added artifacts cleanup

* Removed delete on s3 sync

* Added RPM migrations

* v8 migrations

* Partial v8 migration

* Migration remainder

* Reduced requested resources

* Updated resource limits per step

* Added k8s stage resource limits to drone

* Fixed format issue

* Removed resource requests

* Added `depends_on` support to dronegen

* v8.3 migrations

* Fixed parallelism

* Removed migration parallelism

* Fixed RPM base arch lookup

* v6 and v7 YUM migration

* Fixed missing ISA

* Updated repo file path

* Added logging

* Removed vars from repo file

* v8.3 migration first batch

* v8.3 migration second batch

* v9.0 migration

* v9.1 migration

* v9.2 migration

* v9.3 first migration

* v9.3 second migration

* v10.0 migration

* Removed migrations

* Disabled shell linting non-issues

* Fixed linter problem

* More linter fixes
2022-08-02 21:32:59 +00:00
Logan Davis c6a9fa0767
Fix drone publishing for teleport operator (#15065)
Fix teleport-operator
2022-07-30 01:02:58 +00:00
Trent Clarke 605b525d05
Force unlock keychain on Darwin Push Build (#14909)
Code signing is failing on Darwin builds, and the most likely candidate is a locked keychain at build time.

This patch adds an explicit keychain unlock immediately prior to signing in order make sure the signing keys are available.
2022-07-27 04:05:40 +00:00
Logan Davis ce1113fe28
Drone publishing for Amazon ECR (#14347) 2022-07-26 16:14:08 +00:00
Justinas Stankevičius 08dcdcd27b
Fix artifact registration in Releases API for Teleport Connect (#13946)
Fix artifact registration for Teleport Connect
2022-07-26 12:27:39 +00:00
Marco Dinis 5effbd8359 Add Teleport operator
This commit adds the Teleport operator. The operator reconciles
TeleportUsers and TeleportRoles Kubernetes resources with Users and
Roles Teleport resources.
2022-07-25 15:27:10 -04:00
Logan Davis b6c2598473
Add old cron job file for v8 (#14666) 2022-07-20 16:56:51 +00:00
Roman Tkachenko b7d5a61eae
10 Post-release 2: Update docker versions for 10 (#14244)
Update docker versions for 10
2022-07-08 10:59:19 -07:00
Jakub Nyckowski d03f8db0ca
Use CentOS 7 for building release binaries (#14062)
Switch to CenOS 7 as a base for Teleport releases.

Co-authored-by: Roman Tkachenko <roman@goteleport.com>
2022-07-02 02:11:37 +00:00
fheinecke f688365efa
Added migrations for latest release (#13498)
* Added migrations for latest release

* Removed migrations post run
2022-06-16 23:30:47 +00:00
Roman Tkachenko 5a079914aa
Update buildbox to 11 (#13549) 2022-06-16 03:05:54 +00:00
Alan Parra 29d3f80261
Use make release-windows on Drone, make it similar to make release (#13532)
Switch from `make release-amd64` to make release-windows in Drone builds, making
release builds similar to "regular" builds (that already use
`make release-windows-unsigned`).

Fixes current woes caused by FIDO2=yes in Windows release builds. (Note that
ARCH is implied by the build.)

* Use `make release-windows` on Drone, make it similar to `make release`
* Update .drone.yaml
2022-06-15 19:59:34 +00:00
fheinecke 774e2cad65
Added prerelease check to new APT promotion pipeline (#13209)
* Added prerelease check to new APT promotion pipeline

* Resigned .drone.yml

Co-authored-by: Roman Tkachenko <roman@goteleport.com>
2022-06-08 23:57:25 +00:00
Rafał Cieślak b54fbcde92
dronegen/mac.go: Use make print-version for $VERSION (#13232)
`$WORKSPACE_DIR/go/.version.txt` is available only in tag pipelines, so
we can't read it in pipelines that run on pushes to master.

Instead, let's always use `make print-version`. It'll return the correct
value no matter what pipeline is used.
2022-06-07 13:39:07 +00:00
Rafał Cieślak 3c5eb0989f
dronegen/mac.go: Sync Connect version with Teleport (#13099) 2022-06-07 09:55:32 +00:00
fheinecke 6a693b9ce7
RFD 58: Package Distribution (#10746)
* Wrote RFD and implementation for APT repos.
2022-06-03 14:36:56 -05:00
Zac Bergquist 86f3a3d618
Build Teleport Connect on darwin/amd64 (#12257)
This commit updates drone to build Teleport Connect by:

* cloning `gravitational/webapps` as a sibling directory to
  gravitational/teleport
* checkout out the right version of webapps by running a simple
  Go program (this step is only necessary until we move webapps
  into the teleport repo)
* Running the Teleport Connect build and copying artifacts

Code signing should run on tag builds automatically as part the
electron build, assuming the Apple Account credentials are
properly loaded into the keychain.

Notarization will also happen automatically if both 
`$APPLE_USERNAME` and `$APPLE_PASSWORD` are set.

In order to make the above happen, this patch also includes:

* Installing and removing a per-build Node instance in the 
  toolchain directory on Darwin
* Moving the toolchain temporary directory out of ~/ and into /tmp.

Drone usually sets `$HOME` to a temporary directory for each build,
but unfortunately we need it to point to the actual build user's 
home directory in order for the notarisation tooling to find the
right keychain. Having $HOME point to a long-lived directory risks
both pollution from build detritus and builds stomping on one another.

In an in an attempt to isolate the builds from each other and protect
`~build` as best we can, as much of the build state as possible 
(including ephemeral toolchains) has been moved under `/tmp`.

Co-authored-by: Trent Clarke <trent@goteleport.com>
2022-06-03 12:19:42 +10:00
Zac Bergquist ff4c307453
Update to Go 1.18.3 (#13103) 2022-06-02 16:10:57 +00:00
Alan Parra 7567c5502d
Build tsh with static libfido2 for macOS (#13001)
Add a script to build libfido2 (and its dependencies) on macOS and enable FIDO2
static builds.

I decided to build all dependencies instead of pulling from Homebrew for a few
reasons:

1. There is no libcbor.a in a brew package
2. This captures library versions within the Teleport source code, allowing us
   to build binaries against different versions of libfido2 (and its
   dependencies).

I've also bumped libfido2 to 1.11.0. I've been running it locally and we are
still pre-release, so it seems like a good time to do it.
(See https://developers.yubico.com/libfido2/Release_Notes.html.)

#9160

* Build libfido2 and dependencies for macOS
* Build tsh with static fido2 on Drone
* Bump libfido2 versions in all builds
* Attempt to appease linters
* Use temp dirs inside LIB_CACHE
* Move LIB_CACHE outside of HOME

HOME is reassigned in macOS builders, but we want a "stable" cache
directory. /tmp is used by build-package.sh and build-pkg-tsh.sh.

* Rename script to build-fido2-macos.sh
* Regenerate Drone files
2022-05-31 14:50:56 +00:00
Alan Parra 424afc3d63
Enable touchid builds on Drone (#12794)
Add the TOUCHID=yes Makefile toggle and enable it on Drone.

Complements #12751.

#9160

* Enable touchid builds on Drone
* Update Drone URL in error message
* Run `make dronegen`
2022-05-25 16:52:37 +00:00
Zac Bergquist f0bb6b4fef
Update to Go 1.18 (#12578)
And update e ref to pick up gravitational/teleport.e#424
2022-05-11 11:23:50 -06:00
Roman Tkachenko 715dbb8a5d
Bump Go to 1.17.9 (#11931) 2022-04-14 02:35:00 +00:00
Justinas Stankevičius b24b561560
Release pipeline improvements (#10707) 2022-04-06 16:35:45 +03:00
Edoardo Spadolini fb4ae0f280
Fix 32-bit arm deb and 64-bit arm rpm packages (#11318) 2022-03-29 16:46:55 +00:00
Walt 90dde13ef0
Re-sign .drone.yml (#11478) 2022-03-26 01:26:59 +00:00
fheinecke 1daf7d2302
[master forward-port] Fixed RPMs using artifacts compiled against a too-new version of glibc (#11026)
* Fixed RPMs using artifacts compiled against a too-new version of glibc

* Fixed RPM naming issue

* Apply suggestions from code review

Co-authored-by: Gus Luxton <gus@goteleport.com>

Co-authored-by: Gus Luxton <gus@goteleport.com>
2022-03-25 20:55:31 +00:00
Roman Tkachenko b834ef185d
9.0 post-release 2: bump docker versions (#11086) 2022-03-11 23:44:00 +00:00
Roman Tkachenko fa93b2775c
Update dronegen to fix build-darwin-amd64-pkg-tsh artifacts path (#10861) 2022-03-04 21:35:37 +00:00
Trent Clarke 9bd7e0f9e7
Restore docs deply hook (#10836) 2022-03-04 15:14:50 +11:00
Trent Clarke 3beb29832f
Upgrade buildbox to go 1.17.7 & tag as teleport10 (#10611)
Prior to this patch the teleport buildbox version has been tagged with the Go version for the current release. This bit us during the Teleport 9 development cycle, as both Teleport 8 and 9 use the same version of Go but require different versions of Rust, and we were unable to distinguish between the 2 buildbox versions.

At the time, Teleport 8 was individually patched to create a new `teleport8` buildbox tag, decoupling the buildbox version from the Go version. This was never ported into master and now we find the teleport 9 branch sharing the same buildbox tag as master.

This patch forward-ports all the changes made to `branch/v8` and updates them for master, creating a new `teleport10` buildbox tag. The idea is that we will create a new tag for teleport11 at the same time the release branch for Teleport 10 is mad at some point in the future.

Once this is merged, Drone will create and push new buildbox images, which will become available for CI. A subsequent patch will update the CI scripts to use the new `teleport10` buildbox images.
2022-03-01 15:31:46 +11:00
Roman Tkachenko 480518596b
Fix artifacts path for build-darwin-amd64-pkg-tsh drone pipeline (#10599) 2022-02-25 00:30:58 +00:00
Walt 9ee3951d07
Restore teleport-private deb/rpm gating (#10532)
This was removed in #9783, and should not have been.
2022-02-24 18:55:06 +00:00
Walt 51371ae81d
Re-sign .drone.yml (#10469) 2022-02-18 12:47:27 -07:00
Walt f1fe4b6fe7
Remove drone step to publish centos6 buildbox (#10432)
This is some cleanup that was missed in
https://github.com/gravitational/teleport/pull/10314, and has been
causing push builds to fail with:

  make: *** No rule to make target 'buildbox-centos6'.  Stop.
2022-02-18 19:01:21 +00:00
Walt Della 0c0ca507ac Switch shell to golang for latest version detection (#10295)
The shell version detection is fragile and relatively error prone,
hopefully this go version will be more robust.  At the very least, it
will fix an issue where signed tags were creating incorrect download
urls.

Contributes to https://github.com/gravitational/teleport/issues/9494
2022-02-16 17:19:17 -08:00
Walt Della f49feacb24 Integrate version-check into build.assets/tooling
This is a unified home as suggested by Trent here:

  https://github.com/gravitational/teleport/pull/10295#discussion_r807499882

Furthermore, I've split cmd code from lib code, in preparation for a new
command that will reuse the library code.
2022-02-16 17:19:17 -08:00
Walt 2cf15cee0f
Update version-check paths (#10118)
Teleport source code is not checked out in /drone/src, it is checked out
in /go/src/github.com/gravitational/teleport by an earlier step. As
such, we need to use that as our base.
2022-02-03 21:12:54 +00:00
Justinas Stankevičius 1dcf165497
Ignore artifact failures in remaining pipelines (#9932) 2022-01-25 11:06:55 -08:00
Justinas Stankevičius b334e2dd94
Ignore failures for artifact registration step (#9921) 2022-01-25 16:09:22 +00:00
Walt 854053326a
Conditionally publish deb packages (#9496)
This patch makes a couple changes:

  1. deb archives are not published to apt if they're not the latest
     release ever
  2. both rpm and deb archives are no longer published to yum / apt if
     they contain any pre-release indicator or build metadata
  3. nothing is published if the commit isn't tagged.

Contributes to https://github.com/gravitational/teleport/issues/8166
2022-01-14 03:52:15 +00:00
Walt e3c644655b
Run gpg in batch mode (#9728)
Do not prompt for any reason, especially not if a repomd.xml.asc already
exists when signing repomd.xml. Attempting to prompt (instead of
overwriting) results in publish failures like the following:

  + gpg --detach-sign --armor /rpmrepo/teleport/repodata/repomd.xml
  gpg: cannot open '/dev/tty': No such device or address

Contributes to https://github.com/gravitational/teleport/issues/9726.
2022-01-12 02:23:30 +00:00
Walt 4e324e74e3
Sign rpm repo metadata (#9027)
This helps support zypper on Suse, and improves our general RPM
distribution security posture.  The threat model is someone compromises
AWS, but not our signing keys.  In this case, they could update repo
metatdata to point to an unsigned package.  With metadata signed, this
is no longer possible -- both the index and the package are verified.

For more info on this change, see this very helpful blog post:

  https://blog.packagecloud.io/eng/2014/11/24/howto-gpg-sign-verify-rpm-packages-yum-repositories/
2022-01-07 01:10:38 +00:00
Justinas Stankevičius cc6cb4e8da
Upload release binaries to new release infrastructure (#8722)
* Release service PoC

* Use release service credentials

* Remove credentials from FS on exit

* Fix trap invocation

* Add darwin compatibility

* Actually fail on unexpected status

* Re-add CREDENTIALS (forgotten)

* Try to skip irrelevant files

* Run "upload to S3" before "register artifacts"

Do not break existing flow in case the new step fails

* Switch to a new (staging) certificate for releases
2022-01-03 15:51:17 +00:00
Roman Tkachenko 1e09b825f6
Port fixes from v8 (#9397)
* Update oxy
* Do not allow MySQL COM_CHANGE_USER command
* Add support for all MongoDB wire messages
* Drone fix
2021-12-15 06:38:05 +00:00
Trent Clarke 6916e64ce6
Disable drone triggers (#9313)
Removes all Drone CI tasks from `dronegen` and `.drone.yml`
2021-12-10 15:46:27 +11:00
Zac Bergquist 6808d6acb4 Create separate builds for CentOS7 (+fips)
Add new buildboxes for centos7 and centos7-fips.

For now, we will continue to support both CentOS 6 and 7.
Eventually we will drop support for CentOS 6, and the only
supported CentOS builds will be these new CentOS 7 builds.

Fixes #9028
2021-12-02 10:30:03 -07:00
Russell Jones 192d6d780b Fixed Helm publishing. 2021-11-17 13:55:56 -08:00
Russell Jones d87e4343bf Updated Drone pipeline to build Teleport 8 images. 2021-11-17 13:55:56 -08:00
Russell Jones b7832e5db1 Updated build-darwin-* pipeline.
Updated build-darwin-* pipeline to use per-build Rust and Go toolchain.
2021-11-15 11:29:09 -08:00
Zac Bergquist 2d34ab4402 Update mac builds
Download Rust and Go per-build to ensure that the right version is used
and that builds do not step on each other.

Also rungs cbindgen in quiet mode to suppress the annoying output it
spews for non-public symbols.
2021-10-29 16:55:53 -06:00