File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ARG linux_vsn="ubuntu:18.04"
2+ FROM ${linux_vsn}
3+ ARG irods_vsn="4.3.1-0~bionic"
4+
5+ ARG createdb=""
6+ ENV ICAT_DEFERRED_CREATEDB /tmp/icat_deferred_createdb
7+
8+ RUN apt update
9+ RUN apt install -y sudo git
10+ WORKDIR /root
11+ RUN git clone http://github.com/d-w-moore/ubuntu_irods_installer
12+ RUN if [ -n "${createdb}" ]; then \
13+ /root/ubuntu_irods_installer/install.sh --w="config-essentials create-db" 0 ;\
14+ else \
15+ /root/ubuntu_irods_installer/install.sh --w="config-essentials" 0 ;\
16+ touch "${ICAT_DEFERRED_CREATEDB}" ;\
17+ fi
18+ RUN /root/ubuntu_irods_installer/install.sh --w="add-package-repo" 0
19+ RUN /root/ubuntu_irods_installer/install.sh --i=${irods_vsn} -r 4
20+ # --- set up script for command line iRODS install ---
21+
22+ COPY start_postgresql_and_irods.sh /
23+ RUN chmod +x /start_postgresql_and_irods.sh
24+ RUN apt update && apt install vim iputils-ping -y
Original file line number Diff line number Diff line change 1+ from install-irods
2+ run apt update; apt install -y python3 bats
Original file line number Diff line number Diff line change 1+ ./build-docker.sh
2+ ./docker_container_driver.sh tests/test_1.sh
3+ ./docker_container_driver.sh tests/test_2.sh
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ # IRODS_VERSION="4.3.1-0~bionic"
4+
5+ BASE=$( basename " $0 " )
6+ DIR=$( realpath " $( dirname " $0 " ) " )
7+ cd " $DIR "
8+ DOCKER=docker
9+ for dockerfile in [0-9]* .Dockerfile; do
10+ image_name=${dockerfile# [0-9]* _}
11+ image_name=${image_name% .Dockerfile}
12+ $DOCKER build -f $dockerfile -t $image_name . || exit
13+ done
14+
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ DIR=$( dirname $0 )
3+ cd $DIR
4+ testscript=${1}
5+ declare -A images=(
6+ [test_1.sh]=install-irods
7+ [test_2.sh]=bats-python3
8+ )
9+ image=${images[$(basename $testscript)]}
10+ reporoot=$( realpath ./tests/repo)
11+ # --------------
12+ INNER_MOUNT=/prc
13+ docker run \
14+ -v $reporoot :$INNER_MOUNT :ro \
15+ --rm \
16+ $image \
17+ $INNER_MOUNT /$( realpath --relative-to $reporoot $testscript )
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ service postgresql start
3+ x=${DB_WAIT_SEC:- 20}
4+ while [ $x -ge 0 ] && { ! $SUDO su - postgres -c " psql -c '\l' >/dev/null 2>&1" || x=" " ; }
5+ do
6+ [ -z " $x " ] && break
7+ echo >&2 " $(( x-- )) secs til database timeout" ; sleep 1
8+ done
9+ [ -z " $x " ] || { echo >&2 " Error -- database didn't start" ; exit 1; }
10+ if ! id -u irods > /dev/null 2>&1 ; then
11+ if [ -f " ${ICAT_DEFERRED_CREATEDB} " ] ; then
12+ ~ /ubuntu_irods_installer/install.sh --w=create-db 0
13+ rm -f " ${ICAT_DEFERRED_CREATEDB} "
14+ fi
15+ VERSION_file=$( ls /var/lib/irods/{VERSION,version}.json.dist 2> /dev/null)
16+ IRODS_VSN=$( jq -r ' .irods_version' $VERSION_file ) ~ /ubuntu_irods_installer/install.sh 5
17+ else
18+ su - irods -c ' ~/irodsctl start'
19+ fi
Original file line number Diff line number Diff line change 1+ ../../../..
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ run () {
3+ echo dir of this = $( realpath " $( dirname " ${BASH_SOURCE[0]} " ) /repo" )
4+ }
5+
6+ echo hello_there
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ run () {
3+ echo dir of this = $( realpath " $( dirname " ${BASH_SOURCE[0]} " ) /repo" )
4+ }
5+
6+ echo later_alligator
You can’t perform that action at this time.
0 commit comments