Skip to content

Commit 6082d1c

Browse files
travis: remove non-k8s tests, reduce matrix for k8s (#3087)
1 parent a1558a0 commit 6082d1c

File tree

3 files changed

+70
-70
lines changed

3 files changed

+70
-70
lines changed

.travis.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,22 @@ env:
99
- HELM_VERSION=v3.3.2
1010
- CHANGE_MINIKUBE_NONE_USER=true
1111
matrix:
12-
- TEST=flake8
13-
- TEST=docker_integration_tests
14-
- BROKER=rabbitmq DATABASE=mysql
12+
# - TEST=flake8
13+
# - TEST=docker_integration_tests
14+
# - BROKER=rabbitmq DATABASE=mysql
1515
- BROKER=rabbitmq DATABASE=postgresql
1616
- BROKER=redis DATABASE=mysql
17-
- BROKER=redis DATABASE=postgresql
18-
- BROKER=rabbitmq DATABASE=postgresql REPLICATION=enabled
17+
# - BROKER=redis DATABASE=postgresql
18+
# - BROKER=rabbitmq DATABASE=postgresql REPLICATION=enabled
1919
- BROKER=rabbitmq DATABASE=postgresql EXTRAVAL=enabled
20-
- TEST=snyk
20+
# - TEST=snyk
2121
matrix:
22-
allow_failures:
23-
- env: TEST=snyk
24-
jobs:
25-
include:
26-
- stage: deploy
27-
env: TEST=deploy
22+
# allow_failures:
23+
# - env: TEST=snyk
24+
# jobs:
25+
# include:
26+
# - stage: deploy
27+
# env: TEST=deploy
2828
before_install: ['./travis/before-install.sh']
2929
before_script: ['./travis/before-script.sh']
3030
script: ['./travis/script.sh']

travis/before-install.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ sudo -H pip3 install -U setuptools pip
88
sudo pip3 --version
99

1010
# Install Snyk
11-
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
12-
sudo apt-get install nodejs
13-
sudo npm install -g snyk
11+
# curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
12+
# sudo apt-get install nodejs
13+
# sudo npm install -g snyk
1414

1515

1616
# Install Deployment

travis/script.sh

Lines changed: 55 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -211,61 +211,61 @@ if [ -z "${TEST}" ]; then
211211
exit ${return_value}
212212
else
213213
echo "Running test ${TEST}"
214-
case "${TEST}" in
215-
flake8)
216-
echo "${TRAVIS_BRANCH}"
217-
if [[ "${TRAVIS_BRANCH}" == "dev" ]]
218-
then
219-
echo "Running Flake8 tests on dev branch aka pull requests"
220-
# We need to checkout dev for flake8-diff to work properly
221-
git checkout dev
222-
sudo pip3 install pep8 flake8 flake8-diff
223-
flake8-diff
224-
else
225-
echo "Skipping because not on dev branch"
226-
fi
227-
;;
228-
docker_integration_tests)
229-
echo "Validating docker compose"
230-
# change user id withn Docker container to user id of travis user
231-
sed -i -e "s/USER\ 1001/USER\ `id -u`/g" ./Dockerfile.django
232-
cp ./dojo/settings/settings.dist.py ./dojo/settings/settings.py
233-
# incase of failure and you need to debug
234-
# change the 'release' mode to 'dev' mode in order to activate debug=True
235-
# make sure you remember to change back to 'release' before making a PR
236-
source ./docker/setEnv.sh release
237-
docker-compose build
214+
# case "${TEST}" in
215+
# flake8)
216+
# echo "${TRAVIS_BRANCH}"
217+
# if [[ "${TRAVIS_BRANCH}" == "dev" ]]
218+
# then
219+
# echo "Running Flake8 tests on dev branch aka pull requests"
220+
# # We need to checkout dev for flake8-diff to work properly
221+
# git checkout dev
222+
# sudo pip3 install pep8 flake8 flake8-diff
223+
# flake8-diff
224+
# else
225+
# echo "Skipping because not on dev branch"
226+
# fi
227+
# ;;
228+
# docker_integration_tests)
229+
# echo "Validating docker compose"
230+
# # change user id withn Docker container to user id of travis user
231+
# sed -i -e "s/USER\ 1001/USER\ `id -u`/g" ./Dockerfile.django
232+
# cp ./dojo/settings/settings.dist.py ./dojo/settings/settings.py
233+
# # incase of failure and you need to debug
234+
# # change the 'release' mode to 'dev' mode in order to activate debug=True
235+
# # make sure you remember to change back to 'release' before making a PR
236+
# source ./docker/setEnv.sh release
237+
# docker-compose build
238238

239-
docker-compose up -d
240-
echo "Waiting for services to start"
241-
# Wait for services to become available
242-
sleep 80
243-
echo "Testing DefectDojo Service"
244-
curl -s -o "/dev/null" http://localhost:8080 -m 120
245-
CR=$(curl -s -m 10 -I http://localhost:8080/login?next= | egrep "^HTTP" | cut -d' ' -f2)
246-
if [ "$CR" != 200 ]; then
247-
echo "ERROR: cannot display login screen; got HTTP code $CR"
248-
docker-compose logs --tail="all" uwsgi
249-
exit 1
250-
fi
251-
echo "Docker compose container status"
252-
docker-compose -f docker-compose.yml ps
239+
# docker-compose up -d
240+
# echo "Waiting for services to start"
241+
# # Wait for services to become available
242+
# sleep 80
243+
# echo "Testing DefectDojo Service"
244+
# curl -s -o "/dev/null" http://localhost:8080 -m 120
245+
# CR=$(curl -s -m 10 -I http://localhost:8080/login?next= | egrep "^HTTP" | cut -d' ' -f2)
246+
# if [ "$CR" != 200 ]; then
247+
# echo "ERROR: cannot display login screen; got HTTP code $CR"
248+
# docker-compose logs --tail="all" uwsgi
249+
# exit 1
250+
# fi
251+
# echo "Docker compose container status"
252+
# docker-compose -f docker-compose.yml ps
253253

254-
echo "run integration_test scripts"
255-
source ./travis/integration_test-script.sh
256-
;;
257-
snyk)
258-
echo "Snyk security testing on containers"
259-
build_containers
260-
snyk monitor --docker defectdojo/defectdojo-django:latest
261-
snyk monitor --docker defectdojo/defectdojo-nginx:latest
262-
;;
263-
deploy)
264-
echo "Deploy and container push"
265-
build_containers
266-
source ./travis/deploy.sh
267-
deploy_demo
268-
docker_hub
269-
;;
270-
esac
254+
# echo "run integration_test scripts"
255+
# source ./travis/integration_test-script.sh
256+
# ;;
257+
# snyk)
258+
# echo "Snyk security testing on containers"
259+
# build_containers
260+
# snyk monitor --docker defectdojo/defectdojo-django:latest
261+
# snyk monitor --docker defectdojo/defectdojo-nginx:latest
262+
# ;;
263+
# deploy)
264+
# echo "Deploy and container push"
265+
# build_containers
266+
# source ./travis/deploy.sh
267+
# deploy_demo
268+
# docker_hub
269+
# ;;
270+
# esac
271271
fi

0 commit comments

Comments
 (0)