-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The Travis CI infrastructure now directly sets Gerrit labels instead of the TravisPy library being used. - This avoids dependency on 3rd party libraries. - Logs are posted directly as comments in case of failure - Removed python3 tests as it needs to be tested from F28+ Change-Id: Ie399f612655f3172c065ccd626a9dd41b588ee59
- Loading branch information
1 parent
3e0f7df
commit 910ee1d
Showing
12 changed files
with
245 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
## prepare additional build dependencies | ||
dnf builddep -y --spec ${BUILDDIR}/pki/specs/$1.spec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,32 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
BUILDLOG=/tmp/compose.log | ||
BUILDLOG=/tmp/compose_$1.log | ||
|
||
function compose { | ||
pushd ${BUILDDIR}/pki | ||
# run make with --quiet to reduce log verbosity. | ||
sudo -u ${BUILDUSER} MAKEFLAGS="-j2 --quiet" -- \ | ||
./scripts/compose_pki_core_packages rpms | ||
./scripts/$1 rpms | ||
popd | ||
} | ||
|
||
function upload { | ||
if test -f $BUILDLOG; then | ||
echo "Uploading build log to transfer" | ||
curl --upload-file $BUILDLOG https://transfer.sh/pkitravis.txt | ||
curl --upload-file $BUILDLOG https://transfer.sh/pkitravis_$1.txt | ||
# Add new line for readability of logs | ||
printf "\n\n=====================================\n\n" | ||
fi | ||
} | ||
|
||
if test "${TRAVIS}" != "true"; then | ||
compose | ||
else | ||
trap upload EXIT | ||
echo "Runing compose_pki_core_packages rpms." | ||
trap "upload $1" EXIT | ||
echo "Runing $1 rpms." | ||
echo "Build log will be posted to transfer.sh" | ||
echo $(date) > $BUILDLOG | ||
echo "Travis job ${TRAVIS_JOB_NUMBER}" >> $BUILDLOG | ||
compose >>$BUILDLOG 2>&1 | ||
fi | ||
|
||
compose $1>>$BUILDLOG 2>&1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,12 @@ | ||
#!/bin/bash | ||
set -e | ||
PACKAGES=`find ${BUILDDIR}/packages/RPMS/ -name '*.rpm' -and -not -name '*debuginfo*'` | ||
|
||
find ${BUILDDIR}/packages/RPMS/ -name '*.rpm' -and -not -name '*debuginfo*' \ | ||
| xargs dnf install -y --best --allowerasing | ||
# To list all packages that are available. Useful for debug purposes | ||
echo ${PACKAGES} | ||
|
||
dnf install -y --best --allowerasing ${PACKAGES} | ||
|
||
# Remove the RPMs once installed. They are not required anymore. This will ensure | ||
# that there is no issue generating next set of RPMs | ||
rm ${PACKAGES} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
# | ||
# Authors: | ||
# Dinesh Prasanth M K <dmoluguw@redhat.com> | ||
# | ||
# This program is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation; version 2 of the License. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License along | ||
# with this program; if not, write to the Free Software Foundation, Inc., | ||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
# | ||
# Copyright (C) 2018 Red Hat, Inc. | ||
# All rights reserved. | ||
# | ||
set -e | ||
if [[ -n "${GERRIT_URL}" ]] | ||
then | ||
git remote add bot git@github.com:${TRAVIS_REPO_SLUG}.git | ||
git push -d bot ${TRAVIS_BRANCH} | ||
else | ||
echo "Skip deleting branch" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
CONTAINER=pkitest | ||
SCRIPTDIR=/tmp/workdir/pki/.travis | ||
PKI_LOG=pki_log.log | ||
CI_RESULTS_LOG="ci_results_${TRAVIS_BRANCH}.log" | ||
CI_RUNNER_LOG_ARCHIVE="dogtag-ci-job-${TRAVIS_JOB_NUMBER}.tar.gz" | ||
PKI_IMAGE=${IMAGE_REPO:-dogtagpki/pki-ci}:f26_105 | ||
IPA_IMAGE=${IMAGE_REPO:-dogtagpki/pki-ci}:f26_ipa_4-5 | ||
RPMS_LOCATION=/tmp/workdir/packages/RPMS | ||
DOGTAG_PKI_RPMS=${TRAVIS_BUILD_DIR}/dogtag_rpms | ||
TRANSFER_SH_URLS=message.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#!/bin/bash | ||
# | ||
# Authors: | ||
# Dinesh Prasanth M K <dmoluguw@redhat.com> | ||
# | ||
# This program is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation; version 2 of the License. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License along | ||
# with this program; if not, write to the Free Software Foundation, Inc., | ||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
# | ||
# Copyright (C) 2018 Red Hat, Inc. | ||
# All rights reserved. | ||
# | ||
set -e | ||
|
||
pyenv global system 3.6 | ||
docker pull ${PKI_IMAGE} | ||
docker run \ | ||
--detach \ | ||
--name=${CONTAINER} \ | ||
--hostname='pki.test' \ | ||
--privileged \ | ||
--tmpfs /tmp \ | ||
--tmpfs /run \ | ||
-v /sys/fs/cgroup:/sys/fs/cgroup:ro \ | ||
-v $(pwd):/tmp/workdir/pki \ | ||
-e BUILDUSER_UID=$(id -u) \ | ||
-e BUILDUSER_GID=$(id -g) \ | ||
-e TRAVIS=${TRAVIS} \ | ||
-e TRAVIS_JOB_NUMBER=${TRAVIS_JOB_NUMBER} \ | ||
-i \ | ||
${PKI_IMAGE} | ||
|
||
|
||
docker exec -i ${CONTAINER} /bin/ls -la /tmp/workdir | ||
docker exec -i ${CONTAINER} ${SCRIPTDIR}/00-init | ||
docker exec -i ${CONTAINER} ${SCRIPTDIR}/01-install-dependencies pki-core | ||
docker exec -i ${CONTAINER} ${SCRIPTDIR}/10-compose-rpms compose_pki_core_packages | ||
|
||
# IPA related installs | ||
pip install --upgrade pip | ||
pip3 install --upgrade pip | ||
pip install pep8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.