8ae0eec230
This commit introduces the ability to show previews for PRs by any author. It works as follows: - The build artifacts of all PRs are uploaded to the preview server. - Automatically verified PRs (i.e. from trusted authors or having a specific label) are deployed and publicly accessible as usual. - PRs that could not be automatically verified are stored for later use (after re-verification). - A PR can be marked as "trusted" and make its preview publicly accessible by adding the GitHub label specified in the `AIO_TRUSTED_PR_LABEL` env var of the preview server. At the moment, there is no automatic mechanism for notifying the preview server about changes to the PR's verification status. The PR's "visibility" will be checked and updated every time a new build is uploaded.
1.1 KiB
1.1 KiB
VM setup - Create docker image
Checkout repository
git clone <repo-url>
Build docker image
<aio-builds-setup-dir>/scripts/create-image.sh [<name>[:<tag>] [--build-arg <NAME>=<value> ...]]
- You can overwrite the default environment variables inside the image, by passing new values using
--build-arg
.
Note: The script has to execute docker commands with sudo
.
Example
The following commands would create a docker image from GitHub repo foo/bar
to be deployed on the
foobar-builds.io
domain and accepting PR deployments from authors that are members of the
bar-core
and bar-docs-authors
teams of organization foo
:
git clone https://github.com/foo/bar.git foobar
- Run:
./foobar/aio-builds-setup/scripts/build.sh foobar-builds \ --build-arg AIO_REPO_SLUG=foo/bar \ --build-arg AIO_DOMAIN_NAME=foobar-builds.io \ --build-arg AIO_GITHUB_ORGANIZATION=foo \ --build-arg AIO_GITHUB_TEAM_SLUGS=bar-core,bar-docs-authors
A full list of the available environment variables can be found here.