blob: f8f44ef4f99a5f3409e3d1e51148a28406e9b3db (
plain)
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
|
language: generic
sudo: required
services:
- docker
env:
matrix:
- MOCK_CONFIG=fedora-29-x86_64
script:
- PKG=$(git log -1 --pretty=%s | sed 's/:.*//')
- if [[ ! -d ${PKG} ]]; then echo "Directory ${PKG} not found"; exit 1; fi
- if [[ ! -f ${PKG}/${PKG}.spec ]]; then echo "No spec file (${PKG}.spec found in directory ${PKG}"; exit 1; fi
- docker run --privileged -v "${PWD}:/travis:rw" -it fedora:latest /travis/review.sh "${PKG}" "${MOCK_CONFIG}"
- sudo chown -R travis:travis ${PWD}
after_success:
- git config --global user.name "Automatic Deployment (Travis CI)"
- git config --global user.email "builds@travis-ci.org"
- git fetch origin gh-pages && git checkout -b gh-pages FETCH_HEAD
- cd ${PKG}
- rm -f ${PKG}*.src.rpm
- git checkout ${TRAVIS_COMMIT} -- ./${PKG}.spec
- cp review-${PKG}/review.txt .
- cp review-${PKG}/results/${PKG}*.src.rpm .
- git add ${PKG}.spec ${PKG}*.src.rpm review.txt
- git diff HEAD -- ${PKG}.spec review.txt | cat
- if [[ ${encrypted_404fa93e7e35_key} && ${encrypted_404fa93e7e35_iv} && ${TRAVIS_BRANCH} == master ]]; then
git commit -m "Review output";
mkdir -p ~/.ssh;
chmod 700 ~/.ssh;
openssl aes-256-cbc -K $encrypted_404fa93e7e35_key -iv $encrypted_404fa93e7e35_iv -in ../deploy.enc -out ~/.ssh/id_rsa -d;
chmod 600 ~/.ssh/id_rsa;
git push git@github.com:${TRAVIS_REPO_SLUG} gh-pages:gh-pages;
echo "###################################################";
echo "Spec URL http://${TRAVIS_REPO_SLUG%/*}.github.io/${TRAVIS_REPO_SLUG#*/}/${PKG}/${PKG}.spec";
echo "SRPM URL http://${TRAVIS_REPO_SLUG%/*}.github.io/${TRAVIS_REPO_SLUG#*/}/${PKG}/$(echo ${PKG}*.src.rpm)";
echo "Review.txt http://${TRAVIS_REPO_SLUG%/*}.github.io/${TRAVIS_REPO_SLUG#*/}/${PKG}/review.txt";
echo "Build log https://travis-ci.org/${TRAVIS_REPO_SLUG}/builds/${TRAVIS_BUILD_ID}";
echo "Raw Build log https://s3.amazonaws.com/archive.travis-ci.org/jobs/$((${TRAVIS_BUILD_ID}+1))/log.txt";
echo "###################################################";
else
git status;
fi
|