forked from DataDog/datadog-api-client-go
-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (61 loc) · 2.21 KB
/
reusable-ci.yml
File metadata and controls
67 lines (61 loc) · 2.21 KB
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
name: Reusable Complete CI Workflow
on:
workflow_call:
inputs:
target-branch:
description: 'Branch to checkout and test (defaults to the calling branch)'
required: false
type: string
default: ''
tf-provider-pr:
description: 'terraform-provider-datadog PR URL to test against (if already known, e.g. passed from ci-cd.yml)'
required: false
type: string
default: ''
secrets:
PIPELINE_GITHUB_APP_ID:
required: false
PIPELINE_GITHUB_APP_PRIVATE_KEY:
required: false
# Integration test secrets
DD_API_KEY:
required: false
DD_CLIENT_API_KEY:
required: false
DD_CLIENT_APP_KEY:
required: false
SLEEP_AFTER_REQUEST:
required: false
jobs:
pre-commit:
uses: ./.github/workflows/reusable-pre-commit.yml
with:
target-branch: ${{ inputs.target-branch }}
enable-commit-changes: false # Don't auto-commit in external CI
secrets:
PIPELINE_GITHUB_APP_ID: ${{ secrets.PIPELINE_GITHUB_APP_ID }}
PIPELINE_GITHUB_APP_PRIVATE_KEY: ${{ secrets.PIPELINE_GITHUB_APP_PRIVATE_KEY }}
test:
uses: ./.github/workflows/reusable-go-test.yml
with:
target-branch: ${{ inputs.target-branch }}
tf-provider-pr: ${{ inputs.tf-provider-pr }}
secrets:
PIPELINE_GITHUB_APP_ID: ${{ secrets.PIPELINE_GITHUB_APP_ID }}
PIPELINE_GITHUB_APP_PRIVATE_KEY: ${{ secrets.PIPELINE_GITHUB_APP_PRIVATE_KEY }}
examples:
uses: ./.github/workflows/reusable-examples.yml
with:
target-branch: ${{ inputs.target-branch }}
integration:
uses: ./.github/workflows/reusable-integration-test.yml
with:
target-branch: ${{ inputs.target-branch }}
has-integration-label: ${{ contains(github.event.pull_request.labels.*.name, 'ci/integrations') }}
secrets:
PIPELINE_GITHUB_APP_ID: ${{ secrets.PIPELINE_GITHUB_APP_ID }}
PIPELINE_GITHUB_APP_PRIVATE_KEY: ${{ secrets.PIPELINE_GITHUB_APP_PRIVATE_KEY }}
DD_API_KEY: ${{ secrets.DD_API_KEY }}
DD_CLIENT_API_KEY: ${{ secrets.DD_CLIENT_API_KEY }}
DD_CLIENT_APP_KEY: ${{ secrets.DD_CLIENT_APP_KEY }}
SLEEP_AFTER_REQUEST: ${{ secrets.SLEEP_AFTER_REQUEST }}