-
Notifications
You must be signed in to change notification settings - Fork 84
Expand file tree
/
Copy pathbefore_script.sh
More file actions
executable file
·54 lines (40 loc) · 1.6 KB
/
before_script.sh
File metadata and controls
executable file
·54 lines (40 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/usr/bin/env bash
# WARNING: DO NOT EDIT!
#
# This file was generated by plugin_template, and is managed by it. Please use
# './plugin-template --github pulp_python' to update this file.
#
# For more info visit https://github.com/pulp/plugin_template
# make sure this script runs at the repo root
cd "$(dirname "$(realpath -e "$0")")"/../../..
set -euv
source .github/workflows/scripts/utils.sh
export PRE_BEFORE_SCRIPT=$PWD/.github/workflows/scripts/pre_before_script.sh
export POST_BEFORE_SCRIPT=$PWD/.github/workflows/scripts/post_before_script.sh
if [[ -f $PRE_BEFORE_SCRIPT ]]; then
source $PRE_BEFORE_SCRIPT
fi
# Developers should be able to reproduce the containers with this config
echo "CI vars:"
tail -v -n +1 .ci/ansible/vars/main.yaml
# Developers often want to know the final pulp config
echo "PULP CONFIG:"
tail -v -n +1 .ci/ansible/settings/settings.* ~/.config/pulp_smash/settings.json
echo "Containerfile:"
tail -v -n +1 .ci/ansible/Containerfile
echo "Constraints Files:"
# The need not even exist.
tail -v -n +1 ../*/*constraints.txt || true
# Needed for some functional tests
cmd_prefix bash -c "echo '%wheel ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/nopasswd"
cmd_prefix bash -c "usermod -a -G wheel pulp"
if [[ "${REDIS_DISABLED:-false}" == true ]]; then
cmd_prefix bash -c "s6-rc -d change redis"
echo "The Redis service was disabled for $TEST"
fi
if [[ -f $POST_BEFORE_SCRIPT ]]; then
source $POST_BEFORE_SCRIPT
fi
# Lots of plugins try to use this path, and throw warnings if they cannot access it.
cmd_prefix mkdir /.pytest_cache
cmd_prefix chown pulp:pulp /.pytest_cache