add integrationtests to ci
This commit is contained in:
parent
4e876b202c
commit
21e5d84bbb
3 changed files with 20 additions and 2 deletions
|
@ -4,6 +4,7 @@ stages:
|
||||||
- security
|
- security
|
||||||
- upload
|
- upload
|
||||||
- image
|
- image
|
||||||
|
- integrationtest
|
||||||
|
|
||||||
services:
|
services:
|
||||||
- docker:19.03.12-dind
|
- docker:19.03.12-dind
|
||||||
|
@ -138,4 +139,21 @@ backup-image-test-publish:
|
||||||
rules:
|
rules:
|
||||||
- if: '$CI_COMMIT_TAG != null'
|
- if: '$CI_COMMIT_TAG != null'
|
||||||
script:
|
script:
|
||||||
- cd infrastructure/docker-backup && pyb image test publish
|
- cd infrastructure/docker-backup && pyb image test publish
|
||||||
|
|
||||||
|
nextcloud-integrationtest:
|
||||||
|
stage: integrationtest
|
||||||
|
image: docker:latest
|
||||||
|
services:
|
||||||
|
- docker:dind
|
||||||
|
dependencies:
|
||||||
|
- package
|
||||||
|
before_script:
|
||||||
|
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
|
||||||
|
script:
|
||||||
|
- echo "---------- Integration test -------------"
|
||||||
|
# - docker build --pull -t "$CI_REGISTRY_IMAGE" .
|
||||||
|
# - docker run --privileged -dit --name provs_test -v /var/run/docker.sock:/var/run/docker.sock $CI_REGISTRY_IMAGE
|
||||||
|
# - docker inspect -f '{{.State.Running}}' provs_test
|
||||||
|
- ./src/test/resources/local-integration-test/setup-docker.sh
|
||||||
|
|
0
src/test/resources/local-integration-test/setup-docker.sh
Normal file → Executable file
0
src/test/resources/local-integration-test/setup-docker.sh
Normal file → Executable file
|
@ -39,7 +39,7 @@ function main()
|
||||||
echo
|
echo
|
||||||
|
|
||||||
POD=$(kubectl get pod -l app=backup-restore -o name)
|
POD=$(kubectl get pod -l app=backup-restore -o name)
|
||||||
kubectl wait $POD --for=condition=Ready --timeout=120s
|
kubectl wait $POD --for=condition=Ready --timeout=240s
|
||||||
kubectl exec -t $POD -- bash -c "echo \"$ENDPOINT k3stesthost cloudhost\" >> /etc/hosts"
|
kubectl exec -t $POD -- bash -c "echo \"$ENDPOINT k3stesthost cloudhost\" >> /etc/hosts"
|
||||||
kubectl exec -t $POD -- /usr/local/bin/init.sh
|
kubectl exec -t $POD -- /usr/local/bin/init.sh
|
||||||
kubectl exec -t $POD -- /usr/local/bin/backup.sh
|
kubectl exec -t $POD -- /usr/local/bin/backup.sh
|
||||||
|
|
Loading…
Reference in a new issue