remove rails boot requirement from JS job

Change-Id: I50f371c95f0f89dda05fd548ece3292fd7a63276
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/294421
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Alex Slaughter <aslaughter@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
This commit is contained in:
Aaron Ogata 2022-06-22 19:52:30 -07:00
parent 900a95b38b
commit f7e92b4b52
3 changed files with 9 additions and 2 deletions

3
Jenkinsfile vendored
View File

@ -455,12 +455,13 @@ pipeline {
.execute {
buildDockerImageStage.patchsetImage('''
diffFrom=$(git --git-dir $LOCAL_WORKDIR/.git rev-parse $GERRIT_PATCHSET_REVISION^1)
docker run -dt --name general-build-container --volume $(pwd)/$LOCAL_WORKDIR/.git:$DOCKER_WORKDIR/.git -e RAILS_ENV=test $PATCHSET_TAG bash -c "bin/rails runner \"true\" && sleep infinity"
docker run -dt --name general-build-container --volume $(pwd)/$LOCAL_WORKDIR/.git:$DOCKER_WORKDIR/.git -e RAILS_ENV=test $PATCHSET_TAG bash -c "sleep infinity"
docker exec -dt \
-e CRYSTALBALL_DIFF_FROM=$diffFrom \
-e CRYSTALBALL_DIFF_TO=$GERRIT_PATCHSET_REVISION \
-e CRYSTALBALL_REPO_PATH=$DOCKER_WORKDIR \
general-build-container bundle exec crystalball --dry-run
docker exec -dt general-build-container bin/rails graphql:schema
docker exec -t general-build-container ps aww
''')
}

View File

@ -41,6 +41,12 @@ fi
tag_many $KARMA_BUILDER_SELECTED_TAG local/karma-builder ${KARMA_BUILDER_TAGS[SAVE_TAG]}
while docker exec -t general-build-container ps aww | grep graphql; do
sleep 0.1
done
docker cp $(docker ps -qa -f name=general-build-container):/usr/src/app/schema.graphql ./schema.graphql
docker build \
--build-arg PATCHSET_TAG="$PATCHSET_TAG" \
--file Dockerfile.jenkins.karma-runner \

View File

@ -121,7 +121,7 @@ def queueJestDistribution(index) {
'CI=1',
]
callableWithDelegate(queueTestStage())(stages, "jest${index}", jestEnvVars, 'bundle exec rails graphql:schema && yarn test:jest:build')
callableWithDelegate(queueTestStage())(stages, "jest${index}", jestEnvVars, 'yarn test:jest:build')
}
}