Skip to content
This repository was archived by the owner on Jan 13, 2026. It is now read-only.

Commit 6af1df1

Browse files
[IT-3523] Run the deploy for test branches
Run the deploy pipeline for pushes to branches that start with `test/` to automate the creation of test artifacts and streamline the manual testing process. Pushing directly to a branch requires write permission to the repo, restricting who can create a test artifact.
1 parent 8aeda7a commit 6af1df1

File tree

2 files changed

+19
-13
lines changed

2 files changed

+19
-13
lines changed

.github/workflows/deploy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
deploy:
2929
name: Deploy to AWS org-sagebase-imagecentral
3030
runs-on: ubuntu-latest
31-
if: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v') }}
31+
if: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/test/') || startsWith(github.ref, 'refs/tags/v') }}
3232
needs: [ "validate" ]
3333
permissions:
3434
id-token: write

README.md

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,25 @@ source_profile = jsmith@imagecentral
4141

4242
Now you will be able to build an image and deploy it to Imagecentral.
4343

44+
### Image Accessability
45+
This project is setup to build publicly accessible images. To change it to
46+
build private images please refer to the [packer documentation](https://packer.io/docs/builders/amazon-ebs.html)
47+
for `ami_users` and `snapshot_users`options.
48+
49+
### Testing
50+
As a pre-deployment step we syntatically validate our packer json
51+
files with [pre-commit](https://pre-commit.com).
52+
53+
Please install pre-commit, once installed the file validations will
54+
automatically run on every commit. Alternatively you can manually
55+
execute the validations by running `pre-commit run --all-files`.
56+
4457
### Manual AMI Build
4558
If you would like to test building an AMI run:
4659
```
4760
cd src
61+
packer plugins install github.com/hashicorp/amazon
62+
packer plugins install github.com/hashicorp/ansible
4863
AWS_PROFILE=packer-service-imagecentral AWS_DEFAULT_REGION=us-east-1 packer build -var AmiImageName=my-test-image -var PACKER_LOG=1 template.json
4964
```
5065

@@ -56,19 +71,10 @@ Packer will do the following:
5671
__Notes__:
5772
* Packer deploys a new AMI to the AWS account specified by the AwsProfile
5873
* Subsequent builds may require the [-force](https://packer.io/docs/commands/build.html#force) flag
74+
* Test AMIs can be built automatically by pushing directly to a branch beginning with `test/`
5975

60-
### Image Accessability
61-
This project is setup to build publicly accessible images. To change it to
62-
build private images please refer to the [packer documentation](https://packer.io/docs/builders/amazon-ebs.html)
63-
for `ami_users` and `snapshot_users`options.
64-
65-
### Testing
66-
As a pre-deployment step we syntatically validate our packer json
67-
files with [pre-commit](https://pre-commit.com).
68-
69-
Please install pre-commit, once installed the file validations will
70-
automatically run on every commit. Alternatively you can manually
71-
execute the validations by running `pre-commit run --all-files`.
76+
The process for testing the integration of an AMI with cloudformation init scripts
77+
is outlined in the [`organizations-infra` docs for service catalog](https://github.com/Sage-Bionetworks-IT/organizations-infra/blob/master/sceptre/scipool/README.md)
7278

7379
### CI Workflow
7480
The workflow to provision AWS AMI is done using pull requests.

0 commit comments

Comments
 (0)