Bug 1401620 - Snap: Use Canonical partner config instead of a duplicated one r=rail
authorJohan Lorenzo <jlorenzo@mozilla.com>
Thu, 21 Sep 2017 14:53:10 +0200
changeset 382405 d2a032f9e2561bfd3baaac404a9eb4c124051266
parent 382404 56facbd1d507619532f85af1d6ac24bfab2c9842
child 382406 0916366739b8bec395ded258ec7e4fe0a9e54b81
push id32558
push userkwierso@gmail.com
push dateFri, 22 Sep 2017 21:29:46 +0000
treeherdermozilla-central@61e58a7d800b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrail
bugs1401620
milestone58.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1401620 - Snap: Use Canonical partner config instead of a duplicated one r=rail MozReview-Commit-ID: RuB9KC1l49
taskcluster/docker/firefox-snap/Dockerfile
taskcluster/docker/firefox-snap/distribution.ini
taskcluster/docker/firefox-snap/runme.sh
--- a/taskcluster/docker/firefox-snap/Dockerfile
+++ b/taskcluster/docker/firefox-snap/Dockerfile
@@ -1,3 +1,3 @@
 FROM ubuntu:16.04
 
-RUN apt-get update && apt-get install -qy snapcraft bzip2 curl && apt-get clean
+RUN apt-get update && apt-get install -qy snapcraft bzip2 curl git && apt-get clean
deleted file mode 100644
--- a/taskcluster/docker/firefox-snap/distribution.ini
+++ /dev/null
@@ -1,9 +0,0 @@
-[Global]
-id=mozilla-snap
-version=1.0
-about=Mozilla Firefox Snap
-
-[Preferences]
-app.update.enabled=false
-intl.locale.matchOS=true
-browser.shell.checkDefaultBrowser=false
--- a/taskcluster/docker/firefox-snap/runme.sh
+++ b/taskcluster/docker/firefox-snap/runme.sh
@@ -19,26 +19,31 @@ TARGET_FULL_PATH="$ARTIFACTS_DIR/$TARGET
 mkdir -p "$ARTIFACTS_DIR"
 rm -rf "${WORKSPACE}/source" && mkdir -p "${WORKSPACE}/source/opt" "${WORKSPACE}/source/usr/bin"
 
 CURL="curl --location --retry 10 --retry-delay 10"
 
 # Download and extract en-US linux64 binary
 $CURL -o "${WORKSPACE}/firefox.tar.bz2" \
     "${CANDIDATES_DIR}/${VERSION}-candidates/build${BUILD_NUMBER}/linux-x86_64/en-US/firefox-${VERSION}.tar.bz2"
+tar -C "${WORKSPACE}/source/opt" -xf "${WORKSPACE}/firefox.tar.bz2"
 
-tar -C "${WORKSPACE}/source/opt" -xf "${WORKSPACE}/firefox.tar.bz2"
-mkdir -p "${WORKSPACE}/source/opt/firefox/distribution/extensions"
-cp -v distribution.ini "${WORKSPACE}/source/opt/firefox/distribution/"
-cp -v firefox.desktop "${WORKSPACE}/source/opt/firefox/distribution/"
+# Get Ubuntu configuration
+PARTNER_CONFIG_DIR="$WORKSPACE/partner_config"
+git clone https://github.com/mozilla-partners/canonical.git "$PARTNER_CONFIG_DIR"
+
+DISTRIBUTION_DIR="$WORKSPACE/source/opt/firefox/distribution"
+mv "$PARTNER_CONFIG_DIR/desktop/ubuntu/distribution" "$DISTRIBUTION_DIR"
+cp -v "$SCRIPT_DIRECTORY/firefox.desktop" "$DISTRIBUTION_DIR"
 
 # Use release-specific list of locales to fetch L10N XPIs
 $CURL -o "${WORKSPACE}/l10n_changesets.txt" "${CANDIDATES_DIR}/${VERSION}-candidates/build${BUILD_NUMBER}/l10n_changesets.txt"
 cat "${WORKSPACE}/l10n_changesets.txt"
 
+mkdir -p "$DISTRIBUTION_DIR/extensions"
 for locale in $(grep -v ja-JP-mac "${WORKSPACE}/l10n_changesets.txt" | awk '{print $1}'); do
     $CURL -o "${WORKSPACE}/source/opt/firefox/distribution/extensions/langpack-${locale}@firefox.mozilla.org.xpi" \
         "$CANDIDATES_DIR/${VERSION}-candidates/build${BUILD_NUMBER}/linux-x86_64/xpi/${locale}.xpi"
 done
 
 # Symlink firefox binary to /usr/bin to make it available in PATH
 ln -s ../../opt/firefox/firefox "${WORKSPACE}/source/usr/bin"