forked from oracle/terraform-provider-oci
-
Notifications
You must be signed in to change notification settings - Fork 1
/
ocibuild.conf
90 lines (88 loc) · 2.76 KB
/
ocibuild.conf
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
runnerTag: 1.0.208
name: terraform-provider-oci
team: Terraform Provider OCI
phoneBookId: terraform
description: Terraform Provider OCI
majorversion: 0
minorversion: 1
shortversion: ${majorversion}.${minorversion}
snapshotVersion: ${shortversion}-SNAPSHOT
# BLD_NUMBER contains the build number of this build, which is automatically incremented for each successive build in each branch.
# BLD_BRANCH_SUFFIX is the branch name with a leading hyphen. For instance, if your branch name is foo, then the BLD_BRANCH_SUFFIX would be -foo.
# If your branch is master, the BLD_BRANCH_SUFFIX would be null.
version: ${shortversion}${?BLD_BRANCH_SUFFIX}.${BLD_NUMBER}
# A list of branch names, including special branch name 'pull-requests'. Determines which branches will trigger on
# commit to bitbucket.
triggerOnCommitBranches : ["master", "provider_preview", "pull-requests"]
# A list of branch names that should run all defined build steps including those which publish artifacts.
# If a branch is not included in the list, it will be a 'dry-run' build and skips any steps that push dependencies,
# runs scanners, or notifies other services, such as pipelines.
releaseBranches: ["master"]
## Build Service Slack Notification ##
sendNotificationBranches: ["master", "provider_preview"]
slackChannels: ["#oci_rmsdp_provider"]
# Compartment id which build service will use to do authorization to restrict UI access in build service
authCompartmentOcid: "ocid1.compartment.oc1..aaaaaaaayowcmwbljnoub4fyirytbmpbksw5k4qvdegy6syxnmcqmufhgy7a"
steps:
[
{
name: go_install
type: golang
environment: {
"GOFLAGS": "-mod=vendor",
"GO111MODULE": "on"
}
goCommands: [
{
command: "install"
}
]
artifacts: [
"**"
]
},
{
name: unit_test_with_code_coverage
type: golang
environment: {
"GOFLAGS": "-mod=vendor",
"GO111MODULE": "on"
}
goCommands: [
{
command: "test ./..."
args: "-run TestUnit -coverprofile cover.out"
},
{
command: "tool cover"
args: "-html=cover.out -o coverage.html"
},
{
command: "tool cover"
args: "-func cover.out -o coverage/coverage.txt"
}
]
testCoverageLocation : "coverage/coverage.txt"
artifacts: [
"**"
]
},
{
dependsOn: unit_test_with_code_coverage
name: code_coverage_enforcement
type: golang
runnerImage: "build-runner-golang-boring-ssl"
environment: {
"CHECK_COVERAGE": "true"
}
goCommands: [
{
command: "test coverage/coverage_test.go"
args: "-v -mod vendor"
}
]
artifacts: [
"**"
]
},
]