Skip to content

Commit

Permalink
Merge pull request #145 from eduolivares/tobiko-upgrade-tox
Browse files Browse the repository at this point in the history
[tobiko] install tox version 4.13
  • Loading branch information
openshift-merge-bot[bot] committed Mar 8, 2024
2 parents e89e7db + 749afca commit 359a3d8
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 11 deletions.
Expand Up @@ -35,12 +35,16 @@ git checkout ${TOBIKO_VERSION}

# obtain clouds.yaml, ssh private/public keys and tobiko.conf from external_files directory
if [ ! -z ${USE_EXTERNAL_FILES} ]; then
mkdir -p $TOBIKO_DIR/.config/openstack
cp $TOBIKO_DIR/external_files/clouds.yaml $TOBIKO_DIR/.config/openstack/
mkdir -p $TOBIKO_DIR/.ssh
sudo cp ${TOBIKO_KEYS_FOLDER}/${TOBIKO_PRIVATE_KEY_FILE}* $TOBIKO_DIR/.ssh/
sudo chown tobiko:tobiko $TOBIKO_DIR/.ssh/${TOBIKO_PRIVATE_KEY_FILE}*
cp $TOBIKO_DIR/external_files/tobiko.conf .
if [ -f $TOBIKO_DIR/external_files/clouds.yaml ]; then
mkdir -p $TOBIKO_DIR/.config/openstack
cp $TOBIKO_DIR/external_files/clouds.yaml $TOBIKO_DIR/.config/openstack/
fi
if [ -f ${TOBIKO_KEYS_FOLDER}/${TOBIKO_PRIVATE_KEY_FILE} ]; then
mkdir -p $TOBIKO_DIR/.ssh
sudo cp ${TOBIKO_KEYS_FOLDER}/${TOBIKO_PRIVATE_KEY_FILE}* $TOBIKO_DIR/.ssh/
sudo chown tobiko:tobiko $TOBIKO_DIR/.ssh/${TOBIKO_PRIVATE_KEY_FILE}*
fi
[ -f $TOBIKO_DIR/external_files/tobiko.conf ] && cp $TOBIKO_DIR/external_files/tobiko.conf .
fi

# install openshift client
Expand All @@ -53,9 +57,13 @@ RETURN_VALUE=$?
# copy logs to external_files
if [ ! -z ${USE_EXTERNAL_FILES} ]; then
echo "Copying logs file"
LOG_DIR=${TOX_REPORT_DIR:-/var/lib/tobiko/tobiko/.tox/py3/log}
LOG_DIR=${TOX_REPORT_DIR:-/var/lib/tobiko/tobiko/.tox/${TOBIKO_TESTENV}/log}
sudo cp -rf ${LOG_DIR} ${TOBIKO_DIR}/external_files/
sudo cp tobiko.conf ${TOBIKO_DIR}/external_files/
if [ -f tobiko.conf ]; then
sudo cp tobiko.conf ${TOBIKO_DIR}/external_files/
elif [ -f /etc/tobiko/tobiko.conf ]; then
sudo cp /etc/tobiko/tobiko.conf ${TOBIKO_DIR}/external_files/
fi
fi

exit ${RETURN_VALUE}
Expand Up @@ -4,13 +4,13 @@ tcib_envs:
tcib_actions:
- run: bash /usr/local/bin/uid_gid_manage {{ tcib_user }}
- run: dnf -y install {{ tcib_packages.common | join(' ') }} && dnf clean all && rm -rf /var/cache/dnf
- run: cp /usr/share/tcib/container-images/tcib/base/os/tobiko/tobiko_sudoers /etc/sudoers.d/tobiko_sudoers
- run: cp /usr/share/tcib/container-images/tcib/base/tobiko/tobiko_sudoers /etc/sudoers.d/tobiko_sudoers
- run: chmod 440 /etc/sudoers.d/tobiko_sudoers
- run: mkdir -p /var/lib/tempest/external_files
- run: chown -R tobiko.tobiko /var/lib/tobiko
- run: python3 -m pip install --upgrade pip
- run: python3 -m pip install 'tox>=3.8,<4.0'
- run: cp /usr/share/tcib/container-images/tcib/base/os/tobiko/run_tobiko.sh /var/lib/tobiko/run_tobiko.sh
- run: python3 -m pip install 'tox>=4.13'
- run: cp /usr/share/tcib/container-images/tcib/base/tobiko/run_tobiko.sh /var/lib/tobiko/run_tobiko.sh
- run: chmod +x /var/lib/tobiko/run_tobiko.sh

tcib_entrypoint: /var/lib/tobiko/run_tobiko.sh
Expand Down

0 comments on commit 359a3d8

Please sign in to comment.