diff --git a/teleport.yaml b/teleport.yaml index eedc9282074..5aa6add0691 100644 --- a/teleport.yaml +++ b/teleport.yaml @@ -18,6 +18,8 @@ environment: - build-base - busybox - ca-certificates-bundle + - rust + - cargo-auditable - corepack - go - node-gyp @@ -43,21 +45,57 @@ pipeline: deps: github.com/golang-jwt/jwt/v4@v4.5.1 - runs: | - # https://github.com/gravitational/teleport#building-teleport mkdir -p "${{targets.contextdir}}"/var/lib/teleport mkdir -p "${{targets.contextdir}}"/usr/local/bin - # This build requires the stable version of rust, managed by rustup, because it requires a few other toolchains too. rustup install stable + rustup default stable + ARCH=$(uname -m) + export PATH="$HOME/.rustup/toolchains/stable-${ARCH}-unknown-linux-gnu/bin:$PATH" rustup target add wasm32-unknown-unknown - # This is a bit of a hack, but it's the easiest way to get the right version of rustc and cargo in the path. - export PATH="$HOME/.rustup/toolchains/stable-${{host.triplet.rust}}/bin:$PATH" - make full + pnpm config set package-import-method copy + + # Install dependencies and build web assets + make ensure-js-deps + make ensure-webassets - # create me a for loop that iterates over the binaries in build/ - # and installs them to "${{targets.contextdir}}"/usr/local/bin - for bin in build/*; do + - uses: go/build + with: + packages: ./tool/teleport + output: teleport + tags: webassets_embed,kustomize_disable_go_plugin_support + + - uses: go/build + with: + packages: ./tool/tctl + output: tctl + tags: kustomize_disable_go_plugin_support + + - uses: go/build + with: + packages: ./tool/tsh + output: tsh + tags: kustomize_disable_go_plugin_support + + - uses: go/build + with: + packages: ./tool/tbot + output: tbot + tags: kustomize_disable_go_plugin_support + + - uses: go/build + with: + packages: ./tool/teleport-update + output: teleport-update + tags: kustomize_disable_go_plugin_support + + - runs: | + cd tool/fdpass-teleport && cargo build --release --locked + install -Dm755 target/release/fdpass-teleport "${{targets.contextdir}}"/usr/local/bin/ + + # Install the go binaries + for bin in teleport tctl tsh tbot teleport-update; do echo "Installing $bin to /usr/local/bin" install -Dm755 $bin -t "${{targets.contextdir}}"/usr/local/bin done @@ -79,13 +117,8 @@ test: - runs: | teleport configure -o file teleport start -c /etc/teleport.yaml & - - # wait for teleport to start :3080 wait-for-it localhost:3080 -t 10 - echo "Teleport is running on port 3080!" - - # create a user tctl get roles --format=text tbot version tbot --help