mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-22 07:15:49 +00:00
Commiting docker files
This commit is contained in:
parent
66d4831c2c
commit
4e69fd4920
3 changed files with 66 additions and 2 deletions
0
Dockerfile
Normal file
0
Dockerfile
Normal file
|
@ -9,11 +9,11 @@ phases:
|
|||
- echo Nothing to do in prebuild
|
||||
build:
|
||||
commands:
|
||||
- echo Build started on 'date'
|
||||
- echo Build started on `date`
|
||||
- mvn package
|
||||
post_build:
|
||||
commands:
|
||||
- echo Build completed on 'date'
|
||||
- echo Build completed on `date`
|
||||
artifacts:
|
||||
files:
|
||||
- target/spring-petclinic-2.2.0.BUILD-SNAPSHOT.jar
|
64
codebuild.yml
Normal file
64
codebuild.yml
Normal file
|
@ -0,0 +1,64 @@
|
|||
---
|
||||
AWSTemplateFormatVersion: 2010-09-09
|
||||
|
||||
|
||||
Parameters:
|
||||
GitHubUrl:
|
||||
Type: String
|
||||
LogGroup:
|
||||
Type: String
|
||||
LogStream:
|
||||
Type: String
|
||||
|
||||
Resources:
|
||||
CodeBuildProject:
|
||||
Type: AWS::CodeBuild::Project
|
||||
Properties:
|
||||
Artifacts:
|
||||
Type: NO_ARTIFACTS
|
||||
Source:
|
||||
Type: GITHUB
|
||||
Location: !Ref GitHubUrl
|
||||
Auth:
|
||||
Type: OAUTH
|
||||
Environment:
|
||||
ComputeType: BUILD_GENERAL1_SMALL
|
||||
Image: aws/codebuild/standard:latest
|
||||
Type: LINUX_CONTAINER
|
||||
LogsConfig:
|
||||
CloudWatchLogs:
|
||||
GroupName: !Ref LogGroup
|
||||
Status: ENABLED
|
||||
StreamName: !Ref LogStream
|
||||
Triggers:
|
||||
FilterGroups:
|
||||
- - Type: EVENT
|
||||
Pattern: PUSH
|
||||
Webhook: True
|
||||
Name: !Ref AWS::StackName
|
||||
ServiceRole: !Ref CodeBuildServiceRole
|
||||
|
||||
CodeBuildServiceRole:
|
||||
Type: AWS::IAM::Role
|
||||
Properties:
|
||||
Path: /
|
||||
AssumeRolePolicyDocument:
|
||||
Version: 2012-10-17
|
||||
Statement:
|
||||
- Effect: Allow
|
||||
Principal:
|
||||
Service: codebuild.amazonaws.com
|
||||
Action: sts:AssumeRole
|
||||
Policies:
|
||||
- PolicyName: root
|
||||
PolicyDocument:
|
||||
Version: 2012-10-17
|
||||
Statement:
|
||||
- Resource: "*"
|
||||
Effect: Allow
|
||||
Action:
|
||||
- logs:CreateLogGroup
|
||||
- logs:CreateLogStream
|
||||
- logs:PutLogEvents
|
||||
|
||||
|
Loading…
Reference in a new issue