...
 
Commits (5)
......@@ -9,11 +9,11 @@ stages:
- release
variables:
TEST_IMAGE: registry.gitlab.com/${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}:${CI_BUILD_REF_NAME}
RELEASE_IMAGE: registry.gitlab.com/${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}:latest
TEST_IMAGE: briar/reproducer:${CI_BUILD_REF_NAME}
RELEASE_IMAGE: briar/reproducer:latest
before_script:
- echo ${CI_BUILD_TOKEN} | docker login -u gitlab-ci-token --password-stdin registry.gitlab.com
- echo ${DOCKER_HUB_PASS} | docker login -u ${DOCKER_HUB_USER} --password-stdin
build:
stage: build
......@@ -29,7 +29,7 @@ test_success:
test_failure:
stage: test
script:
- ! docker run ${TEST_IMAGE} ./reproduce.py release-1.0.3
- if docker run ${TEST_IMAGE} ./reproduce.py release-1.0.3; then exit 1; else exit 0; fi
release:
stage: release
......
FROM debian:stretch
FROM debian:jessie-backports
ENV LANG=C.UTF-8
ENV DEBIAN_FRONTEND=noninteractive
......
......@@ -55,19 +55,10 @@ and continue once it is installed.
If you trust that our pre-built Docker image was build exactly from *its* source,
you can use it for faster verification.
If not, you can skip to the next section to build the image yourself.
Then you are just trusting the official `debian:stable` which is out of our control.
If not, you can read the next section to learn how to build the image yourself.
Then you are only trusting the official `debian:stable` which is out of our control.
To use our image without building it yourself,
you can just pull it from Gilab.com's docker registry:
docker pull registry.gitlab.com/grote/briar-reproducer:latest
Tag it with our canonical name:
docker tag registry.gitlab.com/grote/briar-reproducer:latest briar-reproducer:latest
Now you can skip the next section and move to *Run the verification*.
Otherwise, you can skip the next section and move directly to *Run the verification*.
### Building your own image
......@@ -77,13 +68,13 @@ Check out the source repository:
Build our Docker image:
docker build -t briar-reproducer briar-reproducer
docker build -t briar/reproducer briar-reproducer
### Run the verification
To verify a specific version of Briar, run
docker run briar-reproducer:latest ./reproduce.py [tag]
docker run briar/reproducer:latest ./reproduce.py [tag]
Where `[tag]` is the git tag (source code snapshot) that identifies the version
you want to test, for example `release-1.0.1`.
......
......@@ -9,7 +9,7 @@ apt-get install -y --no-install-recommends \
libmagic1
# Install latest diffoscope (version in Debian stable is outdated)
pip3 install diffoscope
pip3 install diffoscope==83
# Install latest apktool for verification debugging
wget --no-verbose https://bitbucket.org/iBotPeaches/apktool/downloads/apktool_2.3.3.jar -O /opt/apktool.jar
......@@ -18,4 +18,4 @@ cat >/usr/local/bin/apktool <<EOF
java -jar /opt/apktool.jar \$@
EOF
chmod +x /usr/local/bin/apktool
mkdir -p /root/.local/share/apktool/framework
\ No newline at end of file
mkdir -p /root/.local/share/apktool/framework
......@@ -4,6 +4,8 @@ set -x
apt-get install -y --no-install-recommends \
git \
default-jdk-headless \
unzip \
wget
apt-get install -y --no-install-recommends -t jessie-backports \
openjdk-8-jdk-headless
......@@ -25,12 +25,15 @@ def main():
subprocess.check_call(['wget', '--no-verbose', url, '-O', reference_apk])
# build the app
repo_call(["./gradlew", GRADLE_TASK])
repo_call(["./gradlew", "--no-daemon", GRADLE_TASK])
# check if both APKs match
apk = os.path.join(REPO_DIR, APK_PATH)
if subprocess.call(['./verify-apk.py', reference_apk, apk]) == 0:
print("Version '%s' was built reproducible! :)" % tag)
sys.exit(0)
else:
sys.exit(1)
def prepare_repo(tag):
......