Verified Commit b3c0aa7e authored by Alexander Wellbrock's avatar Alexander Wellbrock
Browse files

templates: stop assuming remote image store

This can be done via the after script more properly.

Instead we'll apply the naming convention and upload that artifact to
gitlab.
parent c5bddfaf
......@@ -54,26 +54,24 @@ stages:
- rpm-ostree-engine-mount sshfs --sshfs-target="$CI_SSHFS_TARGET" --sshfs-auth="$CI_SSHFS_AUTH" --sshfs-path="$CI_SSHFS_PATH" --sshfs-key="$(echo "$CI_SSHFS_PRIVATE_KEY" | tr -d '\r')"
script:
- export OSTREE_REF="$(rpm-ostree-engine-ci-ref --name="$CI_OSTREE_REF_NAME")"
- export IMAGE_NAME="${OSTREE_REF//\//-}-$(date +%Y%m%d).raw"
- export IMAGE_NAME="${OSTREE_REF//\//-}-$(date +%Y%m%d)"
# Prepare loop devices for image build
- for i in `seq 0 7`; do mknod /dev/loop$i b 7 $i || :; done
# Symlink CI mount points
- ln -s /remote-storage/repo ./.deploy-repo
- ln -s /remote-storage/images ./.deploy-images
- ln -s /cache ./.cache
- ln -s /resources/grub.cfg ./grub.cfg
# Build OSTree commit and image
- rpm-ostree-engine-image --ref="$OSTREE_REF" --mirror=./.deploy-repo
# Compress the Image
- xz -0 -T0 ./os-iot.raw
- if [ ! -e "$(pwd)/.deploy-images" ]; then mkdir -p "$(pwd)/.deploy-images"; fi
- cp -f ./os-iot.raw.xz ./.deploy-images/"$IMAGE_NAME".xz
- mv ./os-iot.raw.xz "$IMAGE_NAME"-iot.raw.xz
after_script:
- sync
artifacts:
expire_in: 3 days
paths:
- os-iot.raw.xz
after_script:
- sync
- ./*.raw.xz
# This step is architecture independent
# It will run on x86 hardware because x86 machines have usually more resources
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment