mirror of https://github.com/01-edu/public.git
add entrypoint and Dockerfile and rename
This commit is contained in:
parent
9e7c7c2ab8
commit
b1e775a1ab
|
@ -0,0 +1,8 @@
|
||||||
|
FROM buildkite/puppeteer:latest
|
||||||
|
|
||||||
|
ENV GIT_TERMINAL_PROMPT=0
|
||||||
|
# RUN apk add --no-cache git
|
||||||
|
WORKDIR /app
|
||||||
|
COPY ./puppeteer .
|
||||||
|
COPY ./subjects ./subjects
|
||||||
|
ENTRYPOINT ["/bin/sh", "/app/entrypoint.sh"]
|
|
@ -0,0 +1,23 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -o noglob
|
||||||
|
set -o errexit
|
||||||
|
set -o nounset
|
||||||
|
IFS='
|
||||||
|
'
|
||||||
|
|
||||||
|
mkdir student
|
||||||
|
cd student
|
||||||
|
|
||||||
|
if test "$REPOSITORY"; then
|
||||||
|
password=$(cat)
|
||||||
|
git clone --quiet --depth=1 --shallow-submodules http://root:"${password}"@"$REPOSITORY" .
|
||||||
|
else
|
||||||
|
first_file=$(echo "$EXPECTED_FILES" | cut -d' ' -f1)
|
||||||
|
mkdir -p "$(dirname "$first_file")"
|
||||||
|
cat > "$first_file"
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd
|
||||||
|
|
||||||
|
node --unhandled-rejections=strict /app/test.js "${EXERCISE}"
|
Loading…
Reference in New Issue