Skip to content

Commit

Permalink
Pipeline test
Browse files Browse the repository at this point in the history
  • Loading branch information
ebosas committed Nov 6, 2021
1 parent a8f5dd7 commit 69af5f7
Show file tree
Hide file tree
Showing 3 changed files with 358 additions and 40 deletions.
2 changes: 1 addition & 1 deletion cmd/server/template/messages.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{define "content" -}}
<div class="container">
<h3 class="my-4 ps-2">!!Recent messages ({{.Data.Count}}/{{.Data.Total}})</h3>
<h3 class="my-4 ps-2">Recent messages ({{.Data.Count}}/{{.Data.Total}})</h3>
<table class="table">
<thead>
<tr>
Expand Down
58 changes: 19 additions & 39 deletions deployments/pipeline-services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ Resources:
Type: AWS::ECR::Repository
DeletionPolicy: Retain
UpdateReplacePolicy: Retain
CacheRepository:
Type: AWS::ECR::Repository
DeletionPolicy: Retain
UpdateReplacePolicy: Retain
DatabaseRepository:
Type: AWS::ECR::Repository
DeletionPolicy: Retain
UpdateReplacePolicy: Retain
# CacheRepository:
# Type: AWS::ECR::Repository
# DeletionPolicy: Retain
# UpdateReplacePolicy: Retain
# DatabaseRepository:
# Type: AWS::ECR::Repository
# DeletionPolicy: Retain
# UpdateReplacePolicy: Retain

# A role used to give CodeBuild permission to access code,
# build it, and upload the build results to ECR
Expand Down Expand Up @@ -64,8 +64,8 @@ Resources:
- s3:GetObjectVersion
- Resource:
- !Sub arn:aws:ecr:${AWS::Region}:${AWS::AccountId}:repository/${ServerRepository}
- !Sub arn:aws:ecr:${AWS::Region}:${AWS::AccountId}:repository/${CacheRepository}
- !Sub arn:aws:ecr:${AWS::Region}:${AWS::AccountId}:repository/${DatabaseRepository}
# - !Sub arn:aws:ecr:${AWS::Region}:${AWS::AccountId}:repository/${CacheRepository}
# - !Sub arn:aws:ecr:${AWS::Region}:${AWS::AccountId}:repository/${DatabaseRepository}
Effect: Allow
Action:
- ecr:GetDownloadUrlForLayer
Expand Down Expand Up @@ -176,15 +176,19 @@ Resources:
Type: GITHUB
Location: !Sub https://github.com/${GitHubUser}/${GitHubRepo}.git
BuildSpec: deployments/buildspec/service.yml
# SourceVersion: !Ref GitHubBranch
SourceVersion: !Ref GitHubBranch
Environment:
ComputeType: BUILD_GENERAL1_SMALL
Image: aws/codebuild/standard:5.0
Type: LINUX_CONTAINER
PrivilegedMode: true
EnvironmentVariables:
- Name: varName
Value: varValue
- Name: AWS_ACCOUNT_ID
Value: !Sub ${AWS::AccountId}
- Name: SERVICE
Value: server
- Name: REPO_URI
Value: !Sub ${ServerRepository.RepositoryUri}
Triggers:
Webhook: true
FilterGroups:
Expand All @@ -195,20 +199,11 @@ Resources:
Pattern: !Sub ^refs/heads/${GitHubBranch}$
ExcludeMatchedPattern: false
- Type: FILE_PATH
Pattern: ^cmd/server/.*
ExcludeMatchedPattern: false
- Type: FILE_PATH
Pattern: ^internal/.*
ExcludeMatchedPattern: false
- Type: FILE_PATH
Pattern: ^web/.*
ExcludeMatchedPattern: false
- Type: FILE_PATH
Pattern: ^server.Dockerfile$
Pattern: ^(cmd/server/|internal/|web/|server.Dockerfile)
ExcludeMatchedPattern: false
ServiceRole: !Ref CodeBuildServiceRole
TimeoutInMinutes: 10

# GitHub source credentials
SourceCreds:
Type: AWS::CodeBuild::SourceCredential
Expand Down Expand Up @@ -277,11 +272,6 @@ Resources:
# "name":"REPO_URI",
# "value":"${ServerRepository.RepositoryUri}",
# "type":"PLAINTEXT"
# },
# {
# "name":"GIT_COMMIT_ID",
# "value":"#{SourceVariables.CommitId}",
# "type":"PLAINTEXT"
# }
# ]
# InputArtifacts:
Expand Down Expand Up @@ -374,11 +364,6 @@ Resources:
# "name":"REPO_URI",
# "value":"${CacheRepository.RepositoryUri}",
# "type":"PLAINTEXT"
# },
# {
# "name":"GIT_COMMIT_ID",
# "value":"#{SourceVariables.CommitId}",
# "type":"PLAINTEXT"
# }
# ]
# InputArtifacts:
Expand Down Expand Up @@ -471,11 +456,6 @@ Resources:
# "name":"REPO_URI",
# "value":"${DatabaseRepository.RepositoryUri}",
# "type":"PLAINTEXT"
# },
# {
# "name":"GIT_COMMIT_ID",
# "value":"#{SourceVariables.CommitId}",
# "type":"PLAINTEXT"
# }
# ]
# InputArtifacts:
Expand Down
Loading

0 comments on commit 69af5f7

Please sign in to comment.