-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcodebuild.tf
64 lines (51 loc) · 1.25 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
54
55
56
57
58
59
60
61
62
63
64
resource "aws_codebuild_project" "self" {
name = var.name
build_timeout = "5"
service_role = aws_iam_role.codebuild.arn
artifacts {
type = "NO_ARTIFACTS"
}
cache {
type = "S3"
location = aws_s3_bucket.cache.bucket
}
environment {
compute_type = "BUILD_GENERAL1_SMALL"
image = "aws/codebuild/amazonlinux2-aarch64-standard:2.0"
type = "ARM_CONTAINER"
image_pull_credentials_type = "CODEBUILD"
}
concurrent_build_limit = 1
/*logs_config {
cloudwatch_logs {
group_name = "log-group"
stream_name = "log-stream"
}
}*/
badge_enabled = true
source {
type = "GITHUB"
location = "https://github.com/tabletcorry/web_hugo.git"
git_clone_depth = 1
report_build_status = true
git_submodules_config {
fetch_submodules = true
}
buildspec = file("${path.module}/buildspec.yml")
}
source_version = "main"
}
resource "aws_codebuild_webhook" "self" {
project_name = aws_codebuild_project.self.name
build_type = "BUILD"
filter_group {
filter {
type = "EVENT"
pattern = "PUSH"
}
filter {
type = "HEAD_REF"
pattern = "main"
}
}
}