Deploy

  • env0 - looks too pricey
  • Jenkins
    • Get admin password
      docker exec jenkins cat /var/jenkins_home/secrets/initialAdminPassword
    • Remove old jobs
      import hudson.model.*
      
      for(item in Hudson.instance.items) {
          if (!item.isBuilding()) {
              println("Deleting old builds of job " + item.name)
              for (build in item.getBuilds()) {
                  //delete all except the last
                  if (build.getNumber() < item.getLastBuild().getNumber()) {
                      println "delete " + build
                      try {
                          build.delete()
                      } catch (Exception e) {
                          println e
                      }
                  }
              }
          } else {
              println("Skipping job " + item.name + ", currently building")
          }
      }
      
    • Remove workspaces
      import hudson.model.*
      // For each project
      for(item in Hudson.instance.items) {
        // check that job is not building
        if(!item.isBuilding()) {
          println("Wiping out workspace of job "+item.name)
          item.doDoWipeOutWorkspace()
        }
        else {
          println("Skipping job "+item.name+", currently building")
        }
      }
  • RunConfig
    • run-config.sh - used in dn2k days
    • See /Volumes/Passport/dev/dn2k/backups/all-bit-bucket/dn2k-configuration

Chef

Puppet labs