This repository has been archived by the owner on Sep 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 42
68 lines (65 loc) · 2.36 KB
/
k8s-autodiscovery.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
name: k8s-autodiscovery
on:
pull_request: ~
schedule:
- cron: '0 18 * * *'
jobs:
# deploy-test-infra:
# runs-on: ubuntu-latest
k8s-autodiscovery:
# needs:
# - deploy-test-infra
runs-on: ubuntu-latest
strategy:
matrix:
include:
- name: "kubernetes autodiscover with elastic-agent"
tags: "elastic-agent"
platforms: [ "debian_10_amd64" ]
# - name: "kubernetes autodiscover with filebeat"
# tags: "filebeat"
# platforms: [ "debian_10_amd64" ]
# - name: "kubernetes autodiscover with heartbeat"
# tags: "heartbeat"
# platforms: [ "debian_10_amd64" ]
# - name: "kubernetes autodiscover with metricbeat"
# tags: "metricbeat"
# platforms: [ "debian_10_amd64" ]
env:
E2E_SSH_KEY: ${{ github.workspace }}/e2essh
E2E_SSH_KEY_PUB: ${{ github.workspace }}/e2essh.pub
SSH_KEY: ${{ github.workspace }}/e2essh # TODO: Refactor
ANSIBLE_CONFIG: ./.ci/ansible/ansible.cfg
ANSIBLE_HOST_KEY_CHECKING: False
STACK_INSTANCE_ID: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}_stack
STACK_VERSION: 8.9.0-473a43eb-SNAPSHOT
steps:
- uses: actions/checkout@v2
- id: get-go-version
name: Get Go verion
run: echo "version=$(cat .go-version)" >> "$GITHUB_OUTPUT"
- uses: actions/setup-go@v4
with:
go-version: ${{ steps.get-go-version.outputs.version }}
- run: echo '${{ toJSON(matrix) }}'
- uses: hashicorp/vault-action@v2.7.1
with:
url: ${{ secrets.VAULT_ADDR }}
roleId: ${{ secrets.VAULT_ROLE_ID }}
secretId: ${{ secrets.VAULT_SECRET_ID }}
method: approle
secrets: |
secret/observability-team/ci/elastic-observability-aws-account-auth access_key | AWS_ACCESS_KEY_ID ;
secret/observability-team/ci/elastic-observability-aws-account-auth secret_key | AWS_SECRET_ACCESS_KEY ;
- name: Create SSH Key
run: ssh-keygen -b 4096 -t rsa -f "${E2E_SSH_KEY}" -q -N ""
- name: debug
run: ls -la
- name: Deploy Stack
env:
SUITE: fleet
SSH_KEY: ${{ env.E2E_SSH_KEY }}
run: make -C .ci create-stack
- if: always()
name: Destroy Stack
run: make -C .ci destroy-stack