...
 
Commits (3)
......@@ -37,7 +37,8 @@ RUN apk upgrade
# copy entrypoint script to executables
COPY ./build/docker/dev/docker-entrypoint.sh /usr/local/bin/
COPY ./build/docker/dev/entrypoint-manual.txt /usr/local/bin/
RUN echo '0.4.1' > /version.txt
RUN echo '0.4.2' > /version.txt
# copy service scripts to root dir
COPY ./src/services /services
......
......@@ -28,11 +28,28 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Version first, because it does not require any other files or settings.
if [ "$1" = "--version" ]; then
cat /version.txt
exit 0
fi
# checks if a repository was bound to the docker image
if [ ! -d /repo ]; then
echo
cat /usr/local/bin/entrypoint-manual.txt
echo
echo "Repository to run services on not bound! Showing help page..."
exit 1
fi
# checks if a .ci-service.yml exists
if [ ! -f /repo/.ci-services.yml ]; then
cat /usr/local/bin/entrypoint-manual.txt
echo
echo "Repository does not contain a config for the ci-services."
echo "Visit https://gitext.gfz-potsdam.de/software/services/fair/ci-services/-/blob/master/doc/doc_service_description.md#general"
echo "for more information"
exit 1
fi
......@@ -128,13 +145,8 @@ if [ "$1" = "--test" ]; then
exit 0
fi
if [ "$1" = "--version" ]; then
cat /version.txt
exit 0
fi
# if no suitable argument was found, shows help page
cat /usr/local/bin/entrypoint-manual.txt
echo
echo "Unknown command line argument! Showing help page..."
cat /usr/local/bin/entrypoint-manual.txt
exit 1