diff --git a/decrypt-secrets.sh b/decrypt-secrets.sh deleted file mode 100644 index eaa4d9a32b2f09a77c65cf2496fc5c22b0f0e561..0000000000000000000000000000000000000000 --- a/decrypt-secrets.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh - -# import the PGP key for the right environment -if [ "$PICA_ENVIRONMENT" = "TEST" ]; -then - echo "$PRIVATE_GPG_KEY_TEST" > /tmp/pgp-key -elif [ "$PICA_ENVIRONMENT" = "PRODUCTION" ]; -then - echo "$PRIVATE_GPG_KEY_PRODUCTION" > /tmp/pgp-key -else - exit -1 -fi -cat /tmp/pgp-key | gpg --import - -# decrypt the secrets -SECRETS_PATH=$MODIFIED_IMAGE/secrets/encrypted-variables-$(echo $PICA_ENVIRONMENT | tr '[:upper:]' '[:lower:]') -echo $SECRETS_PATH - -for container_secrets_folder in $SECRETS_PATH/*; -do - CONTAINER_NAME=$(basename $container_secrets_folder) - for encrypted_secret in $container_secrets_folder/*; - do - SECRET_NAME=$(basename $encrypted_secret) - ( echo -n "$SECRET_NAME=" ; gpg --quiet --decrypt $encrypted_secret ) >> $MODIFIED_IMAGE/secrets/$CONTAINER_NAME.secrets - done -done - -ls -al pica-etherpad/secrets/ \ No newline at end of file diff --git a/get-host-by-image.sh b/get-host-by-image.sh deleted file mode 100644 index f725c73a06b20fd49683bc751b8387f964226ce6..0000000000000000000000000000000000000000 --- a/get-host-by-image.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -# return the host the service is hosted on -case $MODIFIED_IMAGE in - pica-etherpad) RES="PICA02" - ;; - pica-dokuwiki) RES="PICA02" -esac -echo $RES diff --git a/pica-ci/Dockerfile b/pica-ci/Dockerfile index 71a72753d01916ad19f29cf8fdc9a811bb7bd251..91ba05aadcdb354e3ea0cff0745744661c801d47 100644 --- a/pica-ci/Dockerfile +++ b/pica-ci/Dockerfile @@ -6,9 +6,5 @@ COPY . /workdir/ RUN chmod +x get-modified-image.sh get-host-by-image.sh decrypt-secrets.sh && \ export MODIFIED_IMAGE_FULL=$(./get-modified-image.sh) && \ export MODIFIED_IMAGE=$(echo $MODIFIED_IMAGE_FULL | cut -d ':' -f1) && \ - export CONTAINER_NAME=$(cat $MODIFIED_IMAGE/docker-compose.yml | grep $MODIFIED_IMAGE -B1 | head -n1 | cut -d ':' -f1 | xargs) && \ - export HOST=$(./get-host-by-image.sh) && \ echo "MODIFIED_IMAGE=$MODIFIED_IMAGE" >> /etc/profile.d/ci-variables && \ - echo "MODIFIED_IMAGE_FULL=$MODIFIED_IMAGE_FULL" >> /etc/profile.d/ci-variables && \ - echo "CONTAINER_NAME=$CONTAINER_NAME" >> /etc/profile.d/ci-variables && \ - echo "HOST=$HOST" >> /etc/profile.d/ci-variables + echo "MODIFIED_IMAGE_FULL=$MODIFIED_IMAGE_FULL" >> /etc/profile.d/ci-variables