From d987166bf6f06b0e669b9aaef9c0c5af577b0853 Mon Sep 17 00:00:00 2001 From: Brett Benassi Date: Tue, 5 Feb 2019 11:36:37 -0700 Subject: [PATCH] removing travis and jenkins as build tools --- .kitchen.yml | 1 + .travis.yml | 55 ------------------------- Jenkinsfile | 114 --------------------------------------------------- 3 files changed, 1 insertion(+), 169 deletions(-) delete mode 100644 .travis.yml delete mode 100644 Jenkinsfile diff --git a/.kitchen.yml b/.kitchen.yml index f5d4a2c..71a43d1 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -8,6 +8,7 @@ driver: cap_add: - sys_admin disable_upstart: false + use_internal_docker_network: true provisioner: name: salt_solo diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 7232546..0000000 --- a/.travis.yml +++ /dev/null @@ -1,55 +0,0 @@ -language: ruby - -services: - - docker - -addons: - apt: - packages: - - curl - - git - - shellcheck - - python-pip - -rvm: - - ruby - -env: - matrix: - - PLATFORM=fedora - - PLATFORM=centos-7 - - PLATFORM=centos-6 - - PLATFORM=amazon-1 - - PLATFORM=amazon-2 - - PLATFORM=ubuntu-1804 - - PLATFORM=ubuntu-1604 - - PLATFORM=ubuntu-1404 - - PLATFORM=debian-8 - - PLATFORM=debian-9 - - PLATFORM=arch - - PLATFORM=opensuse - -matrix: - allow_failures: - - env: PLATFORM=ubuntu-1804 - - env: PLATFORM=ubuntu-1604 - - env: PLATFORM=debian-8 - - env: PLATFORM=debian-9 - - env: PLATFORM=centos-6 - -sudo: true -dist: trusty - -before_install: - - pip install --user -r tests/requirements.txt - -script: - # Check shell scripts - - shellcheck -s sh -f checkstyle bootstrap-salt.sh - # Run test-kitchen with docker driver: - - bundle exec kitchen create -l warn -c 6 "$PLATFORM" - - bundle exec kitchen verify "$PLATFORM" - -after_script: - - bundle exec kitchen list $PLATFORM - - bundle exec kitchen destroy "$PLATFORM" diff --git a/Jenkinsfile b/Jenkinsfile deleted file mode 100644 index b135966..0000000 --- a/Jenkinsfile +++ /dev/null @@ -1,114 +0,0 @@ -import java.util.Random - -Random rand = new Random() - -// ONLY CHANGE THIS BIT PLEASE -def baseDistros = ["debian8", - "suse", - "centos6", - "arch", - "ubuntu-14.04", - "ubuntu-18.04", - "windows", - ] -def versions = ["stable", "git", "stable-old"] - -def basePrDistros = ["ubuntu-16.04", - "centos7"] - -def prVersions = ["stable", "git"] - -// You probably shouldn't be messing with this stuff down here - -def distros = (baseDistros + basePrDistros).unique() - -def notifySuccessful(String stageName) { - slackSend (color: '#00FF00', message: "SUCCESSFUL: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})" + "\n Stage -- " + stageName) -} - -def notifyFailed(String stageName) { - slackSend (color: '#FF0000', message: "FAILED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})" + "\n Stage -- " + stageName) -} - -def runKitchen(String distro) { - echo "kitchen create ${distro}" - echo "kitchen converge ${distro}" - echo "kitchen destroy ${distro}" -} - -def distroversions = [] -for (d in distros) { - for (v in versions) { - distroversions = distroversions + ["${d}-${v}"] - } -} - -def prDistros = (basePrDistros + distros[rand.nextInt(baseDistros.size())]).unique() - -def prDistroversions = [] -for (d in prDistros) { - for (v in prVersions) { - prDistroversions = prDistroversions + ["${d}-${v}"] - } -} - -def makeSetupRuns(dv) { - return { - node { - runKitchen("${dv}") - } - } -} - -def setupRuns = distroversions.collectEntries { - ["kitchen-${it}" : makeSetupRuns("${it}")] -} - -def prSetupRuns = prDistroversions.collectEntries { - ["kitchen-${it}" : makeSetupRuns("${it}")] -} - -node ('bootstrap') { - timestamps { - ansiColor('xterm') { - stage('checkout') { checkout scm } - stage('shellcheck') { - sh 'stack exec -- shellcheck -s sh -f checkstyle bootstrap-salt.sh | tee checkstyle.xml' - checkstyle canComputeNew: false, defaultEncoding: '', healthy: '', pattern: '**/checkstyle.xml', unHealthy: '', unstableTotalAll: '0' - archiveArtifacts artifacts: '**/checkstyle.xml' - } - // if (env.CHANGE_ID) { - // // Running for a PR only runs against 4 random distros from a shorter list - // stage('kitchen-pr') { - // parallel prSetupRuns - // } - // } else { - // // If we're not running for a pr we run *everything* - // stage('kitchen-all') { - // parallel setupRuns - // } - // } - } - } -} - -/* - * TODO: - * 1. Tests for each supported distro in bootstrap + branch shellcheck test (Shellcheck should be done) - * 2. Each distro needs a "stable" install (installs stable packages from our repo) and a "git" install (installs off of a git tag) - * 3. Running against each branch (stable, develop) - * 4. And probably a small subset against each pull request (similar to what we do in salt) - * - * Distros to check: - * Debian 8 - * Suse 42.1 - * CentOS 7 - * CentOS 6 - * Arch - * Ubuntu 16.04 - * Ubuntu 14.04 - * Windows - * - * Runs each against develop and stable - * - */