Skip to content

Commit 1f6a8d7

Browse files
Do a shallow clone for Docker tests. (microsoft#42966)
* Do a shallow clone for docker tests. * Remove the 'pull' step from the Docker files.
1 parent 3e05aa6 commit 1f6a8d7

File tree

9 files changed

+9
-17
lines changed

9 files changed

+9
-17
lines changed

tests/cases/docker/azure-sdk/Dockerfile

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
FROM node:current
22
RUN npm install -g @microsoft/rush
3-
RUN git clone https://github.com/Azure/azure-sdk-for-js.git /azure-sdk
3+
RUN git clone --depth 1 https://github.com/Azure/azure-sdk-for-js.git /azure-sdk
44
WORKDIR /azure-sdk
5-
RUN git pull
65
RUN rush update
76
WORKDIR /azure-sdk/sdk/core/core-http
87
# Sync up all TS versions used internally so they're all linked from a known location

tests/cases/docker/chrome-devtools-frontend-next/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
FROM node:current
2-
RUN git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git /depot_tools
2+
RUN git clone --depth 1 https://chromium.googlesource.com/chromium/tools/depot_tools.git /depot_tools
33
ENV PATH=/depot_tools:$PATH
44
WORKDIR /
55
RUN mkdir devtools

tests/cases/docker/office-ui-fabric/Dockerfile

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ ENV CI=true
44
ENV TF_BUILD=true
55
# Download repo version, sets up better layer caching for the following clone
66
ADD https://api.github.com/repos/OfficeDev/office-ui-fabric-react/git/ref/heads/master version.json
7-
RUN git clone https://github.com/OfficeDev/office-ui-fabric-react.git /office-ui-fabric-react
7+
RUN git clone --depth 1 https://github.com/OfficeDev/office-ui-fabric-react.git /office-ui-fabric-react
88
WORKDIR /office-ui-fabric-react
9-
RUN git pull
109
WORKDIR /
1110
COPY --from=typescript/typescript /typescript/typescript-*.tgz typescript.tgz
1211
WORKDIR /office-ui-fabric-react

tests/cases/docker/prettier/Dockerfile

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
FROM node:current
22
RUN npm i -g yarn --force
3-
RUN git clone https://github.com/prettier/prettier.git /prettier
3+
RUN git clone --depth 1 https://github.com/prettier/prettier.git /prettier
44
WORKDIR /prettier
5-
RUN git pull
65
COPY --from=typescript/typescript /typescript/typescript-*.tgz /typescript.tgz
76
RUN mkdir /typescript
87
RUN tar -xzvf /typescript.tgz -C /typescript

tests/cases/docker/pyright/Dockerfile

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
FROM node:current
2-
RUN git clone https://github.com/microsoft/pyright.git /pyright
2+
RUN git clone --depth 1 https://github.com/microsoft/pyright.git /pyright
33
WORKDIR /pyright
4-
RUN git pull
54
RUN npm i
65
COPY --from=typescript/typescript /typescript/typescript-*.tgz /typescript.tgz
76
RUN npm install /typescript.tgz --exact --ignore-scripts --save-dev

tests/cases/docker/rxjs/Dockerfile

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
FROM node:10
2-
RUN git clone https://github.com/ReactiveX/rxjs /rxjs
2+
RUN git clone --depth 1 https://github.com/ReactiveX/rxjs /rxjs
33
WORKDIR /rxjs
4-
RUN git pull
54
COPY --from=typescript/typescript /typescript/typescript-*.tgz /typescript.tgz
65
RUN mkdir /typescript
76
RUN tar -xzvf /typescript.tgz -C /typescript

tests/cases/docker/vscode/Dockerfile

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ FROM node:10
33
RUN apt-get update
44
RUN apt-get install libsecret-1-dev libx11-dev libxkbfile-dev -y
55
RUN npm i -g yarn --force
6-
RUN git clone https://github.com/microsoft/vscode.git /vscode
6+
RUN git clone --depth 1 https://github.com/microsoft/vscode.git /vscode
77
WORKDIR /vscode
8-
RUN git pull
98
COPY --from=typescript/typescript /typescript/typescript-*.tgz /typescript.tgz
109
WORKDIR /vscode/build
1110
RUN yarn add typescript@/typescript.tgz

tests/cases/docker/vue-next/Dockerfile

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
FROM node:current
22
RUN npm install -g yarn lerna --force
3-
RUN git clone https://github.com/vuejs/vue-next.git /vue-next
3+
RUN git clone --depth 1 https://github.com/vuejs/vue-next.git /vue-next
44
WORKDIR /vue-next
5-
RUN git pull
65
COPY --from=typescript/typescript /typescript/typescript-*.tgz typescript.tgz
76
# Sync up all TS versions used internally to the new one
87
RUN yarn add typescript@./typescript.tgz --exact --dev --ignore-scripts -W

tests/cases/docker/xterm.js/Dockerfile

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# node-pty doesn't build on node 12 right now, so we lock to 10
22
FROM node:10
3-
RUN git clone https://github.com/xtermjs/xterm.js.git /xtermjs
3+
RUN git clone --depth 1 https://github.com/xtermjs/xterm.js.git /xtermjs
44
WORKDIR /xtermjs
5-
RUN git pull
65
COPY --from=typescript/typescript /typescript/typescript-*.tgz /typescript.tgz
76
RUN mkdir /typescript
87
RUN tar -xzvf /typescript.tgz -C /typescript

0 commit comments

Comments
 (0)