"Fossies" - the Fresh Open Source Software Archive

Member "snapcraft-3.8/spread.yaml" (9 Sep 2019, 10393 Bytes) of package /linux/misc/snapcraft-3.8.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Ansible YAML source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "spread.yaml": 3.7.2_vs_3.8.

    1 project: snapcraft
    2 
    3 environment:
    4   # Tell snapcraft to use the current host to build
    5   SNAPCRAFT_BUILD_ENVIRONMENT: "host"
    6 
    7   # This variable can be set to either "deb" or "snap". It defaults to "snap".
    8   SNAPCRAFT_PACKAGE_TYPE: "$(HOST: echo ${SNAPCRAFT_PACKAGE_TYPE:-snap})"
    9 
   10   # If SNAPCRAFT_PACKAGE_TYPE is "snap" and this variable is defined, spread
   11   # will install snapcraft from that channel. Otherwise, it'll look for a snap
   12   # in the source tree. If SNAPCRAFT_PACKAGE_TYPE is "deb" this variable does
   13   # nothing.
   14   SNAPCRAFT_CHANNEL: "$(HOST: echo ${SNAPCRAFT_CHANNEL})"
   15 
   16   # Show error tracebacks
   17   SNAPCRAFT_MANAGED_HOST: "yes"
   18 
   19   # Disable all Sentry error reporting
   20   SNAPCRAFT_ENABLE_ERROR_REPORTING: "no"
   21 
   22   # Ensure that we have the right debian configuration for legacy
   23   DEBIAN_FRONTEND: noninteractive
   24   DEBIAN_PRIORITY: critical
   25 
   26   TOOLS_DIR: /snapcraft/tests/spread/tools
   27 
   28 backends:
   29   lxd:
   30     systems:
   31       - ubuntu-16.04
   32       - ubuntu-18.04
   33   google:
   34     key: "$(HOST: echo $SPREAD_GOOGLE_KEY)"
   35     location: computeengine/us-east1-b
   36     systems:
   37       - ubuntu-16.04-64:
   38           workers: 12
   39           image: ubuntu-1604-64
   40       - ubuntu-18.04-64:
   41           workers: 18
   42           image: ubuntu-1804-64
   43   autopkgtest:
   44     type: adhoc
   45     allocate: |
   46       echo "Allocating ad-hoc $SPREAD_SYSTEM"
   47       if [ -z "${ADT_ARTIFACTS:-}" ]; then
   48         FATAL "adhoc only works inside autopkgtest"
   49         exit 1
   50       fi
   51       echo 'ubuntu ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/99-spread-users
   52       ADDRESS localhost:22
   53     discard: echo "Discarding ad-hoc $SPREAD_SYSTEM"
   54     systems:
   55       # No Trusty systems since the deb doesn't exist there
   56       # Xenial
   57       - ubuntu-16.04-amd64:
   58           username: ubuntu
   59           password: ubuntu
   60       - ubuntu-16.04-i386:
   61           username: ubuntu
   62           password: ubuntu
   63       - ubuntu-16.04-ppc64el:
   64           username: ubuntu
   65           password: ubuntu
   66       - ubuntu-16.04-armhf:
   67           username: ubuntu
   68           password: ubuntu
   69       - ubuntu-16.04-s390x:
   70           username: ubuntu
   71           password: ubuntu
   72       - ubuntu-16.04-arm64:
   73           username: ubuntu
   74           password: ubuntu
   75       # Bionic
   76       - ubuntu-18.04-amd64:
   77           username: ubuntu
   78           password: ubuntu
   79       - ubuntu-18.04-i386:
   80           username: ubuntu
   81           password: ubuntu
   82       - ubuntu-18.04-ppc64el:
   83           username: ubuntu
   84           password: ubuntu
   85       - ubuntu-18.04-armhf:
   86           username: ubuntu
   87           password: ubuntu
   88       - ubuntu-18.04-s390x:
   89           username: ubuntu
   90           password: ubuntu
   91       - ubuntu-18.04-arm64:
   92           username: ubuntu
   93           password: ubuntu
   94 
   95 exclude: [snaps-cache/]
   96 
   97 prepare: |
   98   # This unfortunately cannot be extracted into a standalone script since this
   99   # portion of of YAML runs before the source code has been fetched.
  100 
  101   # 'apt-get update' is hanging on security.ubuntu.com with IPv6. Prefer IPv4 over
  102   # IPv6
  103   cat <<EOF > gai.conf
  104   precedence  ::1/128       50
  105   precedence  ::/0          40
  106   precedence  2002::/16     30
  107   precedence ::/96          20
  108   precedence ::ffff:0:0/96 100
  109   EOF
  110   if ! mv gai.conf /etc/gai.conf; then
  111       echo "/etc/gai.conf is not writable, ubuntu-core system? apt-get update won't"
  112       echo "be affected in that case"
  113       rm -f gai.conf
  114   fi
  115 
  116   # Now run 'apt-get update', but don't show output unless it fails. The logs are
  117   # long enough as it is.
  118   tempfile="$(mktemp)"
  119   if ! apt-get update > "$tempfile" 2>&1; then
  120       cat "$tempfile"
  121       exit 1
  122   fi
  123 
  124   apt-get install -y snapd
  125 
  126   if [ "$SPREAD_SYSTEM" = "ubuntu-16.04-64" ] || [ "$SPREAD_SYSTEM" = "ubuntu-18.04-64" ]; then
  127       # Remove lxd and lxd-client deb packages as our implementation (pylxd) does not
  128       # nicely handle the snap and deb being installed at the same time.
  129       apt-get remove --purge --yes lxd lxd-client
  130       # Install and setup the lxd snap
  131       snap install lxd
  132       lxd waitready --timeout=30
  133       lxd init --auto
  134       # Add the ubuntu user to the lxd group.
  135       adduser ubuntu lxd
  136   fi
  137 
  138   if [ "$SNAPCRAFT_PACKAGE_TYPE" = "deb" ]; then
  139       apt-get install -y snapcraft
  140   elif [ "$SNAPCRAFT_PACKAGE_TYPE" = "snap" ]; then
  141       # If $SNAPCRAFT_CHANNEL is defined, install snapcraft from that channel.
  142       # Otherwise, look for it in /snapcraft/.
  143       if [ -z "$SNAPCRAFT_CHANNEL" ]; then
  144           if stat /snapcraft/*.snap 2>/dev/null; then
  145               snap install --classic --dangerous /snapcraft/*.snap
  146           else
  147               echo "Expected a snap to exist in /snapcraft/. If your intention"\
  148                    "was to install from the store, set \$SNAPCRAFT_CHANNEL."
  149               exit 1
  150           fi
  151       else
  152           snap install --classic snapcraft --channel="$SNAPCRAFT_CHANNEL"
  153       fi
  154   else
  155     echo "'$SNAPCRAFT_PACKAGE_TYPE' is not a supported snapcraft package type."\
  156          " Supported types are 'deb' and 'snap'."
  157     exit 1
  158   fi
  159 
  160 restore-each: |
  161   "$TOOLS_DIR"/restore.sh
  162 
  163 suites:
  164  # General, core suite
  165  tests/spread/general/:
  166    summary: tests of snapcraft core functionality
  167 
  168  # Use of multipass and lxd build providers
  169  tests/spread/build-providers/:
  170    summary: tests of snapcraft using build providers
  171    systems: [ubuntu-18.04-64]
  172    kill-timeout: 180m
  173    warn-timeout: 9m  # Keep less than 10 minutes so Travis can't timeout
  174    priority: 90  # Run this test relatively early since fetching images can take time
  175 
  176  # Plugin-specific suites
  177  tests/spread/plugins/ant/:
  178    summary: tests of snapcraft's Ant plugin
  179  tests/spread/plugins/ament/:
  180    summary: tests of snapcraft's Ament plugin when not using a base
  181    systems:
  182    - ubuntu-16.04-amd64
  183    - ubuntu-16.04-arm64
  184    - ubuntu-16.04-armhf
  185    - ubuntu-16.04
  186    - ubuntu-16.04-64
  187    kill-timeout: 360m
  188  tests/spread/plugins/autotools/:
  189    summary: tests of snapcraft's Autotools plugin
  190  tests/spread/plugins/catkin/:
  191    summary: tests of snapcraft's Catkin plugin
  192    systems:
  193    - ubuntu-16.04
  194    - ubuntu-16.04-64
  195    - ubuntu-16.04-amd64
  196    - ubuntu-16.04-arm64
  197    - ubuntu-16.04-armhf
  198    - ubuntu-18.04
  199    - ubuntu-18.04-64
  200    - ubuntu-18.04-amd64
  201    - ubuntu-18.04-arm64
  202    - ubuntu-18.04-armhf
  203    kill-timeout: 180m
  204  tests/spread/plugins/colcon/:
  205    summary: tests of snapcraft's Colcon plugin
  206    systems:
  207    - ubuntu-18.04
  208    - ubuntu-18.04-64
  209    - ubuntu-18.04-amd64
  210    - ubuntu-18.04-arm64
  211    - ubuntu-18.04-armhf
  212    kill-timeout: 180m
  213  tests/spread/plugins/conda/:
  214    summary: tests of snapcraft's Conda plugin
  215    systems:
  216    - ubuntu-18.04
  217    - ubuntu-18.04-64
  218    # Network errors on autopkgtest infra
  219    # - ubuntu-18.04-amd64
  220    - ubuntu-16.04
  221    - ubuntu-16.04-64
  222    # Network errors on autopkgtest infra
  223    # - ubuntu-16.04-amd64
  224  tests/spread/plugins/copy/:
  225    summary: tests of snapcraft's Copy plugin when not using a base
  226  tests/spread/plugins/cmake/:
  227    summary: tests of snapcraft's CMake plugin
  228  tests/spread/plugins/crystal/:
  229    summary: tests of snapcraft's Crystal plugin
  230    systems:
  231    - ubuntu-18.04
  232    - ubuntu-18.04-64
  233    - ubuntu-18.04-amd64
  234    - ubuntu-16.04
  235    - ubuntu-16.04-64
  236    - ubuntu-16.04-amd64
  237  tests/spread/plugins/dotnet/:
  238    summary: tests of snapcraft's Dotnet plugin
  239    # Keep this 16.04 as it is the only supported system for this plugin
  240    systems:
  241    - ubuntu-16.04
  242    - ubuntu-16.04-64
  243    - ubuntu-16.04-amd64
  244  tests/spread/plugins/go/:
  245    summary: tests of snapcraft's Go plugin
  246  tests/spread/plugins/godeps/:
  247    summary: tests of snapcraft's Godeps plugin
  248  tests/spread/plugins/gradle/:
  249    summary: tests of snapcraft's Gradle plugin
  250    priority: 50  # Run this test early so we're not waiting for it
  251    kill-timeout: 40m
  252    warn-timeout: 9m  # Keep less than 10 minutes so Travis can't timeout
  253  tests/spread/plugins/kbuild/:
  254    summary: tests of snapcraft's Kbuild plugin
  255  tests/spread/plugins/make/:
  256    summary: tests of snapcraft's Make plugin
  257  tests/spread/plugins/maven/:
  258    summary: tests of snapcraft's Maven plugin
  259  tests/spread/plugins/meson/:
  260    summary: tests of snapcraft's Meson plugin
  261  tests/spread/plugins/nodejs/:
  262    summary: tests of snapcraft's Nodejs plugin
  263  tests/spread/plugins/nil/:
  264    summary: tests of snapcraft's Nil plugin
  265  tests/spread/plugins/plainbox/:
  266    summary: tests of snapcraft's Plainbox plugin
  267    kill-timeout: 20m
  268    warn-timeout: 9m  # Keep less than 10 minutes so Travis can't timeout
  269  tests/spread/plugins/python/:
  270    summary: tests of snapcraft's Python plugin
  271  tests/spread/plugins/qmake/:
  272    summary: tests of snapcraft's qmake plugin
  273  tests/spread/plugins/ruby/:
  274    summary: tests of snapcraft's Ruby plugin
  275    kill-timeout: 180m
  276  tests/spread/plugins/rust/:
  277    summary: tests of snapcraft's Rust plugin
  278    systems:
  279    - ubuntu-18.04
  280    - ubuntu-18.04-64
  281    - ubuntu-18.04-amd64
  282    - ubuntu-18.04-i386
  283    - ubuntu-18.04-armhf
  284    - ubuntu-18.04-s390x
  285    - ubuntu-16.04
  286    - ubuntu-16.04-64
  287    - ubuntu-16.04-amd64
  288    - ubuntu-16.04-i386
  289    - ubuntu-16.04-armhf
  290    - ubuntu-16.04-s390x
  291  tests/spread/plugins/scons/:
  292    summary: tests of snapcraft's SCons plugin
  293  tests/spread/plugins/tar-content/:
  294    summary: tests of snapcraft's tar-content plugin when not using a base
  295  tests/spread/plugins/waf/:
  296    summary: tests of snapcraft's Waf plugin
  297 
  298 # Extensions tests
  299  tests/spread/extensions/:
  300    summary: tests of snapcraft's extensions
  301 
  302 # Legacy tests
  303  tests/spread/legacy/:
  304    summary: legacy snapcraft tests
  305 
  306 # Legacy pending migration away from python runners
  307  tests/spread/legacy_python/:
  308    summary: these tests are pending a migration away from python runners
  309    kill-timeout: 60m
  310    warn-timeout: 9m  # Keep less than 10 minutes so Travis can't timeout
  311    priority: 100  # Run this test early so we're not waiting for it
  312    systems:
  313      - ubuntu-16.04*
  314      - ubuntu-18.04*
  315    environment:
  316      # TODO: make generic
  317      PIP_COMMAND: "/root/.local/bin/pip"
  318    prepare: |
  319      apt-get update
  320      apt-get install --yes gcc g++ make python3-dev python3-pip python3-wheel libffi-dev libsodium-dev libapt-pkg-dev squashfs-tools xdelta3 bzr git mercurial subversion libxml2-dev libxslt-dev
  321      pip3 install --user --upgrade pip
  322      $PIP_COMMAND install --user -r /snapcraft/requirements.txt -r /snapcraft/requirements-devel.txt
  323      # Move the snapcraft modules out of the way
  324      mv /snapcraft/snapcraft /snapcraft.bak
  325    restore: |
  326      mv /snapcraft.bak /snapcraft/snapcraft
  327 
  328 path: /snapcraft/