forked from cloudquery/cloudquery
-
Notifications
You must be signed in to change notification settings - Fork 0
95 lines (92 loc) · 3.39 KB
/
dest_elasticsearch.yml
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
91
92
93
94
95
name: Destination Plugin Elasticsearch Workflow
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
pull_request:
paths:
- "plugins/destination/elasticsearch/**"
- ".github/workflows/dest_elasticsearch.yml"
push:
branches:
- main
paths:
- "plugins/destination/elasticsearch/**"
- ".github/workflows/dest_elasticsearch.yml"
jobs:
plugins-destination-elasticsearch:
timeout-minutes: 10
name: "plugins/destination/elasticsearch"
runs-on: large-ubuntu-monorepo
defaults:
run:
working-directory: ./plugins/destination/elasticsearch
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.9.0
ports:
- 9200:9200
options: >-
--health-cmd "curl -s -f http://localhost:9200/_cluster/health"
--health-interval 10s
--health-timeout 5s
--health-retries 10
env:
discovery.type: single-node
xpack.security.enabled: false
ES_JAVA_OPTS: -Xms512m -Xmx512m
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Set up Go 1.x
uses: actions/setup-go@v3
with:
go-version-file: plugins/destination/elasticsearch/go.mod
cache: true
cache-dependency-path: plugins/destination/elasticsearch/go.sum
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.52.2
working-directory: plugins/destination/elasticsearch
args: "--config ../../.golangci.yml"
skip-pkg-cache: true
skip-build-cache: true
- name: Build
run: go build .
- name: Test
run: make test
validate-release:
timeout-minutes: 30
runs-on: large-ubuntu-monorepo
steps:
- name: Checkout
if: startsWith(github.head_ref, 'release-please--branches--main--components') || github.event_name == 'push'
uses: actions/checkout@v3
- uses: actions/cache@v3
if: startsWith(github.head_ref, 'release-please--branches--main--components') || github.event_name == 'push'
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-1.20.5-release-cache-${{ hashFiles('plugins/destination/elasticsearch/go.sum') }}
restore-keys: |
${{ runner.os }}-go-1.20.5-release-cache-plugins-destination-elasticsearch
- name: Set up Go
if: startsWith(github.head_ref, 'release-please--branches--main--components') || github.event_name == 'push'
uses: actions/setup-go@v3
with:
go-version-file: plugins/destination/elasticsearch/go.mod
- name: Install GoReleaser
if: startsWith(github.head_ref, 'release-please--branches--main--components') || github.event_name == 'push'
uses: goreleaser/goreleaser-action@v3
with:
distribution: goreleaser-pro
version: latest
install-only: true
- name: Run GoReleaser Dry-Run
if: startsWith(github.head_ref, 'release-please--branches--main--components') || github.event_name == 'push'
run: goreleaser release --snapshot --rm-dist --skip-validate --skip-publish --skip-sign -f ./plugins/destination/elasticsearch/.goreleaser.yaml
env:
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}