You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: add developer's guide for running CodeBuild locally (#94)
* docs: add developer's guide for running CodeBuild locally
* feat: updated for running codebuild locally
* Revise prerequisites and script options in guide
Updated prerequisites and options for the codebuild_build.sh script in the developer guide.
* Fix formatting of script options in developer guide
* Update developers guide with buildspec-override note
Added note about editing the buildspec-override value in codebuild.yml.
* Update DEVELOPERS_GUIDE.md
* fix: update documentation and run codebuild
Signed-off-by: Scott Schreckengaust <scottschreckengaust@users.noreply.github.com>
* fix: running codebuild
Signed-off-by: Scott Schreckengaust <scottschreckengaust@users.noreply.github.com>
* Update codebuild command for architecture handling
* feat: fixing for act locally
Signed-off-by: Scott Schreckengaust <345885+scottschreckengaust@users.noreply.github.com>
* feat(doc): the act use
Signed-off-by: Scott Schreckengaust <345885+scottschreckengaust@users.noreply.github.com>
---------
Signed-off-by: Scott Schreckengaust <scottschreckengaust@users.noreply.github.com>
Signed-off-by: Scott Schreckengaust <345885+scottschreckengaust@users.noreply.github.com>
Co-authored-by: Scott Schreckengaust <345885+scottschreckengaust@users.noreply.github.com>
You can run AWS CodeBuild builds locally using the [CodeBuild local agent](https://docs.aws.amazon.com/codebuild/latest/userguide/use-codebuild-agent.html). This is useful for testing buildspec changes without pushing to the remote.
6
+
7
+
### Prerequisites
8
+
9
+
- Docker installed and running
10
+
- The `codebuild_build.sh` script:
11
+
12
+
### Basic Usage
13
+
14
+
1. Setup
15
+
- Download the local CodeBuild script and make it executable.
16
+
- Send the `GH_TOKEN` environmental GitHub Personal Access Token (PAT) into a `./.env` file
|`-b FILE`| No | Buildspec override file. Defaults to `buildspec.yml` in the source directory |
50
+
|`-s DIR`| No | Source directory. First `-s` is the primary source; additional `-s` flags use `<sourceIdentifier>:<sourceLocation>` format for secondary sources. Defaults to the current working directory |
51
+
|`-l IMAGE`| No | Override the default local agent image |
52
+
|`-r DIR`| No | Report output directory |
53
+
|`-c`| No | Use AWS configuration and credentials from your local host (`~/.aws` and `AWS_*` environment variables) |
54
+
|`-p PROFILE`| No | AWS CLI profile to use (requires `-c`) |
55
+
|`-e FILE`| No | File containing environment variables (`VAR=VAL` format, one per line) |
56
+
|`-m`| No | Mount the source directory into the build container directly |
57
+
|`-d`| No | Run the build container in Docker privileged mode |
58
+
59
+
60
+
## Running GitHub Actions locally
61
+
62
+
_NOTE: This uses the [`act`](https://github.com/nektos/act) tool and assumes access to a valid AWS CodeBuild project `codebuild-project` in "us-east-1"_
0 commit comments