2017-07-03 11:07:10 +00:00
|
|
|
image: registry.gitlab.com/fdroid/ci-images-server:latest
|
2016-02-29 14:57:49 +00:00
|
|
|
|
2015-09-12 01:16:14 +00:00
|
|
|
lint:
|
2018-11-14 12:37:51 +00:00
|
|
|
before_script:
|
|
|
|
- rm -rf fdroidserver
|
|
|
|
- mkdir fdroidserver
|
|
|
|
- curl --silent https://gitlab.com/fdroid/fdroidserver/repository/master/archive.tar.gz
|
|
|
|
| tar -xz --directory=fdroidserver --strip-components=1
|
|
|
|
- export PATH="$PWD/fdroidserver:$PATH"
|
|
|
|
- touch config.py
|
2015-07-29 23:41:37 +00:00
|
|
|
script:
|
2018-01-22 10:56:28 +00:00
|
|
|
# if this is a merge request fork, then only check relevant apps
|
|
|
|
- if [ "$CI_PROJECT_NAMESPACE" != "fdroid" ]; then
|
|
|
|
git fetch https://gitlab.com/fdroid/fdroiddata;
|
|
|
|
test -d build || mkdir build;
|
2018-03-12 12:32:39 +00:00
|
|
|
for f in `git diff --name-only --diff-filter=d FETCH_HEAD...HEAD`; do
|
2018-02-23 21:28:53 +00:00
|
|
|
appid=`echo $f | sed -n -e 's,^metadata/\([^/][^/]*\)\.txt,\1,p'
|
|
|
|
-e 's,^metadata/\([^/][^/]*\)\.yml,\1,p'`;
|
2018-01-22 10:56:28 +00:00
|
|
|
export CHANGED="$CHANGED $appid";
|
|
|
|
grep -q "^Repo *Type\W *git" $f && git -C build clone `sed -n "s,^Repo *:,,p" $f` $appid;
|
|
|
|
done;
|
2018-01-22 11:07:11 +00:00
|
|
|
./tools/audit-gradle.py $CHANGED;
|
2018-01-22 10:56:28 +00:00
|
|
|
fi
|
2017-01-26 13:28:00 +00:00
|
|
|
- export EXITVALUE=0
|
2018-01-22 10:56:28 +00:00
|
|
|
- fdroid lint -f $CHANGED || {
|
2017-01-26 13:28:00 +00:00
|
|
|
export EXITVALUE=1;
|
|
|
|
printf "\nThese files have lint issues:\n";
|
2018-01-22 10:56:28 +00:00
|
|
|
fdroid rewritemeta -l $CHANGED;
|
2017-01-26 13:28:00 +00:00
|
|
|
printf "\nThese are the formatting issues:\n";
|
2018-01-22 10:56:28 +00:00
|
|
|
fdroid rewritemeta $CHANGED;
|
2017-01-26 13:28:00 +00:00
|
|
|
git --no-pager diff --color=always;
|
|
|
|
}
|
2018-03-07 22:50:03 +00:00
|
|
|
- apt-get -qy update
|
|
|
|
- apt-get -qy install --no-install-recommends exiftool
|
2018-08-29 20:48:35 +00:00
|
|
|
- find metadata/ -name '*.jp*g' -o -name '*.png' | xargs exiftool -all=
|
2018-03-07 22:50:03 +00:00
|
|
|
- echo "these images have EXIF that must be stripped:"
|
|
|
|
- git --no-pager diff --stat
|
|
|
|
- git --no-pager diff --name-only --exit-code || export EXITVALUE=1
|
2018-08-29 12:42:57 +00:00
|
|
|
- ./tools/check-keyalias-collision.py || export EXITVALUE=1
|
2017-01-26 13:28:00 +00:00
|
|
|
- exit $EXITVALUE
|
2018-09-21 08:13:11 +00:00
|
|
|
|
|
|
|
pages:
|
|
|
|
image: ruby:2.3
|
|
|
|
stage: deploy
|
|
|
|
only:
|
|
|
|
- schedules
|
|
|
|
cache:
|
2018-11-15 17:05:30 +00:00
|
|
|
key: "$CI_JOB_NAME"
|
2018-09-21 08:13:11 +00:00
|
|
|
paths:
|
|
|
|
- vendor/ruby
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- public
|
|
|
|
script:
|
|
|
|
- rm -rf public
|
|
|
|
- gem install git_stats
|
|
|
|
- git_stats generate --silent --out-path=public
|
2018-11-14 12:37:51 +00:00
|
|
|
|
|
|
|
fdroid-buildserver:
|
|
|
|
tags:
|
|
|
|
- fdroid
|
|
|
|
- buildserver
|
2018-11-23 14:11:30 +00:00
|
|
|
only:
|
2018-12-17 15:31:16 +00:00
|
|
|
- branches@beuc/fdroiddata
|
2018-11-26 20:50:07 +00:00
|
|
|
- branches@Bubu/fdroiddata
|
2018-11-23 14:14:06 +00:00
|
|
|
- branches@eighthave/fdroiddata
|
|
|
|
- branches@fdroid/fdroiddata
|
|
|
|
- branches@grote/fdroiddata
|
|
|
|
- branches@izzysoft/fdroiddata
|
|
|
|
- branches@schildbach/fdroiddata
|
|
|
|
- branches@uniqx/fdroiddata
|
2018-11-14 12:37:51 +00:00
|
|
|
artifacts:
|
|
|
|
name: "${CI_PROJECT_PATH}_${CI_JOB_STAGE}_${CI_COMMIT_REF_NAME}_${CI_COMMIT_SHA}"
|
|
|
|
paths:
|
2018-11-14 18:34:42 +00:00
|
|
|
- json
|
|
|
|
- libscout-logs
|
2018-11-14 12:37:51 +00:00
|
|
|
- logs
|
2018-11-14 18:34:42 +00:00
|
|
|
- stats
|
2018-11-14 12:37:51 +00:00
|
|
|
- unsigned
|
|
|
|
expire_in: 1 week
|
|
|
|
when: always
|
2018-11-15 17:05:30 +00:00
|
|
|
cache:
|
|
|
|
key: "$CI_JOB_NAME"
|
|
|
|
paths:
|
|
|
|
- build
|
|
|
|
- unsigned
|
2018-11-14 12:37:51 +00:00
|
|
|
script:
|
|
|
|
- virsh -c qemu:///system destroy builder_default || true
|
|
|
|
- virsh -c qemu:///system undefine builder_default
|
|
|
|
--nvram --managed-save --remove-all-storage --snapshots-metadata || true
|
2018-12-05 14:17:31 +00:00
|
|
|
- git -C $HOME/fdroidserver reset --hard
|
|
|
|
- git -C $HOME/fdroidserver checkout -B master origin/master
|
2018-11-14 12:37:51 +00:00
|
|
|
- export PATH="$HOME/fdroidserver:$PATH"
|
2018-11-14 13:07:34 +00:00
|
|
|
- if [ "$CI_PROJECT_NAMESPACE" = "fdroid" ]; then
|
|
|
|
export head=HEAD^^^;
|
2018-11-14 19:07:29 +00:00
|
|
|
echo ORIG_HEAD `git diff --name-only --diff-filter=d ORIG_HEAD...HEAD
|
|
|
|
| sed -n -e 's,^metadata/\([^/][^/]*\)\.txt,\1,p' -e 's,^metadata/\([^/][^/]*\)\.yml,\1,p'`;
|
2018-11-14 13:07:34 +00:00
|
|
|
else
|
|
|
|
git fetch https://gitlab.com/fdroid/fdroiddata.git;
|
|
|
|
export head=FETCH_HEAD;
|
|
|
|
fi
|
|
|
|
- export appids=`git diff --name-only --diff-filter=d $head...HEAD
|
|
|
|
| sed -n -e 's,^metadata/\([^/][^/]*\)\.txt,\1,p' -e 's,^metadata/\([^/][^/]*\)\.yml,\1,p'`
|
|
|
|
- echo $appids | grep '\w' || exit 0
|
2018-11-14 19:07:29 +00:00
|
|
|
- fdroid build --verbose --server --stop --no-tarball --latest $appids
|
2018-11-14 18:34:42 +00:00
|
|
|
- find unsigned -maxdepth 0 -empty -exec exit 0 \;
|
|
|
|
- cd ~/libscout
|
|
|
|
- java -jar build/LibScout.jar -o match -a lib/android-23.jar -p profiles
|
|
|
|
-j $CI_PROJECT_DIR/json
|
|
|
|
-s $CI_PROJECT_DIR/stats
|
|
|
|
-d $CI_PROJECT_DIR/libscout-logs
|
|
|
|
$CI_PROJECT_DIR/unsigned
|
|
|
|
- for f in $CI_PROJECT_DIR/libscout-logs/*.log; do printf "\n\n$f\n"; cut -b43-160 $f; done
|
|
|
|
- for f in `find $CI_PROJECT_DIR/json -name \*.json`; do cat $f | python3 -m json.tool; done
|
2018-11-14 12:37:51 +00:00
|
|
|
after_script:
|
2018-11-14 13:07:34 +00:00
|
|
|
- test -d builder || exit 0
|
2018-11-14 12:37:51 +00:00
|
|
|
- cd builder
|
|
|
|
- vagrant destroy --force
|