Skip to content
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.

Migrate k8s autodiscovery pipeline #3

Migrate k8s autodiscovery pipeline

Migrate k8s autodiscovery pipeline #3

name: k8s-autodiscovery
on:
pull_request: ~
schedule:
- cron: '0 18 * * *'
env:
E2E_SSH_KEY: ./e2essh
E2E_SSH_KEY_PUB: ./e2essh.pub
jobs:
k8s-autodiscovery:
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:
SSH_KEY: ${{ env.E2E_SSH_KEY }}

Check failure on line 31 in .github/workflows/k8s-autodiscovery.yml

View workflow run for this annotation

GitHub Actions / k8s-autodiscovery

Invalid workflow file

The workflow is not valid. .github/workflows/k8s-autodiscovery.yml (Line: 31, Col: 16): Unrecognized named-value: 'env'. Located at position 1 within expression: env.E2E_SSH_KEY
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
steps:
- uses: actions/checkout@v2
- run: echo '${{ toJSON(matrix) }}'
- uses: hashicorp/[email protected]
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: 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