Bug 1444898 - Snap: Use dedicated snap docker image instead of the Ubuntu one r=rail
authorJohan Lorenzo <jlorenzo@mozilla.com>
Mon, 12 Mar 2018 15:23:32 +0100
changeset 408995 02ee7a01cc0c21c5f72d131a8c6e6b4aafe312f7
parent 408994 41097954197f73820cc1f38dbe1b2f3d7d03ce2d
child 408996 d5f46438881b8110515c568a67b92697f029812f
push id33671
push usercsabou@mozilla.com
push dateTue, 20 Mar 2018 22:23:32 +0000
treeherdermozilla-central@e2e874ceae78 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrail
bugs1444898
milestone61.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 1444898 - Snap: Use dedicated snap docker image instead of the Ubuntu one r=rail MozReview-Commit-ID: 2wDKUHJI9tr
taskcluster/ci/docker-image/kind.yml
taskcluster/ci/release-snap/kind.yml
taskcluster/docker/firefox-snap/Dockerfile
taskcluster/docker/firefox-snap/runme.sh
--- a/taskcluster/ci/docker-image/kind.yml
+++ b/taskcluster/ci/docker-image/kind.yml
@@ -93,8 +93,10 @@ jobs:
   beet-mover:
     symbol: I(bm)
   update-verify:
     symbol: I(uv)
   diffoscope:
     symbol: I(diff)
   periodic-updates:
     symbol: I(file)
+  firefox-snap:
+    symbol: I(snap)
--- a/taskcluster/ci/release-snap/kind.yml
+++ b/taskcluster/ci/release-snap/kind.yml
@@ -26,27 +26,25 @@ job-defaults:
       platform: linux64/opt
       kind: build
       tier: 2
    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
    worker:
       implementation: docker-worker
       os: linux
       max-run-time: 7200
-      docker-image: mozillareleases/firefox-snapcraft@sha256:107cc7a89d45ce6df30f44fe0dfd0b375b3ab443b75e92efc77c4f7bc5da8717
+      docker-image: {in-tree: firefox-snap}
       artifacts:
          - name: public/build
            type: directory
            path: /home/worker/artifacts/
       command:
          - /bin/bash
          - -cx
          - >
-           apt-get update &&
-           apt-get dist-upgrade -y &&
            curl -o scripts.tar.bz2 {config_params[head_repository]}/archive/{config_params[head_rev]}.tar.bz2/taskcluster/docker/firefox-snap/ &&
            mkdir scripts &&
            tar xvfj scripts.tar.bz2 -C scripts --strip-components 4 &&
            cd scripts &&
            ./runme.sh
       env:
          VERSION: "{release_config[version]}"
          BUILD_NUMBER: "{release_config[build_number]}"
--- a/taskcluster/docker/firefox-snap/Dockerfile
+++ b/taskcluster/docker/firefox-snap/Dockerfile
@@ -1,3 +1,6 @@
-FROM ubuntu:16.04
+FROM snapcore/snapcraft:stable
 
-RUN apt-get update && apt-get install -qy snapcraft bzip2 curl git && apt-get clean
+RUN apt-get update && apt-get install -qy python3 bzip2 curl git && apt-get clean
+
+# Set a default command useful for debugging
+CMD ["/bin/bash", "--login"]
--- a/taskcluster/docker/firefox-snap/runme.sh
+++ b/taskcluster/docker/firefox-snap/runme.sh
@@ -53,16 +53,19 @@ for i in *.deb; do
     # shellcheck disable=SC2086
     dpkg-deb --fsys-tarfile $i | tar xv -C "$SOURCE_DEST" --wildcards "./usr/share/locale-langpack/*/LC_MESSAGES/gtk30.mo" || true
 done
 
 # Generate snapcraft manifest
 sed -e "s/@VERSION@/${VERSION}/g" -e "s/@BUILD_NUMBER@/${BUILD_NUMBER}/g" snapcraft.yaml.in > "${WORKSPACE}/snapcraft.yaml"
 cp -v "$SCRIPT_DIRECTORY/mimeapps.list" "$WORKSPACE"
 cd "${WORKSPACE}"
+
+# Make sure snapcraft knows we're building amd64, even though we may not be on this arch.
+export SNAP_ARCH='amd64'
 snapcraft
 
 mv -- *.snap "$TARGET_FULL_PATH"
 
 cd "$ARTIFACTS_DIR"
 
 # Generate checksums file
 size=$(stat --printf="%s" "$TARGET_FULL_PATH")