diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 6ff950ef78..21e25c8e63 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -109,6 +109,10 @@ on: description: 'Check the box to enable Wiz integration' type: boolean default: true + BYO_GIT: + description: 'BYO git. Use predefined external values repo with branch named after the cluster.domainSuffix' + type: boolean + default: false env: CACHE_REGISTRY: ghcr.io @@ -139,6 +143,18 @@ jobs: echo 'certificate: ${{ inputs.certificate }}' echo 'is_pre_installed: ${{ inputs.is_pre_installed }}' echo 'disableORCS: ${{ inputs.disableORCS }}' + echo 'BYO_GIT: ${{ inputs.BYO_GIT }}' + + - name: Validate BYO_GIT secrets + if: ${{ inputs.BYO_GIT }} + env: + BYO_GIT_PAT: ${{ secrets.BYO_GIT_PAT }} + BYO_GIT_URL: ${{ secrets.BYO_GIT_URL }} + run: | + if [[ -z "$BYO_GIT_PAT" ]] || [[ -z "$BYO_GIT_URL" ]]; then + echo "BYO_GIT is enabled but BYO_GIT_PAT or BYO_GIT_URL secrets are not set." + exit 1 + fi preprocess-linode-input: needs: preprocess-input @@ -308,6 +324,8 @@ jobs: EDGEDNS_HOST: ${{ secrets.EDGEDNS_HOST }} LKE_CP_ACL_IPV4: ${{ secrets.LKE_CP_ACL_IPV4 }} LKE_APL_FIREWALL_INBOUND_RULES: ${{ secrets.LKE_APL_FIREWALL_INBOUND_RULES }} + BYO_GIT_PAT: ${{ secrets.BYO_GIT_PAT }} + BYO_GIT_URL: ${{ secrets.BYO_GIT_URL }} run: | touch values.yaml adminPassword="$(head /dev/urandom | tr -dc 'A-Za-z0-9' | head -c 24)" @@ -348,6 +366,12 @@ jobs: fi fi + if [[ '${{ inputs.BYO_GIT }}' == 'true' ]]; then + install_args+=(--set otomi.git.repoUrl="$BYO_GIT_URL") + install_args+=(--set otomi.git.password="$BYO_GIT_PAT") + install_args+=(--set otomi.git.branch="$DOMAIN") + fi + if [[ -n '${{ env.LKE_APL_FIREWALL_INBOUND_RULES }}' ]]; then install_args+=(--set-json apps.linode-cfw._rawValues.firewall.inbound='${{ env.LKE_APL_FIREWALL_INBOUND_RULES }}') fi