Disable privileged mode on Shippable. (#17844)

pull/17851/head
Matt Clay 8 years ago committed by GitHub
parent 60b322e3ca
commit 21857e8618

@ -3,7 +3,7 @@
roles:
# In destructive because it creates and removes a user
- { role: test_become, tags: test_become}
- { role: test_service, tags: test_service }
- { role: test_service, tags: [test_service, needs_privileged] }
# Current pip unconditionally uses md5. We can re-enable if pip switches
# to a different hash or allows us to not check md5
- { role: test_pip, tags: test_pip, when: ansible_fips != True }
@ -11,7 +11,7 @@
- { role: test_yum, tags: test_yum, when: ansible_python.version.major == '2' }
- { role: test_apt, tags: test_apt }
- { role: test_apt_repository, tags: [test_apt_repository, test_apt_key] }
- { role: test_postgresql, tags: [test_postgresql, test_postgresql_db, test_postgresql_privs, test_postgresql_user] }
- { role: test_postgresql, tags: [test_postgresql, test_postgresql_db, test_postgresql_privs, test_postgresql_user, needs_privileged] }
- { role: test_mysql_db, tags: test_mysql_db}
- { role: test_mysql_user, tags: test_mysql_user}
- { role: test_mysql_variables, tags: test_mysql_variables}

@ -31,6 +31,7 @@ if [ "${SHIPPABLE_BUILD_DIR:-}" ]; then
host_shared_dir="/home/shippable/cache/build-${BUILD_NUMBER}"
controller_shared_dir="/home/shippable/cache/build-${BUILD_NUMBER}"
share_source=1
test_privileged=false # temporarily disabled to troubleshoot performance issues
else
host_shared_dir="${source_root}"
controller_shared_dir=""
@ -101,16 +102,21 @@ container_id=$(docker run -d \
show_environment
skip=
if [ "${test_python3}" ]; then
docker exec "${container_id}" ln -s /usr/bin/python3 /usr/bin/python
docker exec "${container_id}" ln -s /usr/bin/pip3 /usr/bin/pip
skip_tags=$(tr '\n' ',' < "${source_root}/test/utils/shippable/python3-test-tag-blacklist.txt")
test_flags="--skip-tags ${skip_tags} ${test_flags}"
skip+=",$(tr '\n' ',' < "${source_root}/test/utils/shippable/python3-test-tag-blacklist.txt")"
fi
if [ "${test_privileged}" = 'false' ]; then
test_flags="--skip-tags needs_privileged ${test_flags}"
skip+=",needs_privileged"
fi
if [ "${skip}" ]; then
test_flags="--skip-tags ${skip} ${test_flags}"
fi
if [ -z "${share_source}" ]; then

Loading…
Cancel
Save