Skip to content

Commit

Permalink
Do build
Browse files Browse the repository at this point in the history
  • Loading branch information
enolfc committed Aug 5, 2024
1 parent d32e138 commit 64b9123
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions builder/build-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@ packer plugins install github.com/hashicorp/qemu
packer plugins install github.com/hashicorp/ansible

# do the build
#if tools/build.sh "$IMAGE" >/var/log/image-build.log 2>&1; then
# builder/refresh.sh vo.access.egi.eu "$(cat /var/tmp/egi/.refresh_token)" images
# OS_TOKEN="$(yq -r '.clouds.images.auth.token' /etc/openstack/clouds.yaml)"
# VM_NAME="$(jq -r ".builders[].vm_name" < "$IMAGE")"
# cd "$(dirname "$IMAGE")/output-qemu"
# SHA="$(sha512sum -z $VM_NAME | cut -f1 -d" ")"
# openstack --os-cloud images --os-token $OS_TOKEN \
# object create egi_endorsed_vas \
# "$VM_NAME" >>/var/log/image-build.log
# echo "SUCCESSFUL BUILD - $VM_NAME - $SHA" >>/var/log/image-build.log
#fi
if tools/build.sh "$IMAGE" >/var/log/image-build.log 2>&1; then
builder/refresh.sh vo.access.egi.eu "$(cat /var/tmp/egi/.refresh_token)" images
OS_TOKEN="$(yq -r '.clouds.images.auth.token' /etc/openstack/clouds.yaml)"
VM_NAME="$(jq -r ".builders[].vm_name" < "$IMAGE")"
cd "$(dirname "$IMAGE")/output-qemu"
SHA="$(sha512sum -z $VM_NAME | cut -f1 -d" ")"
openstack --os-cloud images --os-token $OS_TOKEN \
object create egi_endorsed_vas \
"$VM_NAME" >>/var/log/image-build.log
echo "SUCCESSFUL BUILD - $VM_NAME - $SHA" >>/var/log/image-build.log
fi

echo "BUILD ENDED" >>/var/log/image-build.log

0 comments on commit 64b9123

Please sign in to comment.