This repository has been archived by the owner on Oct 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
78 lines (74 loc) · 2.73 KB
/
test-kibana-docker-image-action.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
---
#
# Test the kibana-docker-image action if it produces the expected output and if the image can be pulled.
#
name: test-kibana-docker-image-action
on:
workflow_dispatch: ~
push:
branches:
- main
paths:
- ".github/actions/kibana-docker-image/**"
schedule:
- cron: '0 6 * * *'
permissions:
contents: read
jobs:
kibana-docker-image:
name: kibana-${{ matrix.serverless && 'serverless' || 'cloud' }}-docker-image
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- serverless: false
# Serverless is not something we built anymore as part of the obs automation
# but use the existing docker images generated by Kibana CI.
# See https://github.com/elastic/kibana/pull/181851
# - serverless: true
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be
with:
tool-cache: false
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
# This needs to be set to false.
# See https://github.com/jlumbroso/free-disk-space/issues/12
# TL;DR
# Otherwise, the workflow is cancelled with an 143 exit code.
swap-storage: false
- uses: actions/checkout@v4
- uses: elastic/apm-pipeline-library/.github/actions/docker-login@main
with:
registry: docker.elastic.co
secret: secret/observability-team/ci/docker-registry/prod
url: ${{ secrets.VAULT_ADDR }}
roleId: ${{ secrets.VAULT_ROLE_ID }}
secretId: ${{ secrets.VAULT_SECRET_ID }}
- uses: ./.github/actions/kibana-docker-image
id: kibana-docker-image
with:
serverless: ${{ matrix.serverless }}
- name: Verify
run: |
echo "${STACK_VERSION:?}"
echo "${GIT_COMMIT_SHA:?}"
echo "${DOCKER_IMAGE_REF:?}"
docker pull "${DOCKER_IMAGE_REF}"
env:
DOCKER_IMAGE_REF: ${{ steps.kibana-docker-image.outputs.kibana-docker-image }}
GIT_COMMIT_SHA: ${{ steps.kibana-docker-image.outputs.kibana-commit-sha }}
STACK_VERSION: ${{ steps.kibana-docker-image.outputs.kibana-stack-version }}
- if: failure()
uses: elastic/apm-pipeline-library/.github/actions/notify-build-status@main
with:
message: "<!subteam^S03HM5G8CH0>" # @robots-ci (https://api.slack.com/reference/surfaces/formatting#mentioning-groups)
vaultUrl: ${{ secrets.VAULT_ADDR }}
vaultRoleId: ${{ secrets.VAULT_ROLE_ID }}
vaultSecretId: ${{ secrets.VAULT_SECRET_ID }}
slackChannel: "#observablt-bots"