Skip to content

Commit acedb53

Browse files
committed
Use git to DL with submodules for tests instead of curl
1 parent 40ff37a commit acedb53

File tree

3 files changed

+24
-47
lines changed

3 files changed

+24
-47
lines changed

debuntu/all/Dockerfile

+10-19
Original file line numberDiff line numberDiff line change
@@ -86,51 +86,42 @@ WORKDIR ${HOME}
8686

8787
FROM main AS test
8888

89+
8990
USER root:root
9091
WORKDIR /root
9192
ENV HOME=/root
9293

9394
RUN set -ex \
95+
&& export DEBIAN_FRONTEND=noninteractive \
9496
&& apt-get update -y \
9597
&& apt-get upgrade -y \
9698
&& apt-get install -y --no-install-recommends \
9799
ca-certificates \
98-
curl
100+
git
99101

100102
USER ci:ci
101103
WORKDIR /home/ci
102104
ENV HOME=/home/ci
103105

104-
RUN curl --output pdi.tar.gz -L https://github.com/pdidev/pdi/archive/refs/heads/main.tar.gz
105-
RUN curl --output pdi-tutorial.tar.gz -L https://github.com/pdidev/tutorial/archive/refs/heads/main.tar.gz
106+
RUN git clone --recurse-submodules https://github.com/pdidev/pdi.git
106107

107108
USER root:root
108109
WORKDIR /root
109110
ENV HOME=/root
110111

111112
RUN set -ex \
112-
&& apt-get purge -y curl \
113-
&& apt-get autoremove -y \
114-
&& apt-get clean -y \
115-
&& apt-get autoclean -y \
116-
&& rm -rf /var/lib/apt/lists/* \
117-
&& rm -rf /run/nologin \
118-
&& rm -rf /root/* \
119-
&& [ -f ~/.profile ] && ( sed -i 's/mesg n/( tty -s \&\& mesg n || true )/g' ~/.profile || true )
113+
&& export DEBIAN_FRONTEND=noninteractive \
114+
&& apt-get purge -y \
115+
ca-certificates \
116+
git
120117

121118
USER ci:ci
122119
WORKDIR /home/ci
123120
ENV HOME=/home/ci
124121

125-
RUN tar -xf pdi.tar.gz
126-
RUN rmdir pdi-*/tutorial
127-
RUN tar -xf pdi-tutorial.tar.gz
128-
RUN rm *.tar.gz
129-
RUN cd pdi-* \
130-
&& mv ../tutorial-* tutorial
122+
131123
RUN export VERBOSE=1 \
132-
&& export MAKEFLAGS="-j1" \
133-
&& bash pdi*/bin/build_and_run_all_tests
124+
&& bash pdi/bin/build_and_run_all_tests
134125

135126

136127

debuntu/mini/Dockerfile

+10-19
Original file line numberDiff line numberDiff line change
@@ -75,51 +75,42 @@ WORKDIR ${HOME}
7575

7676
FROM main AS test
7777

78+
7879
USER root:root
7980
WORKDIR /root
8081
ENV HOME=/root
8182

8283
RUN set -ex \
84+
&& export DEBIAN_FRONTEND=noninteractive \
8385
&& apt-get update -y \
8486
&& apt-get upgrade -y \
8587
&& apt-get install -y --no-install-recommends \
8688
ca-certificates \
87-
curl
89+
git
8890

8991
USER ci:ci
9092
WORKDIR /home/ci
9193
ENV HOME=/home/ci
9294

93-
RUN curl --output pdi.tar.gz -L https://github.com/pdidev/pdi/archive/refs/heads/main.tar.gz
94-
RUN curl --output pdi-tutorial.tar.gz -L https://github.com/pdidev/tutorial/archive/refs/heads/main.tar.gz
95+
RUN git clone --recurse-submodules https://github.com/pdidev/pdi.git
9596

9697
USER root:root
9798
WORKDIR /root
9899
ENV HOME=/root
99100

100101
RUN set -ex \
101-
&& apt-get purge -y curl \
102-
&& apt-get autoremove -y \
103-
&& apt-get clean -y \
104-
&& apt-get autoclean -y \
105-
&& rm -rf /var/lib/apt/lists/* \
106-
&& rm -rf /run/nologin \
107-
&& rm -rf /root/* \
108-
&& [ -f ~/.profile ] && ( sed -i 's/mesg n/( tty -s \&\& mesg n || true )/g' ~/.profile || true )
102+
&& export DEBIAN_FRONTEND=noninteractive \
103+
&& apt-get purge -y \
104+
ca-certificates \
105+
git
109106

110107
USER ci:ci
111108
WORKDIR /home/ci
112109
ENV HOME=/home/ci
113110

114-
RUN tar -xf pdi.tar.gz
115-
RUN rmdir pdi-*/tutorial
116-
RUN tar -xf pdi-tutorial.tar.gz
117-
RUN rm *.tar.gz
118-
RUN cd pdi-* \
119-
&& mv ../tutorial-* tutorial
111+
120112
RUN export VERBOSE=1 \
121-
&& export MAKEFLAGS="-j1" \
122-
&& bash pdi*/bin/build_and_run_all_tests
113+
&& bash pdi/bin/build_and_run_all_tests
123114

124115

125116

spack/7-finalize/Dockerfile

+4-9
Original file line numberDiff line numberDiff line change
@@ -160,16 +160,13 @@ RUN set -ex \
160160
&& apt-get upgrade -y \
161161
&& apt-get install -y --no-install-recommends \
162162
ca-certificates \
163-
curl \
164-
&& apt-get autoremove -y \
165-
&& apt-get clean -y \
166-
&& apt-get autoclean -y
163+
git
167164

168165
USER ci:ci
169166
WORKDIR /home/ci
170167
ENV HOME=/home/ci
171168

172-
RUN curl --output pdi.tar.gz -L https://github.com/pdidev/pdi/archive/refs/heads/main.tar.gz
169+
RUN git clone --recurse-submodules https://github.com/pdidev/pdi.git
173170

174171
USER root:root
175172
WORKDIR /root
@@ -179,17 +176,15 @@ RUN set -ex \
179176
&& export DEBIAN_FRONTEND=noninteractive \
180177
&& apt-get purge -y \
181178
ca-certificates \
182-
curl \
183-
&& rm -rf /var/lib/apt/lists/*
179+
git
184180

185181
USER ci:ci
186182
WORKDIR /home/ci
187183
ENV HOME=/home/ci
188184

189185

190-
RUN tar -xf pdi.tar.gz
191186
RUN export VERBOSE=1 \
192-
&& bash pdi*/bin/build_and_run_all_tests
187+
&& bash pdi/bin/build_and_run_all_tests
193188

194189

195190

0 commit comments

Comments
 (0)