Skip to content

Release icm:patch icm-replication:patch #157

Release icm:patch icm-replication:patch

Release icm:patch icm-replication:patch #157

name: "Integration test icm chart"
on:
pull_request:
paths:
- 'charts/icm/**'
branches:
- main
jobs:
lint-test-icm-integrationtest:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Base
uses: ./.github/template/base
- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --config ct_icm.yaml)
if [[ -n "$changed" ]]; then
echo "::set-output name=changed::true"
fi
- name: Create kind cluster
if: steps.list-changed.outputs.changed == 'true'
uses: helm/[email protected]
with:
config: kind.yaml
- name: Log into registry docker.io
if: steps.list-changed.outputs.changed == 'true'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Run chart-testing (install)
if: steps.list-changed.outputs.changed == 'true'
run: |
set -x
random_value=`tr -dc 'a-z0-9' < /dev/urandom | head -c10`
export NAMESPACE=ct-icm-$random_value
echo "NAMESPACE=$NAMESPACE" >> $GITHUB_ENV
kubectl create namespace icm-system
kubectl create namespace $NAMESPACE
kubectl create secret docker-registry dockerhub --namespace=icm-system --docker-username=${{ secrets.DOCKER_USERNAME }} --docker-password=${{ secrets.DOCKER_PASSWORD }} [email protected]
kubectl create secret docker-registry dockerhub --namespace=$NAMESPACE --docker-username=${{ secrets.DOCKER_USERNAME }} --docker-password=${{ secrets.DOCKER_PASSWORD }} [email protected]
sed -i 's/runAsNonRoot: true/runAsNonRoot: false/' charts/icm/values.yaml
sudo mkdir -p /data/icm/sites
sed -i 's/<local sites folder>/\/data\/icm\/sites/' charts/icm/values.yaml
sudo mkdir -p /data/icm/encryption
sed -i 's/<local encryption folder>/\/data\/icm\/encryption/' charts/icm/values.yaml
sudo mkdir -p /data/icm/mssql/data
sudo mkdir -p /data/icm/mssql/backup
sed -i 's/<local mssql data folder>/\/data\/icm\/mssql\/data/' charts/icm/values.yaml
sed -i 's/<local mssql backup folder>/\/data\/icm\/mssql\/backup/' charts/icm/values.yaml
sed -i '/^ mssql:/{n;s/.*/ enabled: true/}' charts/icm/values.yaml
ct install --namespace=$NAMESPACE --config ct_icm.yaml
- name: Debug failure
if: failure() && steps.list-changed.outputs.changed == 'true'
run: |
echo "=Describe nodes================================\n"
kubectl describe node -A
echo "=Describe pods================================\n"
kubectl describe pod -n $NAMESPACE
echo "=Describe services================================\n"
kubectl describe service -n $NAMESPACE
echo "=Logs icm-as-msql================================\n"
kubectl logs -n $NAMESPACE $(kubectl get pods -l app=icm-as-mssql -n $NAMESPACE -o jsonpath="{.items[0].metadata.name}")
echo "=Logs icm-as================================\n"
kubectl logs -n $NAMESPACE $(kubectl get pods -l app=icm-as -n $NAMESPACE -o jsonpath="{.items[0].metadata.name}")