Skip to content

buildspec completed for CI/CD. - #5

Open
benjamistan wants to merge 1 commit into
godmodefrom
feat/buildspec
Open

buildspec completed for CI/CD.#5
benjamistan wants to merge 1 commit into
godmodefrom
feat/buildspec

Conversation

@benjamistan

Copy link
Copy Markdown

This simple buildspec updates ECR (not Docker Hub) with any changes.

No artifact output.

@benjamistan benjamistan self-assigned this Feb 16, 2021
Adding buildspec.yml for AWS CodePipeline

@v-stickykeys v-stickykeys left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Just a few questions.

Comment thread buildspec.yml

env:
parameter-store:
AWS_ACCOUNT_ID: account_id

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this work? Is it coming from github secrets? If not that's an easy way to get this.

Comment thread buildspec.yml
- echo Build started on `date`
- echo Building the Docker image...
- docker build -t $REPOSITORY_URI:latest .
- docker tag $REPOSITORY_URI:latest $REPOSITORY_URI:$IMAGE_TAG

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we also include branch name as an additional tag?

Comment thread buildspec.yml
- docker push $REPOSITORY_URI:latest
- docker push $REPOSITORY_URI:$IMAGE_TAG
- echo Writing image definitions file...
- printf '[{"name":"godmode-ganache-cli","imageUri":"%s"}]' $REPOSITORY_URI:$IMAGE_TAG > imagedefinitions.json

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to write this to a json file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants