diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 94e9339..4639c1c 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -16,7 +16,7 @@ jobs: strategy: fail-fast: false matrix: - keptn-version: [ "0.15.1", "0.16.0"] # https://github.com/keptn/keptn/releases + keptn-version: [ "0.15.1", "0.16.0", "0.17.0"] # https://github.com/keptn/keptn/releases env: GO_VERSION: 1.17 GO111MODULE: "on" @@ -68,19 +68,6 @@ jobs: done; echo "K3s ready!!!" - - name: Install Keptn - id: install_keptn - uses: keptn-sandbox/action-install-keptn@v1.0.0 - timeout-minutes: 10 - with: - KEPTN_VERSION: ${{ matrix.keptn-version }} - KEPTN_INSTALL_PARAMETERS: -v --endpoint-service-type=LoadBalancer - KUBECONFIG: ${{ env.KUBECONFIG }} - - - name: Test connection to keptn - run: | - curl -X GET "${{ steps.install_keptn.outputs.KEPTN_ENDPOINT }}/v1/metadata" -H "accept: application/json" -H "x-token: ${{ steps.install_keptn.outputs.KEPTN_API_TOKEN }}" - - name: Generate Gitea credentials id: gitea_credentials run: | @@ -130,19 +117,34 @@ jobs: --set gitea.admin.password=${GITEA_ADMIN_PASSWORD} \ --wait - - name: Use Provisioner Service in Keptn + - name: Install Keptn + id: install_keptn + uses: keptn-sandbox/action-install-keptn@v2.0.0 + timeout-minutes: 10 + with: + KEPTN_VERSION: ${{ matrix.keptn-version }} + HELM_VALUES: | + # Keptn 0.17 and newer + apiGatewayNginx: + type: LoadBalancer + features: + automaticProvisioning: + serviceURL: http://keptn-gitea-provisioner-service.default + # Keptn 0.16 compatibility + control-plane: + apiGatewayNginx: + type: LoadBalancer + features: + automaticProvisioningURL: http://keptn-gitea-provisioner-service.default + KUBECONFIG: ${{ env.KUBECONFIG }} + + - name: Test connection to keptn run: | - # get keptn helm chart - helm repo add keptn https://charts.keptn.sh - helm repo update - - # reconfigure Keptn installation (Todo: This should eventually be part of the keptn-sandbox/action-install-keptn action) - helm upgrade --install keptn keptn/keptn -n keptn --create-namespace --version=$KEPTN_VERSION --reuse-values \ - --set=control-plane.features.automaticProvisioningURL=http://keptn-gitea-provisioner-service.default + curl -X GET "${{ steps.install_keptn.outputs.KEPTN_API_URL }}/v1/metadata" -H "accept: application/json" -H "x-token: ${{ steps.install_keptn.outputs.KEPTN_API_TOKEN }}" - name: Run integration tests env: - KEPTN_ENDPOINT: ${{ steps.install_keptn.outputs.KEPTN_ENDPOINT }} + KEPTN_ENDPOINT: ${{ steps.install_keptn.outputs.KEPTN_API_URL }} KEPTN_API_TOKEN: ${{ steps.install_keptn.outputs.KEPTN_API_TOKEN }} GITEA_ADMIN_PASSWORD: ${{ steps.gitea_credentials.outputs.GITEA_ADMIN_PASSWORD }} GITEA_ENDPOINT: ${{ steps.gitea.outputs.GITEA_ENDPOINT }} diff --git a/README.md b/README.md index 2be24d2..ff57d5b 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@ This repository contains a reference implementation for a [Keptn extension which | Keptn Version* | [Keptn-Service-Template-Go Docker Image](https://hub.docker.com/r/keptn-sandbox/keptn-gitea-provisioner-service/tags) | |:--------------:|:---------------------------------------------------------------------------------------------------------------------:| | 0.15, 0.16 | keptn-sandbox/keptn-gitea-provisioner-service:0.1.0 | +| 0.17.0 | keptn-sandbox/keptn-gitea-provisioner-service:0.1.1 | \* This is the Keptn version we aim to be compatible with. Other versions should work too, but there is no guarantee. @@ -31,7 +32,6 @@ instance: --set gitea.admin.password=${GITEA_ADMIN_PASSWORD} \ --set gitea.endpoint=${GITEA_ENDPOINT} \ --wait - ``` *Note*: You can re-use existing credentials by omitting the set parameters of the helm installation; For a full list @@ -56,11 +56,16 @@ instance: --set gitea.config.server.ROOT_URL=http://gitea-http.${NAMESPACE}:3000/ ``` -* Keptn must be configured to use the keptn-gitea-provisioner-service to automatically provision git repositories: +* Keptn must be configured to use the keptn-gitea-provisioner-service to automatically provision git repositories. The flag is different for Keptn version 0.16 and version 0.17 and onwards: ```bash #!/bin/bash NAMESPACE=default + # Keptn 0.17 + helm upgrade -n keptn keptn keptn/keptn \ + --set "features.automaticProvisioning.serviceURL=http://keptn-gitea-provisioner-service.${NAMESPACE}" + + # Keptn 0.16 helm upgrade -n keptn keptn keptn/keptn \ --set "control-plane.features.automaticProvisioningURL=http://keptn-gitea-provisioner-service.${NAMESPACE}" ```