This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# This script is used to control a USB Traffic Light from Cleware. You can buy | |
# the USB Traffic Light from this shop: http://www.cleware-shop.de | |
# | |
# The script uses the REST API and can be used for newer versions of Jenkins that provide a REST API. | |
# | |
# Requirements: | |
# | |
# The Cleware USB Traffic Light comes with a control software that you can |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import groovy.sql.Sql | |
import java.util.Date | |
import java.text.SimpleDateFormat | |
/* | |
* THIS IS AN EXAMPLE SNIPPET. FOR MORE DETAILS SEE THE FOLLOWING BLOG ARTICLE: | |
* https://blog.codecentric.de/en/?p=30502 | |
* | |
* This Jenkins Job DSL Groovy Script creates Continuous Integration (CI) Jobs | |
* for all Maven & Ant projects that exist on a GitLab Server. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
job('jersey-rest-server') { | |
scm { | |
git { | |
remote { | |
url('[email protected]:marcelbirkner/jersey-rest-server.git') | |
} | |
createTag(false) | |
} | |
} | |
triggers { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// GitLab Settings | |
def gitUrl = 'http://git/api/v3' | |
def privateToken = 'xYxYxYxYxYxYxYxYxYxY' | |
def currentPage = 1 | |
def projectsPerPage = 100 | |
// Reading projects from GitLab REST API | |
def projectList = new URL("${gitUrl}/projects/all?page=${currentPage}&per_page=${projectsPerPage}&private_token=${privateToken}") | |
def projects = new groovy.json.JsonSlurper().parse(projectList.newReader()) | |
projects.each { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import groovy.sql.Sql | |
// Oracle DB Settings | |
def dbSchema = ‘schema’ | |
def dbServer = ‘oracleserver’ | |
def dbUser = ‘user’ | |
def dbPassword = 'password' | |
def dbDriver = 'oracle.jdbc.driver.OracleDriver' | |
def dbUrl = 'jdbc:oracle:thin:@' + dbServer + ':' + dbSchema | |
sql = Sql.newInstance( dbUrl, dbUser, dbPassword, dbDriver ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import groovy.sql.Sql | |
// MySQL DB Settings | |
def dbSchema = ‘schema’ | |
def dbServer = ‘mysqlserver’ | |
def dbUser = ‘user’ | |
def dbPassword = 'password' | |
def dbDriver = 'com.mysql.jdbc.Driver' | |
def dbUrl = 'jdbc:mysql:@' + dbServer + ':' + dbSchema | |
sql = Sql.newInstance( dbUrl, dbUser, dbPassword, dbDriver ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
git clone [email protected]:marcelbirkner/docker-jenkins-job-dsl.git | |
cd docker-jenkins-job-dsl | |
docker build -t docker-jenkins-job-dsl . | |
docker run -p=8080:8080 docker-jenkins-job-dsl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone [email protected]:marcelbirkner/docker-ci-tool-stack.git | |
cd docker-ci-tool-stack | |
docker-compose up |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nexus: | |
build: ./nexus | |
ports: | |
- "18081:8081" | |
jenkins: | |
build: ./jenkins | |
ports: | |
- "18080:8080" | |
links: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~$ docker-machine ls | |
NAME ACTIVE DRIVER STATE URL SWARM | |
default virtualbox Stopped | |
~$ docker-machine stop default |
OlderNewer