-
Notifications
You must be signed in to change notification settings - Fork 0
/
codebuild.tf
53 lines (44 loc) · 1.19 KB
/
codebuild.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
### CodeBuild Project ###
# CodeBuild GitHub Webhook
resource "aws_codebuild_webhook" "github" {
project_name = aws_codebuild_project.cv_pipeline.name
filter_group {
filter {
type = "EVENT"
pattern = "PUSH,PULL_REQUEST_MERGED"
}
}
}
# CodeBuild Pipeline
resource "aws_codebuild_project" "cv_pipeline" {
name = "cv-pipeline"
description = "LaTeX CV build pipeline."
build_timeout = "10"
badge_enabled = true
service_role = aws_iam_role.cv_pipeline.arn
artifacts {
type = "S3"
location = aws_s3_bucket.cv_bucket.id
path = "/"
encryption_disabled = true
}
environment {
compute_type = "BUILD_GENERAL1_SMALL"
image = "aws/codebuild/standard:7.0"
type = "LINUX_CONTAINER"
image_pull_credentials_type = "CODEBUILD"
}
logs_config {
s3_logs {
status = "ENABLED"
location = "${aws_s3_bucket.cv_bucket.id}/logs/codebuild"
}
}
source {
type = "GITHUB"
location = var.cv_repo
git_clone_depth = 1
report_build_status = true
}
tags = local.tags_map
}