This repository has been archived by the owner on Oct 28, 2024. It is now read-only.
test-kibana-docker-image-action #427
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
# | |
# 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" |