diff --git a/.github/workflows/centralidp-chart-test.yaml b/.github/workflows/centralidp-chart-test.yaml index f8070bab..e6f89398 100644 --- a/.github/workflows/centralidp-chart-test.yaml +++ b/.github/workflows/centralidp-chart-test.yaml @@ -57,6 +57,14 @@ jobs: version: v0.19.0 node_image: ${{ github.event.inputs.node_image || 'kindest/node:v1.27.3' }} + - name: Build init container image + uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # v5.1.0 + with: + context: . + file: docker/Dockerfile.import + push: true + tags: kind-registry:5000/iam:testing + - name: Set up Helm uses: azure/setup-helm@b7246b12e77f7134dc2d460a3d5bad15bbe29390 # v4 with: @@ -85,7 +93,7 @@ jobs: # define charts to test with the --charts parameter - name: Run chart-testing (install) - run: ct install --charts charts/centralidp --config charts/chart-testing-config.yaml + run: helm install portal charts/centralidp -f charts/values-test-centralidp.yaml --namespace install --create-namespace --debug if: github.event_name != 'pull_request' || steps.list-changed.outputs.changed == 'true' # Upgrade the released centralidp chart version with the locally available chart diff --git a/.github/workflows/sharedidp-chart-test.yaml b/.github/workflows/sharedidp-chart-test.yaml index 85ccb552..b9a48eae 100644 --- a/.github/workflows/sharedidp-chart-test.yaml +++ b/.github/workflows/sharedidp-chart-test.yaml @@ -57,6 +57,14 @@ jobs: version: v0.19.0 node_image: ${{ github.event.inputs.node_image || 'kindest/node:v1.27.3' }} + - name: Build init container image + uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # v5.1.0 + with: + context: . + file: docker/Dockerfile.import + push: true + tags: kind-registry:5000/iam:testing + - name: Set up Helm uses: azure/setup-helm@b7246b12e77f7134dc2d460a3d5bad15bbe29390 # v4 with: @@ -85,7 +93,7 @@ jobs: # define charts to test with the --charts parameter - name: Run chart-testing (install) - run: ct install --charts charts/sharedidp --config charts/chart-testing-config.yaml + run: helm install portal charts/sharedidp -f charts/values-test-sharedidp.yaml --namespace install --create-namespace --debug if: github.event_name != 'pull_request' || steps.list-changed.outputs.changed == 'true' # Upgrade the released sharedidp chart version with the locally available chart diff --git a/charts/values-test-centralidp.yaml b/charts/values-test-centralidp.yaml new file mode 100644 index 00000000..ef3f22bd --- /dev/null +++ b/charts/values-test-centralidp.yaml @@ -0,0 +1,38 @@ +############################################################### +# Copyright (c) 2024 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License, Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0. +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# SPDX-License-Identifier: Apache-2.0 +############################################################### + +keycloak: + initContainers: + - name: import + image: kind-registry:5000/iam:testing + imagePullPolicy: IfNotPresent + command: + - sh + args: + - -c + - | + echo "Copying themes..." + cp -R /import/themes/catenax-central/* /themes + echo "Copying realms..." + cp -R /import/catenax-central/realms/* /realms + volumeMounts: + - name: themes + mountPath: "/themes" + - name: realms + mountPath: "/realms" diff --git a/charts/values-test-sharedidp.yaml b/charts/values-test-sharedidp.yaml new file mode 100644 index 00000000..c1fca5cc --- /dev/null +++ b/charts/values-test-sharedidp.yaml @@ -0,0 +1,42 @@ +############################################################### +# Copyright (c) 2024 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License, Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0. +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# SPDX-License-Identifier: Apache-2.0 +############################################################### + +keycloak: + initContainers: + - name: import + image: kind-registry:5000/iam:testing + imagePullPolicy: IfNotPresent + command: + - sh + args: + - -c + - | + echo "Copying themes-catenax-shared..." + cp -R /import/themes/catenax-shared/* /themes-catenax-shared + echo "Copying themes-catenax-shared-portal..." + cp -R /import/themes/catenax-shared-portal/* /themes-catenax-shared-portal + echo "Copying realms..." + cp -R /import/catenax-shared/realms/* /realms + volumeMounts: + - name: themes-catenax-shared + mountPath: "/themes-catenax-shared" + - name: themes-catenax-shared-portal + mountPath: "/themes-catenax-shared-portal" + - name: realms + mountPath: "/realms"