Skip to content

Commit

Permalink
Merge pull request #16 from BIBSYSDEV/develop
Browse files Browse the repository at this point in the history
New release with labels
  • Loading branch information
svenngjeto authored Apr 29, 2020
2 parents f3791e6 + a768333 commit aa0f33b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions buildspec_publish_to_sar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ phases:
- sam package --template-file .aws-sam/build/template.yaml --s3-bucket $S3_BUCKET --output-template-file sampackaged_raw.yaml
post_build:
commands:
# Setting a timestamp for the build in labels
- BUILD_TIMESTAMP=$(date -Iseconds)
# Getting latest version tag from git
- APPLICATION_VERSION=$(curl -s https://api.github.com/repos/BIBSYSDEV/$GIT_REPO/releases/latest | jq -r '.tag_name')
# Updating metadata.labels in template
Expand Down
2 changes: 1 addition & 1 deletion template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Metadata:
Author: Unit
SpdxLicenseId: MIT
LicenseUrl: LICENSE
Labels: ['${CODEBUILD_RESOLVED_SOURCE_VERSION}', '${GIT_REPO}']
Labels: ['git-repo:${GIT_REPO}', 'git-commit:${CODEBUILD_RESOLVED_SOURCE_VERSION}', 'build@${BUILD_TIMESTAMP}']

Globals:
Function:
Expand Down

0 comments on commit aa0f33b

Please sign in to comment.