Comment 4 for bug 1948597

Revision history for this message
Kenneth Loafman (kenneth-loafman) wrote :

Because snapcraft from deb is available on GitLab and should be kept up-to-date by Ubuntu.

I tried on 20.04 with the following GitLab job:

build_snap:
    stage: deploy
    when: manual
    image: ubuntu:20.04
    only: [master]
    script:
        - apt-get update
        - apt-get upgrade -y
        - apt-get install -y snapd snapcraft
        - snap install snapd classic
        - snap install snapcraft classic
        - VERSION=`./setup.py --version`
        - echo "make snap of ${VERSION}"
        - ./setup.py sdist --dist-dir=.
        - rm -rf build
        - mkdir -p build
        - tar xf duplicity-${VERSION}.tar.gz -C build
        - rm -f duplicity-${VERSION}.tar.gz
        - cd build/duplicity-${VERSION}
        - head -2 snap/snapcraft.yaml | tail -1
        - echo $SNAPCRAFT_LOGIN_FILE | base64 --decode --ignore-garbage > snaplogin
        - snapcraft login --with snaplogin
        - rm snaplogin
        - snapcraft snap
        - snapcraft push duplicity_*.snap --release edge

It gets to the 3rd step, successfully installs snapd and hangs on installing snapcraft. I need snapd and snapcraft so I can bootstrap snapd and snapcraft snaps from the store.