stop using buildkit for linters image
refs DE-608 When we pull the experimental syntax docker image, buildkit can fail with the error “failed to solve with frontend gateway.v0: frontend grpc server closed unexpectedly”. We don’t actually need buildkit or the experimental syntax for this image, so stop using it. Test Plan: 1. Linters passes in main build. 2. Linters fails when webpack file size is wrong. 3. Linters uploads image when upload directive specified. Change-Id: I6b508cbf7fc42d0d93b066804ba07dc994b9625d Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262734 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> QA-Review: Aaron Ogata <aogata@instructure.com> Product-Review: Aaron Ogata <aogata@instructure.com> Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
This commit is contained in:
parent
d364d57967
commit
3de82e1931
|
@ -0,0 +1,13 @@
|
|||
FROM local/webpack-builder
|
||||
|
||||
USER docker
|
||||
COPY --chown=docker:docker . /usr/src/app
|
||||
RUN cp -v docker-compose/config/redis.yml config && \
|
||||
cp -v docker-compose/config/selenium.yml config/ && \
|
||||
cp -vR docker-compose/config/new-jenkins/* config/ && \
|
||||
cp -v config/delayed_jobs.yml.example config/delayed_jobs.yml && \
|
||||
cp -v config/domain.yml.example config/domain.yml && \
|
||||
cp -v config/external_migration.yml.example config/external_migration.yml && \
|
||||
cp -v config/outgoing_mail.yml.example config/outgoing_mail.yml && \
|
||||
cp -v config/docker-compose.override.yml.example docker-compose.override.yml && \
|
||||
mkdir -p /home/docker/gergich
|
|
@ -18,6 +18,8 @@
|
|||
|
||||
def call() {
|
||||
credentials.withStarlordCredentials {
|
||||
sh "./build/new-jenkins/linters/docker-build.sh local/gergich"
|
||||
|
||||
credentials.withGerritCredentials {
|
||||
withEnv([
|
||||
"FORCE_FAILURE=${configuration.getBoolean('force-failure-linters', 'false')}",
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -o errexit -o errtrace -o nounset -o pipefail -o xtrace
|
||||
|
||||
WORKSPACE=${WORKSPACE:-$(pwd)}
|
||||
|
||||
./build/new-jenkins/docker-with-flakey-network-protection.sh pull $WEBPACK_BUILDER_IMAGE
|
||||
|
||||
docker tag $WEBPACK_BUILDER_IMAGE local/webpack-builder
|
||||
|
||||
docker build \
|
||||
--file Dockerfile.jenkins.linters-runner \
|
||||
--label "WEBPACK_BUILDER_IMAGE=$WEBPACK_BUILDER_IMAGE" \
|
||||
--tag "$1" \
|
||||
"$WORKSPACE"
|
|
@ -33,24 +33,6 @@ inputs+=("--env GERRIT_REFSPEC=$GERRIT_REFSPEC")
|
|||
GERGICH_VOLUME="gergich-results-$(date +%s)"
|
||||
docker volume create $GERGICH_VOLUME
|
||||
|
||||
cat <<EOF | DOCKER_BUILDKIT=1 PROGRESS_NO_TRUNC=1 docker build \
|
||||
--build-arg PATCHSET_TAG="$PATCHSET_TAG" \
|
||||
--build-arg WEBPACK_BUILDER_TAG="$WEBPACK_BUILDER_IMAGE" \
|
||||
--tag "local/gergich" \
|
||||
-
|
||||
# syntax=starlord.inscloudgate.net/jenkins/dockerfile:1.0-experimental
|
||||
|
||||
ARG PATCHSET_TAG
|
||||
ARG WEBPACK_BUILDER_TAG
|
||||
FROM \$PATCHSET_TAG AS patchset
|
||||
FROM \$WEBPACK_BUILDER_TAG
|
||||
USER docker
|
||||
RUN mkdir -p /home/docker/gergich
|
||||
RUN --mount=type=bind,target=/tmp/src,source=/usr/src/app,from=patchset \
|
||||
cp -rf /tmp/src/. /usr/src/app
|
||||
RUN cp -rf config/docker-compose.override.yml.example /usr/src/app/docker-compose.override.yml
|
||||
EOF
|
||||
|
||||
if [ "$UPLOAD_DEBUG_IMAGE" = "true" ]; then
|
||||
docker tag local/gergich $LINTER_DEBUG_IMAGE
|
||||
docker push $LINTER_DEBUG_IMAGE
|
||||
|
@ -95,7 +77,6 @@ fi
|
|||
./build/new-jenkins/linters/run-and-collect-output.sh "bundle exec ruby script/rlint"
|
||||
[ "\${SKIP_ESLINT-}" != "true" ] && ./build/new-jenkins/linters/run-and-collect-output.sh "bundle exec ruby script/eslint"
|
||||
./build/new-jenkins/linters/run-and-collect-output.sh "bundle exec ruby script/lint_commit_message"
|
||||
./build/new-jenkins/linters/run-and-collect-output.sh "yarn lint:browser-code"
|
||||
|
||||
gergich status
|
||||
echo "LINTER OK!"
|
||||
|
|
Loading…
Reference in New Issue