-
Notifications
You must be signed in to change notification settings - Fork 86
chore: Add validation to test release codebuild spec #326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 4 commits
4cc26d7
5021ea4
39fc2f4
bfeaf99
087ee20
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,21 +9,33 @@ env: | |
|
||
phases: | ||
install: | ||
commands: | ||
- pip install tox | ||
- pip install --upgrade pip | ||
runtime-versions: | ||
python: latest | ||
pre_build: | ||
commands: | ||
- git checkout $COMMIT_ID | ||
- FOUND_VERSION=$(sed -n 's/__version__ = "\(.*\)"/\1/p' src/aws_encryption_sdk/identifiers.py) | ||
- | | ||
if expr ${FOUND_VERSION} != ${VERSION}; then | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm assuming There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Correct, and good question. There is a spot for environment variables, but it looks like they do require you pass a value, and I didn't want to provide a default for the version. Worst case we could add comments, but let me look a bit more to see if there are other options. |
||
echo "identifiers.py version (${FOUND_VERSION}) does not match expected version (${VERSION}), stopping" | ||
exit 1; | ||
fi | ||
build: | ||
commands: | ||
- pip install tox | ||
- git checkout $BRANCH | ||
- tox -e park | ||
- tox -e release | ||
- git clone https://github.com/aws-samples/busy-engineers-document-bucket.git | ||
- cd busy-engineers-document-bucket/exercises/python/encryption-context-complete | ||
- sed -i "s/aws_encryption_sdk/aws_encryption_sdk==$VERSION/" requirements-dev.txt | ||
- tox -e test | ||
|
||
|
||
batch: | ||
fast-fail: false | ||
build-list: | ||
- identifier: prod_release | ||
fast-fail: true | ||
build-graph: | ||
- identifier: release_to_prod | ||
- identifier: validate_prod_release | ||
depend-on: | ||
- release_to_prod | ||
buildspec: codebuild/release/validate.yml | ||
env: | ||
variables: | ||
PIP_INDEX_URL: https://pypi.python.org/simple/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
version: 0.2 | ||
|
||
phases: | ||
install: | ||
commands: | ||
- pip install tox | ||
runtime-versions: | ||
python: latest | ||
pre_build: | ||
commands: | ||
- git clone https://github.com/aws-samples/busy-engineers-document-bucket.git | ||
- cd busy-engineers-document-bucket/exercises/python/encryption-context-complete | ||
- sed -i "s/aws_encryption_sdk/aws_encryption_sdk==$VERSION/" requirements-dev.txt | ||
build: | ||
commands: | ||
- tox -e test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the functional difference between
build
andpre_build
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be honest I haven't found a clear description of any functional differences. The docs provide some examples of what you could do in each one, but there doesn't seem to be anything concrete. My grouping here is fairly arbitrary, so I'm open to suggestions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fine, it looks like
pre_build/build/post_build
are really just to help organize the phases, and this seems to fit well.