Loading .gitlab/ci/test.gitlab-ci.yml +15 −27 Original line number Diff line number Diff line .test-job: &test-job stage: test image: "$BUILD_IMAGE_NAME" parallel: matrix: - K3S_VERSION: - v0.8.1 # kube 1.14.6, see https://github.com/rancher/k3s/releases/tag/v0.8.1 - v0.9.1 # kube 1.15.4, see https://github.com/rancher/k3s/releases/tag/v0.9.1 and https://github.com/rancher/k3s/releases/tag/v0.9.0 - v1.16.15-k3s1 - v1.17.13-k3s1 services: - name: registry.gitlab.com/gitlab-org/cluster-integration/test-utils/k3s-gitlab-ci/releases/v0.6.1 - name: registry.gitlab.com/gitlab-org/cluster-integration/test-utils/k3s-gitlab-ci/releases/${K3S_VERSION} alias: k3s command: ["server", "--cluster-secret", "some-secret"] before_script: - kubectl config set-cluster k3s --server https://k3s:6443 --insecure-skip-tls-verify - kubectl config set-credentials default --username=node --password=some-secret - kubectl config set-context k3s --cluster=k3s --user=default - kubectl config use-context k3s - curl k3s:8081?service=k3s > k3s.yaml - export KUBECONFIG=$(pwd)/k3s.yaml - kubectl version - kubectl apply -f https://raw.githubusercontent.com/rancher/local-path-provisioner/master/deploy/local-path-storage.yaml - kubectl cluster-info - | if [[ "$K3S_VERSION" < "v1" ]]; then kubectl apply -f https://raw.githubusercontent.com/rancher/local-path-provisioner/master/deploy/local-path-storage.yaml kubectl patch storageclass local-path -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}' fi - | function expected_error() { echo "Expected error but exited with $?, failing build!" Loading Loading @@ -314,25 +321,6 @@ test-show-warning-for-legacy-in-cluster-postgresql: - auto-deploy deploy| tee deploy.log || true - grep -q "Detected an existing PostgreSQL database" deploy.log || exit 1 test-deploy-k8s-1.16: extends: test-deploy services: - name: registry.gitlab.com/gitlab-org/cluster-integration/test-utils/k3s-gitlab-ci/releases/v1.16.7-k3s1 alias: k3s variables: AUTO_DEVOPS_POSTGRES_CHANNEL: 2 before_script: - curl k3s:8081?service=k3s > k3s.yaml - export KUBECONFIG=$(pwd)/k3s.yaml - kubectl version - kubectl cluster-info script: - auto-deploy download_chart - auto-deploy deploy - helm get all production - helm get values production --output json | grep "postgres://user:testing-password@production-postgresql:5432/production" - ./test/verify-deployment-database production postgresql test-deploy-canary: extends: test-deploy script: Loading Loading
.gitlab/ci/test.gitlab-ci.yml +15 −27 Original line number Diff line number Diff line .test-job: &test-job stage: test image: "$BUILD_IMAGE_NAME" parallel: matrix: - K3S_VERSION: - v0.8.1 # kube 1.14.6, see https://github.com/rancher/k3s/releases/tag/v0.8.1 - v0.9.1 # kube 1.15.4, see https://github.com/rancher/k3s/releases/tag/v0.9.1 and https://github.com/rancher/k3s/releases/tag/v0.9.0 - v1.16.15-k3s1 - v1.17.13-k3s1 services: - name: registry.gitlab.com/gitlab-org/cluster-integration/test-utils/k3s-gitlab-ci/releases/v0.6.1 - name: registry.gitlab.com/gitlab-org/cluster-integration/test-utils/k3s-gitlab-ci/releases/${K3S_VERSION} alias: k3s command: ["server", "--cluster-secret", "some-secret"] before_script: - kubectl config set-cluster k3s --server https://k3s:6443 --insecure-skip-tls-verify - kubectl config set-credentials default --username=node --password=some-secret - kubectl config set-context k3s --cluster=k3s --user=default - kubectl config use-context k3s - curl k3s:8081?service=k3s > k3s.yaml - export KUBECONFIG=$(pwd)/k3s.yaml - kubectl version - kubectl apply -f https://raw.githubusercontent.com/rancher/local-path-provisioner/master/deploy/local-path-storage.yaml - kubectl cluster-info - | if [[ "$K3S_VERSION" < "v1" ]]; then kubectl apply -f https://raw.githubusercontent.com/rancher/local-path-provisioner/master/deploy/local-path-storage.yaml kubectl patch storageclass local-path -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}' fi - | function expected_error() { echo "Expected error but exited with $?, failing build!" Loading Loading @@ -314,25 +321,6 @@ test-show-warning-for-legacy-in-cluster-postgresql: - auto-deploy deploy| tee deploy.log || true - grep -q "Detected an existing PostgreSQL database" deploy.log || exit 1 test-deploy-k8s-1.16: extends: test-deploy services: - name: registry.gitlab.com/gitlab-org/cluster-integration/test-utils/k3s-gitlab-ci/releases/v1.16.7-k3s1 alias: k3s variables: AUTO_DEVOPS_POSTGRES_CHANNEL: 2 before_script: - curl k3s:8081?service=k3s > k3s.yaml - export KUBECONFIG=$(pwd)/k3s.yaml - kubectl version - kubectl cluster-info script: - auto-deploy download_chart - auto-deploy deploy - helm get all production - helm get values production --output json | grep "postgres://user:testing-password@production-postgresql:5432/production" - ./test/verify-deployment-database production postgresql test-deploy-canary: extends: test-deploy script: Loading