Change permissions for generated airskiff.yaml file

Generated file has superuser owner and it is set with permissions
that other users are not able to read the file, so later it can't be used
by Armada.

Change-Id: I571a3af0fa8f3a482e0a8e9726f92cc39a670e91
This commit is contained in:
Daniel Pawlik 2019-07-24 12:14:36 +00:00
parent d59c51ef10
commit 05e7672a84
1 changed files with 8 additions and 0 deletions

View File

@ -25,6 +25,11 @@ set -xe
# Render documents
${PEGLEG} site -r . render "${PL_SITE}" -o airskiff.yaml
# Set permissions o+r, beacause it need to be readable
# for Armada in the container
AIRSKIFF_PERMISSIONS=$(stat --format '%a' airskiff.yaml)
sudo chmod 0644 airskiff.yaml
# Download latest Armada image and deploy Airship components
docker run --rm --net host -p 8000:8000 --name armada \
-v ~/.kube/config:/armada/.kube/config \
@ -32,3 +37,6 @@ docker run --rm --net host -p 8000:8000 --name armada \
-v "${INSTALL_PATH}":/airship-components \
quay.io/airshipit/armada:latest \
apply /airskiff.yaml --target-manifest $TARGET_MANIFEST
# Set back permissions of the file
sudo chmod "${AIRSKIFF_PERMISSIONS}" airskiff.yaml