AWS CodePipeline
AWS CodePipeline is a continuous delivery service you can use to model, visualize, and automate the steps
required to release your software. You can quickly model and configure the different stages of a software
release process.
Setting up the Beagle Test Trigger Stage
You can automate Beagle Security test runs directly from your AWS CodePipeline by adding a new stage
that triggers tests whenever your pipeline executes.
Follow the steps below to set up the beagle-test-trigger stage.
Step 1: Create a new stage in CodePipeline
- Open your AWS CodePipeline and click Edit on the desired pipeline.
- Click Add stage and set the stage name as: beagle-test-trigger
Step 2: Add an action group
- Click Add action group within the new stage.
- Configure the following settings:
- Action name: test-trigger
- Action provider: AWS CodeBuild
- Input artifacts: Select the artifact from the previous stage
Step 3: Create a new CodeBuild project
- Under Project name, click Create project.
- Configure the environment as follows:
- Environment type: Linux
- Environment image: Custom image
- Image registry: Other registry
- External registry URL: beaglesecurity/beagle-test-trigger-common
Step 4: Configure environment variables
You'll need to securely add your Beagle Security credentials as environment variables.
Setting up Beagle Security tokens
In additional configurations, go to environment variables and create parameters for each token:
- Parameter name: ACCESS_TOKEN
- Value: Your Beagle Security Access Token (generated from the dashboard)
- Parameter name: APPLICATION_TOKEN
- Value: Your Beagle Security Application Token (generated from the application settings)
Ensure the name fields are exactly: ACCESS_TOKEN and APPLICATION_TOKEN.
Step 5: Add the build command
- In the build spec section, choose Insert build commands.
- Under build commands, enter: trigger-test
Step 6: Finalize the configuration
- Set your preferred log options.
- Click Continue to CodePipeline, then Done.
Step 7: Run the pipeline
When you run the pipeline, the beagle-test-trigger stage will automatically invoke Beagle Security and trigger a test on your configured application.