# Lars Wirzenius. # # Feel free to use this as you wish. It is simple enough that it is # probably not even copyrightable. pipelines: # Build a Debian systree. Save it as an artifact named in the # artifact_name parameter. The debian_codename parameter specifies # the Debian release to be used. The packages parameter names # addtional Debian packages to install into the systree. The systree # will get the following packages added unconditionally: python3, # jq, gnupg. - pipeline: ick/build_debian_systree parameters: - debian_codename - packages - artifact_name actions: - shell: | lsb_release -a dpkg -l debootstrap sudo chown root:root . ls -la where: host - debootstrap: auto mirror: http://deb.debian.org/debian where: host - shell: | apt-get install -y python3 jq gnupg where: chroot - python: | import os, subprocess def runcmd(argv, **kwargs): subprocess.check_call(argv, **kwargs) runcmd(['apt-get', 'install', '-y'] + params['packages']) where: chroot - archive: workspace where: host # Prepare container for building: use the artifact named in the # systree_name parameter. - pipeline: ick/setup_container parameters: - systree_name actions: - action: populate_systree name_from: systree_name where: host # Archive current systree as the artifact named in the artifact_name # parameter. - pipeline: ick/archive_systree parameters: - artifact_name actions: - archive: systree name_from: artifact_name where: host # In a Debian container, install packages listed in the packages # parameter. - pipeline: ick/install_debian_packages parameters: - packages actions: - python: | import os, subprocess def runcmd(argv, **kwargs): subprocess.check_call(argv, **kwargs) runcmd(['apt-get', 'install', '-y'] + params['packages']) where: container