Skip to content

Provision BTP Cluster #1

Provision BTP Cluster

Provision BTP Cluster #1

name: Provision BTP Cluster
on:
workflow_dispatch:
inputs:
btp_kyma_plan:
description: 'Service plan of the kyma environment'
required: true
type: string
btp_kyma_region:
description: 'Region where Kyma environment will be created'
required: true
type: string
jobs:
provision-btp:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: generate random cluster name
id: vars
run: echo "sha_short=$(uuidgen)" >> $GITHUB_OUTPUT
- uses: ./.github/actions/create-sap-btp-kyma
id: create-btp-resources
with:
btp_kyma_plan: '${{ inputs.btp_kyma_plan }}'
btp_kyma_region: '${{ inputs.btp_kyma_region }}'
btp_kyma_autoscaler_min: 4
btp_global_account: '${{ secrets.BTP_GLOBAL_ACCOUNT }}'
btp_subaccount_name: gha-${{ steps.vars.outputs.sha_short }}-${{ github.run_attempt }}
btp_subaccount_region: '${{ secrets.BTP_SUBACCOUNT_REGION }}'
btp_backend_url: '${{ secrets.BTP_BACKEND_URL}}'
btp_idp_tenant: '${{ secrets.BTP_CUSTOM_IAS_TENANT }}'
btp_user: '${{ secrets.BTP_BOT_USER}}'
btp_password: '${{ secrets.BTP_BOT_PASSWORD}}'
- name: deploy resources
shell: bash
run: |
kubectl apply -f ./.github/actions/create-sap-btp-kyma/mock-oauth2.yaml
kubectl apply -f ./.github/actions/create-sap-btp-kyma/deployments.yaml
kubectl apply -f ./.github/actions/create-sap-btp-kyma/jobs.yaml