From e7baa735e6b23a8106ddba0b77461201843400e0 Mon Sep 17 00:00:00 2001 From: Lukas Matt Date: Tue, 17 Sep 2019 14:23:23 +0000 Subject: [PATCH] Improve build performance by removing installation steps --- .gitlab-ci.yml | 7 +------ Dockerfile | 18 ++++++++++++++++++ scripts/install.sh | 17 ----------------- 3 files changed, 19 insertions(+), 23 deletions(-) create mode 100644 Dockerfile delete mode 100755 scripts/install.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8798157..20de7ec 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,4 @@ -image: debian +image: registry.git.feneas.org/feneas/federation/testsuite:latest stages: - build - test @@ -11,8 +11,6 @@ stages: junit: report.xml paths: - report.* - before_script: - - bash scripts/install.sh script: - bash scripts/test.sh @@ -23,9 +21,6 @@ stages: build docker images: stage: build - before_script: - - apt-get update && apt-get install -y curl - - curl -L https://get.docker.com | bash - script: - bash scripts/build_docker_image.sh only: diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..62c3182 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +FROM debian + +# install curl, git and the psql client +RUN apt-get update && apt-get install -y \ + curl git-core postgresql-client libxml-generator-perl + +# install docker binary +RUN curl -L https://get.docker.com | bash - + +# install jq command line json parser +RUN curl -o /usr/local/bin/jq -L \ + https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64 +RUN chmod +x /usr/local/bin/jq + +# install bats unit testing in bash +RUN git clone --depth 1 https://github.com/bats-core/bats-core.git \ + && cd bats-core \ + && ./install.sh /usr/local diff --git a/scripts/install.sh b/scripts/install.sh deleted file mode 100755 index e1ffb4b..0000000 --- a/scripts/install.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -# install curl, git and the psql client -apt-get update && apt-get install -y \ - curl git-core postgresql-client libxml-generator-perl - -# install docker binary -curl -L https://get.docker.com | bash - - -# install jq command line json parser -curl -o /usr/local/bin/jq -L \ - https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64 -chmod +x /usr/local/bin/jq - -# install bats unit testing in bash -git clone --depth 1 https://github.com/bats-core/bats-core.git -cd bats-core && ./install.sh /usr/local && cd - -- GitLab