mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
ci: integrate observability deployments with the oblt-test-env (#181041)
This commit is contained in:
parent
9e8a25c902
commit
3c71d69bf9
3 changed files with 36 additions and 4 deletions
|
@ -137,8 +137,41 @@ EOF
|
|||
buildkite-agent meta-data set pr_comment:early_comment_job_id "$BUILDKITE_JOB_ID"
|
||||
}
|
||||
|
||||
# This is the integration with the observability-test-environments
|
||||
create_github_issue_oblt_test_environments() {
|
||||
|
||||
echo "--- Create GitHub issue for deploying in the oblt test env"
|
||||
|
||||
GITHUB_ISSUE=$(mktemp --suffix ".md")
|
||||
cat <<EOF > "$GITHUB_ISSUE"
|
||||
### Kibana image
|
||||
|
||||
$KIBANA_IMAGE
|
||||
|
||||
### Kibana pull request
|
||||
|
||||
$BUILDKITE_PULL_REQUEST
|
||||
|
||||
### Further details
|
||||
|
||||
Caused by @$GITHUB_PR_TRIGGER_USER using the github label in https://github.com/elastic/kibana/pull/$BUILDKITE_PULL_REQUEST
|
||||
EOF
|
||||
|
||||
GH_TOKEN="$GITHUB_TOKEN" \
|
||||
gh issue create \
|
||||
--title "[Deploy Serverless Kibana] for user $GITHUB_PR_TRIGGER_USER with PR kibana@pr-$BUILDKITE_PULL_REQUEST" \
|
||||
--body-file "${GITHUB_ISSUE}" \
|
||||
--label 'deploy-custom-kibana-serverless' \
|
||||
--repo 'elastic/observability-test-environments' \
|
||||
--assignee "$GITHUB_PR_OWNER"
|
||||
}
|
||||
|
||||
is_pr_with_label "ci:project-deploy-elasticsearch" && deploy "elasticsearch"
|
||||
is_pr_with_label "ci:project-deploy-observability" && deploy "observability"
|
||||
if is_pr_with_label "ci:project-deploy-observability" ; then
|
||||
create_github_issue_oblt_test_environments
|
||||
echo "--- Deploy observability with Kibana CI"
|
||||
deploy "observability"
|
||||
fi
|
||||
is_pr_with_label "ci:project-deploy-security" && deploy "security"
|
||||
|
||||
exit 0;
|
||||
|
|
4
.github/workflows/deploy-my-kibana.yml
vendored
4
.github/workflows/deploy-my-kibana.yml
vendored
|
@ -20,7 +20,7 @@ permissions:
|
|||
|
||||
jobs:
|
||||
deploy-my-kibana:
|
||||
if: ${{ github.event.issue.pull_request && (github.event.comment.body == '/oblt-deploy' || github.event.comment.body == '/oblt-deploy-serverless') }}
|
||||
if: ${{ github.event.issue.pull_request && github.event.comment.body == '/oblt-deploy' }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: elastic/apm-pipeline-library/.github/actions/deploy-my-kibana@current
|
||||
|
@ -28,4 +28,4 @@ jobs:
|
|||
vaultUrl: ${{ secrets.OBLT_VAULT_ADDR }}
|
||||
vaultRoleId: ${{ secrets.OBLT_VAULT_ROLE_ID }}
|
||||
vaultSecretId: ${{ secrets.OBLT_VAULT_SECRET_ID }}
|
||||
serverless: ${{ github.event.comment.body == '/oblt-deploy-serverless' }}
|
||||
serverless: false
|
||||
|
|
1
.github/workflows/oblt-github-commands.yml
vendored
1
.github/workflows/oblt-github-commands.yml
vendored
|
@ -50,7 +50,6 @@ jobs:
|
|||
|
||||
Just comment with:
|
||||
- \`/oblt-deploy\` : Deploy a Kibana instance using the Observability test environments.
|
||||
- \`/oblt-deploy-serverless\` : Deploy a serverless Kibana instance using the Observability test environments.
|
||||
- \`run\` \`elasticsearch-ci/docs\` : Re-trigger the docs validation. (use unformatted text in the comment!)
|
||||
|
||||
</p>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue