x
ci/woodpecker/tag/compliance-and-tests Pipeline was successful Details
ci/woodpecker/tag/release-version Pipeline failed Details

minimal-dockerfile
gapodo 2022-12-07 23:36:02 +01:00
parent 9986443830
commit dd8ba9a40f
1 changed files with 7 additions and 4 deletions

View File

@ -14,18 +14,21 @@ ARG CI_REPO_CLONE_URL
ENV CI_REPO_CLONE_URL "${CI_REPO_CLONE_URL}"
# Shorthands for easy use and ease of replacement
ARG OUT "/out-bins"
ENV OUT "${OUT}"
ARG DR "/docker/root"
ENV DR "${DR}"
ARG OUT
ENV OUT "${OUT:-/out-bins}"
ARG DR
ENV DR "${DR:-"/docker/root"}"
# Check vars and create directories
RUN test -n "$CI_COMMIT_SHA" || (echo "CI_COMMIT_SHA is required but not set" >&2 && exit 1) && \
test -n "$CI_REPO_CLONE_URL" || (echo "CI_REPO_CLONE_URL is required but not set" >&2 && exit 1) && \
echo "Running prep for ${CI_REPO_CLONE_URL} commit ${CI_COMMIT_SHA}" && \
echo "Preparin out directories ${OUT}" && \
mkdir -p "${OUT}/linux/amd64" && \
mkdir -p "${OUT}/linux/arm64" && \
echo "Creating build dir" && \
mkdir /build && \
echo "Creating docker root prep dir ${DR}" && \
mkdir -p "${DR}"
# Copying the arch specific binaries to the path easily accessible in the next step and rename them to gitea