From 75054ff4f563ce0348a965de499ed5a21c24130d Mon Sep 17 00:00:00 2001 From: Robert Lamb Date: Wed, 27 Nov 2019 14:22:59 -0700 Subject: [PATCH] Rename build/new-jenkins/frontend/ to js/ Fixes: CCI-120 Test plan: New Jenkins JS build passes Change-Id: I772e1a2d2a30d62cfcb875d1c6c08e2177f9f311 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/218959 Tested-by: Jenkins Tested-by: Service Cloud Jenkins Reviewed-by: S. Jacob Powell Reviewed-by: Rex Fleischer QA-Review: Robert Lamb Product-Review: Robert Lamb --- Jenkinsfile.js | 31 +++++++++---------- build/new-jenkins/docker-cleanup.sh | 2 +- .../{frontend => js}/Dockerfile-karma | 0 .../{frontend => js}/tests-jest.sh | 0 .../{frontend => js}/tests-karma.sh | 0 .../{frontend => js}/tests-packages.sh | 0 docker-compose.new-jenkins-karma.yml | 2 +- 7 files changed, 16 insertions(+), 19 deletions(-) rename build/new-jenkins/{frontend => js}/Dockerfile-karma (100%) rename build/new-jenkins/{frontend => js}/tests-jest.sh (100%) rename build/new-jenkins/{frontend => js}/tests-karma.sh (100%) rename build/new-jenkins/{frontend => js}/tests-packages.sh (100%) diff --git a/Jenkinsfile.js b/Jenkinsfile.js index 4e1bf7a1def..18396c92631 100644 --- a/Jenkinsfile.js +++ b/Jenkinsfile.js @@ -28,16 +28,6 @@ def setDockerUp () { } } -def cleanupDocker () { - withEnv(['COMPOSE_FILE=docker-compose.new-jenkins-web.yml:docker-compose.new-jenkins-karma.yml']) { - // Make sure to clean up the karma containers and image - sh 'docker-compose rm -fs karma' - sh 'docker rmi frontend_karma' - // Clean up all the other stuff - sh 'build/new-jenkins/docker-cleanup.sh' - } -} - def isMerge () { return env.GERRIT_EVENT_TYPE == 'change-merged' } @@ -56,6 +46,13 @@ pipeline { PATCHSET_TAG = "$DOCKER_REGISTRY_FQDN/jenkins/canvas-lms:$NAME" } stages { + // remove this after it runs for a little bit. + stage('temp-cleanup') { + steps { + sh 'build/new-jenkins/docker-cleanup.sh' + } + } + stage('Setup') { steps { setDockerUp() @@ -77,12 +74,12 @@ pipeline { parallel { stage('Jest') { steps { - sh 'build/new-jenkins/frontend/tests-jest.sh' + sh 'build/new-jenkins/js/tests-jest.sh' } } stage('Packages') { steps { - sh 'build/new-jenkins/frontend/tests-packages.sh' + sh 'build/new-jenkins/js/tests-packages.sh' } } stage('Karma - Spec Group - coffee') { @@ -90,7 +87,7 @@ pipeline { JSPEC_GROUP = 'coffee' } steps { - sh 'build/new-jenkins/frontend/tests-karma.sh' + sh 'build/new-jenkins/js/tests-karma.sh' } } stage('Karma - Spec Group - jsa - A-F') { @@ -98,7 +95,7 @@ pipeline { JSPEC_GROUP = 'jsa' } steps { - sh 'build/new-jenkins/frontend/tests-karma.sh' + sh 'build/new-jenkins/js/tests-karma.sh' } } stage('Karma - Spec Group - jsg - G') { @@ -106,7 +103,7 @@ pipeline { JSPEC_GROUP = 'jsg' } steps { - sh 'build/new-jenkins/frontend/tests-karma.sh' + sh 'build/new-jenkins/js/tests-karma.sh' } } stage('Karma - Spec Group - jsh - H-Z') { @@ -114,7 +111,7 @@ pipeline { JSPEC_GROUP = 'jsh' } steps { - sh 'build/new-jenkins/frontend/tests-karma.sh' + sh 'build/new-jenkins/js/tests-karma.sh' } } } @@ -122,7 +119,7 @@ pipeline { } post { cleanup { - cleanupDocker() + sh 'build/new-jenkins/docker-cleanup.sh' } } } diff --git a/build/new-jenkins/docker-cleanup.sh b/build/new-jenkins/docker-cleanup.sh index a9450c70e0c..43e82e1a3a6 100755 --- a/build/new-jenkins/docker-cleanup.sh +++ b/build/new-jenkins/docker-cleanup.sh @@ -10,7 +10,7 @@ docker-compose stop && docker-compose down --volumes --remove-orphans --rmi all # remove all containers docker rm --force --volumes $(docker ps --all --quiet) || true -# delete all containers +# delete all images docker rmi -f $(docker images --all --quiet) || true # remove any extra networks (errors saying unable to remove is ok) diff --git a/build/new-jenkins/frontend/Dockerfile-karma b/build/new-jenkins/js/Dockerfile-karma similarity index 100% rename from build/new-jenkins/frontend/Dockerfile-karma rename to build/new-jenkins/js/Dockerfile-karma diff --git a/build/new-jenkins/frontend/tests-jest.sh b/build/new-jenkins/js/tests-jest.sh similarity index 100% rename from build/new-jenkins/frontend/tests-jest.sh rename to build/new-jenkins/js/tests-jest.sh diff --git a/build/new-jenkins/frontend/tests-karma.sh b/build/new-jenkins/js/tests-karma.sh similarity index 100% rename from build/new-jenkins/frontend/tests-karma.sh rename to build/new-jenkins/js/tests-karma.sh diff --git a/build/new-jenkins/frontend/tests-packages.sh b/build/new-jenkins/js/tests-packages.sh similarity index 100% rename from build/new-jenkins/frontend/tests-packages.sh rename to build/new-jenkins/js/tests-packages.sh diff --git a/docker-compose.new-jenkins-karma.yml b/docker-compose.new-jenkins-karma.yml index 6e9430b2daf..f2b3fd06aaa 100644 --- a/docker-compose.new-jenkins-karma.yml +++ b/docker-compose.new-jenkins-karma.yml @@ -5,6 +5,6 @@ services: - JSPEC_GROUP build: context: . - dockerfile: ./build/new-jenkins/frontend/Dockerfile-karma + dockerfile: ./build/new-jenkins/js/Dockerfile-karma args: image_name: $PATCHSET_TAG