Created
December 30, 2018 17:03
-
-
Save deleugpn/b849f0ed218b85df94c522f6882ec671 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: 0.2 | |
phases: | |
pre_build: | |
commands: | |
- $(aws ecr get-login --region $AWS_REGION --no-include-email) | |
- TAG="$(echo $CODEBUILD_RESOLVED_SOURCE_VERSION | head -c 8)" | |
- BUILD_URL="${REPOSITORY_URL}:${TAG}" | |
build: | |
commands: | |
- 'echo "{\"Parameters\":{\"CommitHash\":\"$TAG\"}}" > build.hash.json' | |
- docker build --tag "$BUILD_URL-artisan" --target artisan . | |
- docker build --tag "$REPOSITORY_URL" --tag "$BUILD_URL" . | |
# Run phpunit here | |
- docker push "$BUILD_URL-artisan" | |
- docker push "$BUILD_URL" | |
artifacts: | |
files: | |
- build.hash.json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment