smithy-rs/tools/ci-build
John DiSanti 4604aa5b5d
Replace the crates.io API with the sparse index (#3447)
The sparse index is preferred to the crates.io API for the checks we
need, according to the [documentation](https://crates.io/data-access).
When the tools were first implemented, the sparse index didn't exist, so
the API was used.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
2024-02-28 20:47:46 +00:00
..
changelogger Add CHANGELOG support for multiple reference authors (#2012) 2024-02-28 17:21:02 +00:00
crate-hasher Upgrade nightly used in CI (#3073) 2023-12-14 11:30:23 -08:00
difftags Rust msrv 1.74 (#3410) 2024-02-16 21:15:48 +00:00
publisher Replace the crates.io API with the sparse index (#3447) 2024-02-28 20:47:46 +00:00
runtime-versioner Replace the crates.io API with the sparse index (#3447) 2024-02-28 20:47:46 +00:00
sdk-lints Replace the crates.io API with the sparse index (#3447) 2024-02-28 20:47:46 +00:00
sdk-versioner Implement runtime-versioner audit tool (#3332) 2024-01-11 23:20:36 +00:00
smithy-rs-tool-common Replace the crates.io API with the sparse index (#3447) 2024-02-28 20:47:46 +00:00
Dockerfile Add `aws-smithy-wasm` crate with WASI http client (#3409) 2024-02-27 23:40:42 +00:00
README.md Fix repo org move issues (#3166) 2023-11-10 18:51:04 +00:00
add-local-user.dockerfile Fix `SPDX-License-Identifier` in header comments (#1377) 2022-05-09 09:50:46 -05:00
build.docker-compose.yml Fix `SPDX-License-Identifier` in header comments (#1377) 2022-05-09 09:50:46 -05:00
ci-action Reduce Docker image rebuilds (#2269) 2023-02-01 18:41:31 +00:00
ci-create-workspace Reduce Docker image rebuilds (#2269) 2023-02-01 18:41:31 +00:00
sanity-test Add `mdbook` to the `sanity-test` script (#2751) 2023-06-07 11:44:14 +00:00

README.md

ci-build

This directory includes everything to build the build/release/CI Docker image.

  • Dockerfile: Dockerfile used to create the base build image. Needs to be in tools/ci-build so that it can copy all the tools source code into the image at build time.
  • add-local-user.dockerfile: Creates a user in the build image with the host's user ID
  • build.docker-compose.yml: Docker Compose file for using the build image
  • ci-action: Script for running CI actions inside the Docker build image
  • ci-create-workspace: Used by ci-action, but can be run manually to create a one-off workspace for debugging
  • sanity-test: Script that sanity tests the Docker build image
  • Other directories include various tools written in Rust for build/release/CI

There are three spaces you need to conceptualize for testing this locally:

  • Origin: The original smithy-rs where you're iterating on CI scripts.
  • Starting space: Directory with smithy-rs to run CI checks against. You have to create this. Conceptually, this is equivalent to the GitHub Actions working directory.
  • Action space: Temporary directory maintained by ci-action where the CI checks actually run.

To create the starting space, do the following:

cd /path/to/my/starting-space
git clone https://github.com/smithy-lang/smithy-rs.git
# Optionally check out the revision you want to work with in the checked out smithy-rs.
# Just make sure you are in /path/to/my/starting-space (or whatever you called it) after.

Then you can test CI against that starting space by running:

$ORIGIN_PATH/tools/ci-build/ci-action <action> [args...]

The action names are the names of the scripts in tools/ci-scripts/, and [args...] get forwarded to those scripts.

Note: ci-action does not rebuild the build image, so if you modified a script, you need to run ./acquire-build-image from the origin .github/scripts path.