mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Disable privileged mode on Shippable. (#17844)
This commit is contained in:
parent
60b322e3ca
commit
21857e8618
2 changed files with 11 additions and 5 deletions
|
@ -3,7 +3,7 @@
|
||||||
roles:
|
roles:
|
||||||
# In destructive because it creates and removes a user
|
# In destructive because it creates and removes a user
|
||||||
- { role: test_become, tags: test_become}
|
- { 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
|
# Current pip unconditionally uses md5. We can re-enable if pip switches
|
||||||
# to a different hash or allows us to not check md5
|
# to a different hash or allows us to not check md5
|
||||||
- { role: test_pip, tags: test_pip, when: ansible_fips != True }
|
- { 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_yum, tags: test_yum, when: ansible_python.version.major == '2' }
|
||||||
- { role: test_apt, tags: test_apt }
|
- { role: test_apt, tags: test_apt }
|
||||||
- { role: test_apt_repository, tags: [test_apt_repository, test_apt_key] }
|
- { 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_db, tags: test_mysql_db}
|
||||||
- { role: test_mysql_user, tags: test_mysql_user}
|
- { role: test_mysql_user, tags: test_mysql_user}
|
||||||
- { role: test_mysql_variables, tags: test_mysql_variables}
|
- { 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}"
|
host_shared_dir="/home/shippable/cache/build-${BUILD_NUMBER}"
|
||||||
controller_shared_dir="/home/shippable/cache/build-${BUILD_NUMBER}"
|
controller_shared_dir="/home/shippable/cache/build-${BUILD_NUMBER}"
|
||||||
share_source=1
|
share_source=1
|
||||||
|
test_privileged=false # temporarily disabled to troubleshoot performance issues
|
||||||
else
|
else
|
||||||
host_shared_dir="${source_root}"
|
host_shared_dir="${source_root}"
|
||||||
controller_shared_dir=""
|
controller_shared_dir=""
|
||||||
|
@ -101,16 +102,21 @@ container_id=$(docker run -d \
|
||||||
|
|
||||||
show_environment
|
show_environment
|
||||||
|
|
||||||
|
skip=
|
||||||
|
|
||||||
if [ "${test_python3}" ]; then
|
if [ "${test_python3}" ]; then
|
||||||
docker exec "${container_id}" ln -s /usr/bin/python3 /usr/bin/python
|
docker exec "${container_id}" ln -s /usr/bin/python3 /usr/bin/python
|
||||||
docker exec "${container_id}" ln -s /usr/bin/pip3 /usr/bin/pip
|
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")
|
skip+=",$(tr '\n' ',' < "${source_root}/test/utils/shippable/python3-test-tag-blacklist.txt")"
|
||||||
test_flags="--skip-tags ${skip_tags} ${test_flags}"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${test_privileged}" = 'false' ]; then
|
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
|
fi
|
||||||
|
|
||||||
if [ -z "${share_source}" ]; then
|
if [ -z "${share_source}" ]; then
|
||||||
|
|
Loading…
Reference in a new issue