diff --git a/.gitignore b/.gitignore index da0d143..545b0c9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ -rootfs.tar -rootfs.tar.gz -rootfs.torrent ansible/**/*.retry +build +bin diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c51e285..4cd0491 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -28,13 +28,15 @@ packer: services: - docker:dind before_script: - - apk add --no-cache ansible openssh-client + - apk add --no-cache ansible openssh-client squashfs-tools script: - bin/packer build packer.json - - gzip -k -f rootfs.tar + - mkdir build/rootfs + - tar xf build/rootfs.tar -C build/rootfs + - mksquashfs build/rootfs build/rootfs.squashfs artifacts: paths: - - rootfs.tar.gz + - build/rootfs.squashfs expire_in: 2 weeks cache: key: "binaries_packer-$PACKER_VERSION" @@ -54,10 +56,10 @@ mktorrent: before_script: - apk add --no-cache mktorrent script: - - mktorrent -a "$ANNOUNCE" -o rootfs.torrent -l 22 -w "$WEBSEED" rootfs.tar.gz + - mktorrent-borg -a "$ANNOUNCE" -o build/rootfs.squashfs.torrent -l 22 -w "$WEBSEED" build/rootfs.squashfs artifacts: paths: - - rootfs.torrent + - build/rootfs.squashfs.torrent expire_in: 2 weeks cache: key: binaries diff --git a/packer.json b/packer.json index 80719a6..a24b8ee 100644 --- a/packer.json +++ b/packer.json @@ -16,7 +16,7 @@ { "type": "docker", "image": "debian:stretch", - "export_path": "rootfs.tar" + "export_path": "build/rootfs.tar" } ], "provisioners": [