further cleanup as merge preparation

This commit is contained in:
ansgarz 2021-12-15 13:19:26 +01:00
parent b3a5895897
commit 17364c3a79
3 changed files with 16 additions and 52 deletions

View file

@ -1,7 +1,7 @@
stages: stages:
- build_and_test - build_and_test
- package - package
#- security - security
- upload - upload
- image - image
- integrationtest - integrationtest
@ -96,17 +96,17 @@ package-uberjar:
paths: paths:
- target/uberjar - target/uberjar
#.sast: sast:
# <<: *only-master <<: *only-master
# variables: variables:
# SAST_EXCLUDED_ANALYZERS: SAST_EXCLUDED_ANALYZERS:
# bandit, brakeman, flawfinder, gosec, kubesec, phpcs-security-audit, bandit, brakeman, flawfinder, gosec, kubesec, phpcs-security-audit,
# pmd-apex, security-code-scan, sobelow, spotbugs pmd-apex, security-code-scan, sobelow, spotbugs
# stage: security stage: security
# before_script: before_script:
# - mkdir -p builds && cp -r target/ builds/ - mkdir -p builds && cp -r target/ builds/
#include: include:
# - template: Security/SAST.gitlab-ci.yml - template: Security/SAST.gitlab-ci.yml
upload-clj-prerelease: upload-clj-prerelease:
<<: *clj <<: *clj
@ -154,8 +154,6 @@ backup-image-test-publish:
nextcloud-integrationtest: nextcloud-integrationtest:
stage: integrationtest stage: integrationtest
rules:
- if: '$CI_COMMIT_BRANCH == "integration-test-w-o-db-backup"'
image: registry.gitlab.com/gitlab-org/cluster-integration/helm-install-image/releases/3.7.1-kube-1.20.11-alpine-3.14 image: registry.gitlab.com/gitlab-org/cluster-integration/helm-install-image/releases/3.7.1-kube-1.20.11-alpine-3.14
services: services:
- name: registry.gitlab.com/gitlab-org/cluster-integration/test-utils/k3s-gitlab-ci/releases/v1.22.2-k3s2 - name: registry.gitlab.com/gitlab-org/cluster-integration/test-utils/k3s-gitlab-ci/releases/v1.22.2-k3s2

View file

@ -15,7 +15,6 @@ function main() {
backup-roles 'oc_' backup-roles 'oc_'
backup-db-dump backup-db-dump
ls -l /var/backups/
backup-directory '/var/backups/' backup-directory '/var/backups/'
end-maintenance.sh end-maintenance.sh

View file

@ -10,20 +10,12 @@ name='inttst'
docker ps docker ps
#export timeout=30; while [ ! -f /var/lib/docker/volumes/k3s-server/_data/server/kubeconfig.yaml ]; do if [ "$timeout" == 0 ]; then echo "ERROR: Timeout while waiting for file."; docker ps -a; ls /var/lib/docker/volumes/k3s-server/_data/; break; fi; sleep 1; ((timeout--)); done
export timeout=30; while ! docker exec $name sh -c "test -f /var/lib/rancher/k3s/server/kubeconfig.yaml"; do if [ "$timeout" == 0 ]; then echo "ERROR: Timeout while waiting for file."; break; fi; sleep 1; ((timeout--)); done export timeout=30; while ! docker exec $name sh -c "test -f /var/lib/rancher/k3s/server/kubeconfig.yaml"; do if [ "$timeout" == 0 ]; then echo "ERROR: Timeout while waiting for file."; break; fi; sleep 1; ((timeout--)); done
#sleep 60
mkdir -p $HOME/.kube/ mkdir -p $HOME/.kube/
docker cp $name:/var/lib/rancher/k3s/server/kubeconfig.yaml $HOME/.kube/config docker cp $name:/var/lib/rancher/k3s/server/kubeconfig.yaml $HOME/.kube/config
#docker cp $name:/var/lib/rancher/k3s/server/kubeconfig.yaml /var/lib/docker/volumes/k3s-server/_data/server/
#ls /var/lib/docker/volumes/k3s-server/_data/server/
if [ "$timeout" == 0 ] if [ "$timeout" == 0 ]
then then
echo ------------------------------------------------------- echo -------------------------------------------------------
@ -31,19 +23,13 @@ then
echo ------------------------------------------------------- echo -------------------------------------------------------
docker ps -a docker ps -a
echo ------------------------------------------------------- echo -------------------------------------------------------
exit -1 exit 1
fi fi
echo "127.0.0.1 kubernetes" >> /etc/hosts echo "127.0.0.1 kubernetes" >> /etc/hosts
cat /etc/hosts
echo ----------------------------------
cat $HOME/.kube/config
#cp /var/lib/docker/volumes/k3s-server/_data/server/kubeconfig.yaml $HOME/.kube/config
apk add wget curl bash sudo openjdk8 apk add wget curl bash sudo openjdk8
wget -P /etc/apk/keys/ https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub wget -P /etc/apk/keys/ https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub
apk add --no-cache --repository=https://apkproxy.herokuapp.com/sgerrand/alpine-pkg-leiningen leiningen apk add --no-cache --repository=https://apkproxy.herokuapp.com/sgerrand/alpine-pkg-leiningen leiningen
@ -54,28 +40,9 @@ mv ./kubectl /usr/local/bin/kubectl
sleep 20 #allow some time to startup k3s sleep 20 #allow some time to startup k3s
docker ps -a docker ps -a
swapoff -a swapoff -a # can this be removed ?
kubectl config view
echo ========================================================
kubectl --kubeconfig "$HOME/.kube/config" config view
echo ========================================================
echo $KUBECONFIG
export KUBECONFIG=$HOME/.kube/config export KUBECONFIG=$HOME/.kube/config
kubectl config view
echo ========================================================
sudo netstat -tlpn
kubectl get pods
echo ========================================================
pwd pwd
#cd /c4k-nextcloud/src/test/resources/local-integration-test && ./setup-local-s3-on-k3d.sh
cd ./c4k-nextcloud/src/test/resources/local-integration-test && ./setup-local-s3-on-k3d.sh cd ./c4k-nextcloud/src/test/resources/local-integration-test && ./setup-local-s3-on-k3d.sh