add non frontend linters to new jenkins build
fixes: CCI-37 Test-Plan: look at the build logs and ensure the linters run Change-Id: I6abed7e07296e72d5ddfea4356e98184c0a8d698 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/215975 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Tested-by: Jenkins Reviewed-by: James Butters <jbutters@instructure.com> Reviewed-by: S. Jacob Powell <spowell@instructure.com> QA-Review: S. Jacob Powell <spowell@instructure.com> Product-Review: Rex Fleischer <rfleischer@instructure.com>
This commit is contained in:
parent
eff293770c
commit
f3e0163d9f
|
@ -108,7 +108,7 @@ pipeline {
|
|||
stage('Print Env Variables') {
|
||||
steps {
|
||||
timeout(time: 20, unit: 'SECONDS') {
|
||||
sh 'printenv | sort'
|
||||
sh 'printenv | sort'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -226,6 +226,18 @@ pipeline {
|
|||
}
|
||||
}
|
||||
|
||||
stage('Linters') {
|
||||
steps {
|
||||
skipIfPreviouslySuccessful("linters") {
|
||||
build(
|
||||
job: 'test-suites/linters',
|
||||
propagate: false,
|
||||
parameters: build_parameters
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Vendored Gems') {
|
||||
steps {
|
||||
skipIfPreviouslySuccessful("vendored-gems") {
|
||||
|
@ -304,17 +316,6 @@ pipeline {
|
|||
* }
|
||||
* }
|
||||
*
|
||||
* stage('Linters') {
|
||||
* steps {
|
||||
* skipIfPreviouslySuccessful("linters") {
|
||||
* build(
|
||||
* job: 'test-suites/linters',
|
||||
* parameters: build_parameters
|
||||
* )
|
||||
* }
|
||||
* }
|
||||
* }
|
||||
*
|
||||
* stage('Xbrowser') {
|
||||
* steps {
|
||||
* skipIfPreviouslySuccessful("xbrowser") {
|
||||
|
|
|
@ -26,11 +26,19 @@ pipeline {
|
|||
|
||||
environment {
|
||||
COMPOSE_FILE = 'docker-compose.new-jenkins-web.yml'
|
||||
|
||||
// 'refs/changes/63/181863/8' -> '63.181863.8'
|
||||
NAME = "${env.GERRIT_REFSPEC}".minus('refs/changes/').replaceAll('/','.')
|
||||
PATCHSET_TAG = "$DOCKER_REGISTRY_FQDN/jenkins/canvas-lms:$NAME"
|
||||
}
|
||||
stages {
|
||||
stage('Print Env Variables') {
|
||||
steps {
|
||||
timeout(time: 20, unit: 'SECONDS') {
|
||||
sh 'printenv | sort'
|
||||
}
|
||||
}
|
||||
}
|
||||
// this is here because someone forgot to add the post cleanup in this build.
|
||||
// remove this after it runs for a little bit.
|
||||
stage('temp-cleanup') {
|
||||
|
@ -38,19 +46,49 @@ pipeline {
|
|||
sh 'build/new-jenkins/docker-cleanup.sh'
|
||||
}
|
||||
}
|
||||
stage('ESLint - JSX') {
|
||||
steps {
|
||||
sh 'build/new-jenkins/frontend/linter-eslint.sh'
|
||||
}
|
||||
}
|
||||
stage('Stylelint') {
|
||||
steps {
|
||||
sh 'build/new-jenkins/frontend/linter-stylelint.sh'
|
||||
}
|
||||
}
|
||||
stage('XSSLint') {
|
||||
steps {
|
||||
sh 'build/new-jenkins/frontend/linter-xss.sh'
|
||||
|
||||
stage("All Linters") {
|
||||
parallel {
|
||||
stage('rlint') {
|
||||
steps {
|
||||
sh 'build/new-jenkins/linters/run-rlint.sh'
|
||||
}
|
||||
}
|
||||
stage('brakeman') {
|
||||
steps {
|
||||
sh 'build/new-jenkins/linters/run-brakeman.sh'
|
||||
}
|
||||
}
|
||||
stage('master bouncer') {
|
||||
steps {
|
||||
sh 'build/new-jenkins/linters/run-master-bouncer.sh'
|
||||
}
|
||||
}
|
||||
stage('commit message') {
|
||||
steps {
|
||||
sh 'build/new-jenkins/linters/run-commit-message.sh'
|
||||
}
|
||||
}
|
||||
stage('tatl tael') {
|
||||
steps {
|
||||
sh 'build/new-jenkins/linters/run-tatl-tael.sh'
|
||||
}
|
||||
}
|
||||
stage('ESLint - JSX') {
|
||||
steps {
|
||||
sh 'build/new-jenkins/linters/run-eslint.sh'
|
||||
}
|
||||
}
|
||||
stage('Stylelint') {
|
||||
steps {
|
||||
sh 'build/new-jenkins/linters/run-stylelint.sh'
|
||||
}
|
||||
}
|
||||
stage('XSSLint') {
|
||||
steps {
|
||||
sh 'build/new-jenkins/linters/run-xss.sh'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,9 +11,14 @@ docker rm --force --volumes $(docker ps --all --quiet)
|
|||
# delete all containers
|
||||
docker rmi -f $(docker images --all --quiet)
|
||||
|
||||
# remove any extra networks (errors saying unable to remove is ok)
|
||||
docker network rm $(docker network ls | grep "bridge" | awk '/ / { print $1 }')
|
||||
|
||||
echo "running docker images"
|
||||
docker ps -a
|
||||
echo "images locally"
|
||||
docker images -a
|
||||
echo "volumes left over"
|
||||
docker volume ls
|
||||
echo "networks left over"
|
||||
docker network ls
|
|
@ -1,5 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
export COMPOSE_FILE=./docker-compose.new-jenkins-web.yml
|
||||
|
||||
docker-compose run --name linter-eslint web bundle exec ruby script/eslint
|
|
@ -1,5 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
export COMPOSE_FILE=./docker-compose.new-jenkins-web.yml
|
||||
|
||||
docker-compose run --name linter-stylelint web bundle exec ruby script/stylelint
|
|
@ -1,5 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
export COMPOSE_FILE=./docker-compose.new-jenkins-web.yml
|
||||
|
||||
docker-compose run --name linter-xsslint web bundle exec gergich capture custom:./build/gergich/xsslint:Gergich::XSSLint "node script/xsslint.js"
|
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
docker-compose --file $WORKSPACE/docker-compose.new-jenkins-web.yml \
|
||||
run --name linter-brakeman --rm web bundle exec ruby script/brakeman
|
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
docker-compose --file $WORKSPACE/docker-compose.new-jenkins-web.yml \
|
||||
run --name linter-commit-message --rm web bundle exec ruby script/lint_commit_message
|
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
docker-compose --file $WORKSPACE/docker-compose.new-jenkins-web.yml \
|
||||
run --name linter-eslint --rm web bundle exec ruby script/eslint
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
if [[ -z "${MASTER_BOUNCER_KEY}" ]]; then
|
||||
echo "MASTER_BOUNCER_KEY not set. cannot run master_bouncer check"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
docker-compose --file $WORKSPACE/docker-compose.new-jenkins-web.yml \
|
||||
run --name linter-master-bouncer --rm web bundle exec master_bouncer
|
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
docker-compose --file $WORKSPACE/docker-compose.new-jenkins-web.yml \
|
||||
run --name linter-rlint --rm web bundle exec ruby script/rlint
|
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
docker-compose --file $WORKSPACE/docker-compose.new-jenkins-web.yml \
|
||||
run --name linter-stylelint --rm web bundle exec ruby script/stylelint
|
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
docker-compose --file $WORKSPACE/docker-compose.new-jenkins-web.yml \
|
||||
run --name linter-tatl-tael --rm web bundle exec ruby script/tatl_tael
|
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
docker-compose --file $WORKSPACE/docker-compose.new-jenkins-web.yml \
|
||||
run --name linter-xsslint --rm web \
|
||||
bundle exec gergich capture custom:./build/gergich/xsslint:Gergich::XSSLint "node script/xsslint.js"
|
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
printenv | sort
|
||||
|
||||
docker run --volume $WORKSPACE/containertmp:/tmp/ \
|
||||
--volume $WORKSPACE/.git:/usr/src/app/.git \
|
||||
--env GERRIT_PATCHSET_REVISION=$GERRIT_PATCHSET_REVISION \
|
||||
--env GERRIT_CHANGE_ID=$GERRIT_CHANGE_ID \
|
||||
--env GERRIT_PROJECT=$GERRIT_PROJECT \
|
||||
--env GERRIT_BRANCH=$GERRIT_BRANCH \
|
||||
$PATCHSET_TAG gergich citest
|
Loading…
Reference in New Issue