Browse Source

Clean Dockerfile & Clone repositories with HTTPS

pull/625/head
4 years ago
parent
commit
4627cd898b
  1. 9
      dom/Dockerfile
  2. 2
      dom/entrypoint.sh
  3. 2
      go/tests/entrypoint.sh
  4. 2
      js/tests/Dockerfile
  5. 2
      js/tests/entrypoint.sh
  6. 2
      sh/tests/entrypoint.sh

9
dom/Dockerfile

@ -1,10 +1,11 @@
FROM buildkite/puppeteer:latest FROM buildkite/puppeteer
ENV GIT_TERMINAL_PROMPT=0 ENV GIT_TERMINAL_PROMPT=0
RUN apt-get update RUN apt-get update
RUN apt-get install -y git RUN apt-get install -y git
COPY --from=mkcert-ca . /usr/local/share/ca-certificates
RUN update-ca-certificates
WORKDIR /app WORKDIR /app
COPY ./dom . COPY dom .
COPY ./subjects ./subjects COPY subjects ./subjects
RUN ls -la
ENTRYPOINT ["/bin/sh", "/app/entrypoint.sh"] ENTRYPOINT ["/bin/sh", "/app/entrypoint.sh"]

2
dom/entrypoint.sh

@ -11,7 +11,7 @@ cd student
if test "$REPOSITORY"; then if test "$REPOSITORY"; then
password=$(cat) password=$(cat)
git clone --quiet --depth=1 --shallow-submodules http://root:"${password}"@"$REPOSITORY" . git clone --quiet --depth=1 --shallow-submodules https://root:"${password}"@"$REPOSITORY" .
else else
first_file=$(echo "$EXPECTED_FILES" | cut -d' ' -f1) first_file=$(echo "$EXPECTED_FILES" | cut -d' ' -f1)
mkdir -p "$(dirname "$first_file")" mkdir -p "$(dirname "$first_file")"

2
go/tests/entrypoint.sh

@ -11,7 +11,7 @@ cd src/student
if test "$REPOSITORY"; then if test "$REPOSITORY"; then
password=$(cat) password=$(cat)
git clone --quiet --depth=1 --shallow-submodules http://root:"${password}"@"$REPOSITORY" . git clone --quiet --depth=1 --shallow-submodules https://root:"${password}"@"$REPOSITORY" .
else else
first_file=$(echo "$EXPECTED_FILES" | cut -d' ' -f1) first_file=$(echo "$EXPECTED_FILES" | cut -d' ' -f1)
mkdir -p "$(dirname "$first_file")" mkdir -p "$(dirname "$first_file")"

2
js/tests/Dockerfile

@ -2,6 +2,8 @@ FROM node:14-alpine
ENV GIT_TERMINAL_PROMPT=0 ENV GIT_TERMINAL_PROMPT=0
RUN apk add --no-cache git RUN apk add --no-cache git
COPY --from=mkcert-ca . /usr/local/share/ca-certificates
RUN update-ca-certificates
WORKDIR /app WORKDIR /app
COPY . . COPY . .
ENTRYPOINT ["/bin/sh", "/app/entrypoint.sh"] ENTRYPOINT ["/bin/sh", "/app/entrypoint.sh"]

2
js/tests/entrypoint.sh

@ -11,7 +11,7 @@ cd student
if test "$REPOSITORY"; then if test "$REPOSITORY"; then
password=$(cat) password=$(cat)
git clone --quiet --depth=1 --shallow-submodules http://root:"${password}"@"$REPOSITORY" . git clone --quiet --depth=1 --shallow-submodules https://root:"${password}"@"$REPOSITORY" .
else else
first_file=$(echo "$EXPECTED_FILES" | cut -d' ' -f1) first_file=$(echo "$EXPECTED_FILES" | cut -d' ' -f1)
mkdir -p "$(dirname "$first_file")" mkdir -p "$(dirname "$first_file")"

2
sh/tests/entrypoint.sh

@ -10,7 +10,7 @@ cd student
if test "$REPOSITORY"; then if test "$REPOSITORY"; then
password=$(cat) password=$(cat)
git clone --quiet --depth=1 --shallow-submodules http://root:"${password}"@"$REPOSITORY" . git clone --quiet --depth=1 --shallow-submodules https://root:"${password}"@"$REPOSITORY" .
else else
first_file=$(echo "$EXPECTED_FILES" | cut -d' ' -f1) first_file=$(echo "$EXPECTED_FILES" | cut -d' ' -f1)
mkdir -p "$(dirname "$first_file")" mkdir -p "$(dirname "$first_file")"

Loading…
Cancel
Save