diff --git a/Dockerfile b/Dockerfile index 1741ef3..41681b7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -44,18 +44,20 @@ RUN sed -i \ RUN echo '' > /var/www/html/index.php -ENV COMANAGE_URL=https://github.com/Internet2/comanage-registry/archive/$version.tar.gz +ENV VERSION=$version +ENV COMANAGE_URL=https://github.com/Internet2/comanage-registry/archive/$VERSION.tar.gz +ENV COMANAGE_PREFIX=comanage-registry RUN mkdir -p /tmp/comanage && cd /tmp/comanage && \ - wget -q $COMANAGE_URL \ + wget -q $COMANAGE_URL && \ # Perform verifications [TODO] # Prepare filesystem - tar xf $version.tar.gz && \ - mkdir -p /opt/comanage && \ - mv $version /opt/comanage/. && \ - ln -s /opt/comanage/$version /opt/comanage/current && \ -# Cleanup - rm -rf /tmp/comanage + mkdir -p /opt/comanage && \ + tar xf $VERSION.tar.gz && \ + mv $COMANAGE_PREFIX-$VERSION /opt/comanage/. && \ + ln -s /opt/comanage/$VERSION /opt/comanage/current && \ +# # Cleanup + rm -rf /tmp/comanage ENV COMANAGE_HOME /opt/comanage/current @@ -67,8 +69,7 @@ ADD ./container_files /opt # Add Volumes and Set permissions RUN mkdir /opt/shared \ && chmod 777 /opt/shared \ - && chmod 777 /root/*.sh \ - && chmod 777 /root/shibboleth/*.sh + && chmod 777 /opt/bin/*.sh # Environment variables ENV ADMIN_NAME "Scott" diff --git a/Jenkinsfile b/Jenkinsfile index c4b3931..c4145f6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -37,7 +37,7 @@ node { stage 'Build' try{ - sh 'bin/build.sh &> debug' + sh 'bin/rebuild.sh &> debug' } catch(error) { def error_details = readFile('./debug'); def message = "BUILD ERROR: There was a problem building ${imagename}:${tag}. \n\n ${error_details}"