diff --git a/.github/workflows/policy-hub-chart-test.yaml b/.github/workflows/policy-hub-chart-test.yaml index 428683d..e439633 100644 --- a/.github/workflows/policy-hub-chart-test.yaml +++ b/.github/workflows/policy-hub-chart-test.yaml @@ -31,18 +31,19 @@ on: inputs: node_image: description: 'kindest/node image for k8s kind cluster' - # k8s version to support - default: 'kindest/node:v1.26.6' + # k8s version from 3.1 release as default + default: 'kindest/node:v1.27.3' required: false type: string upgrade_from: description: 'policyhub chart version to upgrade from' - # policyhub version from 23.09 release - default: '1.0.0' + # tbd + default: '0.1.0' required: false type: string jobs: + lint-test: runs-on: ubuntu-latest steps: @@ -52,17 +53,36 @@ jobs: fetch-depth: 0 - name: Kubernetes KinD Cluster - uses: container-tools/kind-action@v2 + uses: container-tools/kind-action@v1 + with: + # upgrade version, default (v0.17.0) uses node image v1.21.1 and doesn't work with more recent node image versions + version: v0.20.0 + # default value for event_name != workflow_dispatch + node_image: ${{ github.event.inputs.node_image || 'kindest/node:v1.27.3' }} + + - name: Build migration image + id: build-migration-image + uses: docker/build-push-action@v3 with: - version: v0.19.0 - node_image: ${{ github.event.inputs.node_image || 'kindest/node:v1.26.6' }} + context: . + file: docker/Dockerfile-policy-hub-migrations + push: true + tags: kind-registry:5000/policy-hub-migration:testing + - name: Build service image + id: build-service-image + uses: docker/build-push-action@v3 + with: + context: . + file: docker/Dockerfile-policy-hub-service + push: true + tags: kind-registry:5000/policy-hub-service:testing + - name: Set up Helm uses: azure/setup-helm@v3 with: - version: v3.10.3 + version: v3.9.3 - # Setup python as a prerequisite for chart linting - uses: actions/setup-python@v4 with: python-version: '3.9' @@ -79,23 +99,21 @@ jobs: echo "changed=true" >> $GITHUB_OUTPUT fi - # run chart linting - name: Run chart-testing (lint) - run: ct lint --charts charts/policyhub --config charts/chart-testing-config.yaml + run: ct lint --validate-maintainers=false --target-branch ${{ github.event.repository.default_branch }} - - name: Run helm install - run: | - helm repo add bitnami https://charts.bitnami.com/bitnami - helm repo add tractusx-dev https://eclipse-tractusx.github.io/charts/dev - helm install policyhub charts/policyhub --namespace install --create-namespace + - name: Run service chart-testing (install) + run: ct install --charts charts/policy-hub --helm-extra-set-args "--set=backend.policyhub.image=kind-registry:5000/policy-hub-service:testing --set=backend.policyhubmigrations.image=kind-registry:5000/policy-hub-migrations:testing" if: github.event_name != 'pull_request' || steps.list-changed.outputs.changed == 'true' - # Upgrade the released policyhub chart version with the locally available chart - - name: Run helm upgrade - run: | - helm repo add bitnami https://charts.bitnami.com/bitnami - helm repo add tractusx-dev https://eclipse-tractusx.github.io/charts/dev - helm install policyhub tractusx-dev/policyhub --version ${{ github.event.inputs.upgrade_from || '1.0.0' }} --namespace upgrade --create-namespace - helm dependency update charts/policyhub - helm upgrade policyhub charts/policyhub --namespace upgrade - if: github.event_name != 'pull_request' || steps.list-changed.outputs.changed == 'true' + # Upgrade the released chart version with the locally available chart + # default value for event_name != workflow_dispatch + # tbd update noch nicht möglich + # - name: Run helm upgrade + # run: | + # helm repo add bitnami https://charts.bitnami.com/bitnami + # helm repo add tractusx-dev https://eclipse-tractusx.github.io/charts/dev + # helm install policy-hub-service tractusx-dev/policy-hub-service --version ${{ github.event.inputs.upgrade_from || '1.0.0' }} + # helm dependency update charts/policy-hub-service + # helm upgrade policy-hub-service charts/policy-hub-service + # if: github.event_name != 'pull_request' || steps.list-changed.outputs.changed == 'true' \ No newline at end of file diff --git a/.github/workflows/policy-hub-migrations.yml b/.github/workflows/policy-hub-migrations.yml index 1fdfa5c..843f25e 100644 --- a/.github/workflows/policy-hub-migrations.yml +++ b/.github/workflows/policy-hub-migrations.yml @@ -90,5 +90,3 @@ jobs: password: ${{ secrets.DOCKER_HUB_TOKEN }} repository: ${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME }} readme-filepath: "./docker/notice-policy-hub-migrations.md" - - # build chart \ No newline at end of file diff --git a/charts/policyhub/Chart.yaml b/charts/policyhub/Chart.yaml index 9430c8c..6b0fcae 100644 --- a/charts/policyhub/Chart.yaml +++ b/charts/policyhub/Chart.yaml @@ -20,8 +20,8 @@ apiVersion: v2 name: policy-hub type: application -version: 1.0.0 -appVersion: 1.0.0 +version: 0.1.0 +appVersion: 0.1.0 description: Helm chart for Catena-X Policy Hub home: https://github.com/eclipse-tractusx/policy-hub dependencies: diff --git a/charts/policyhub/values.yaml b/charts/policyhub/values.yaml index 6217f79..8cc9f55 100644 --- a/charts/policyhub/values.yaml +++ b/charts/policyhub/values.yaml @@ -76,7 +76,7 @@ backend: path: "/ready" policyhub: name: "policy-hub-service" - image: "tractusx/policy-hub-service:29dbdeb9a8b3e809fdab2406140a226bc55de844" + image: "tractusx/policy-hub-service:0.1.0" # -- We recommend not to specify default resource limits and to leave this as a conscious choice for the user. # If you do want to specify resource limits, uncomment the following lines and adjust them as necessary. resources: @@ -92,7 +92,7 @@ backend: keycloakClientId: "ClXX-CX-Policy-Hub" policyhubmigrations: name: "policy-hub-migrations" - image: "tractusx/policy-hub-migrations:29dbdeb9a8b3e809fdab2406140a226bc55de844" + image: "tractusx/policy-hub-migrations:0.1.0" # -- We recommend not to specify default resource limits and to leave this as a conscious choice for the user. # If you do want to specify resource limits, uncomment the following lines and adjust them as necessary. resources: diff --git a/consortia/argocd-app-templates/appsetup-dev.yaml b/consortia/argocd-app-templates/appsetup-dev.yaml index 7301e8f..1098b1d 100644 --- a/consortia/argocd-app-templates/appsetup-dev.yaml +++ b/consortia/argocd-app-templates/appsetup-dev.yaml @@ -27,7 +27,7 @@ spec: server: 'https://kubernetes.default.svc' source: path: charts/policy-hub - repoURL: 'https://github.com/eclipse-tractusx/policy-hub-cd.git' + repoURL: 'https://github.com/eclipse-tractusx/policy-hub.git' targetRevision: dev plugin: env: diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 085dfae..6ed2087 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -19,7 +19,7 @@ - 1.0.0 + 0.1.0