Springboot application with hibernate and c3P0 connection pooling

Just another playground example. This time it demonstrates the usage of c3P0 for hibernate database environments e.g. for connection pooling. As this is a very basic example, there will be only a reduced UserController that listens on http://: in order to insert that name via hibernate into the database.
Weiterlesen

Jenkins logging directly to MySQL database

There are cases if you like to send the log output from Jenkins directly to a database for better querying or just as a step for further processing them.

As Jenkins is not really admin-friendly with redirecting logs, we have to use the „init.d“ feature of Jenkins (https://wiki.jenkins-ci.org/display/JENKINS/Configuring+Jenkins+upon+start+up). Thus you can simply put an init.groovy file into the jenkins home directory. In this init file you can do a lot of stuff like setting some variables, disabling the sending of usage statistics and so on. And you can hook into the LogManager of Jenkins: https://wiki.jenkins-ci.org/display/JENKINS/Logging Weiterlesen

Set build description of Jenkins-build via curl

JENKINS_BASE_URL="http://localhost:8080"
JENKINS_JOBNAME="testjob_A"
JENKINS_JOB_BUILDNUMBER="74"
JENKINS_BUILD_DESCRIPTION="a real great description, e.g. some workflow id of the invoking system."

BUILD_URL="${JENKINS_BASE_URL}/job/${JENKINS_JOBNAME}/${JENKINS_JOB_BUILDNUMBER}/submitDescription"

curl -X POST "${BUILD_URL}" --data-urlencode description="${JENKINS_BUILD_DESCRIPTION}" --data-urlencode "Submit=Submit"

Keep your buildsystem clean: builds inside docker containers

As Build-Engineer you might know those days when dev-team „A“ comes to you with „Hey, let’s try this new fance version of SBT“ while dev-team B says „No, we really need this ant in exactly this version with that configuration and plugins“ and dev-team C mentions „Well, we have this build script in Python that was developed years ago and nobody knows really how it works“. So you start with poluting your Jenkins-instance with a lot of more or less well known build tools. Time comes and you are faced with possibly outdated tools or with tools/scripts you don’t know enough to efficiently help these guys with problems, so you need to let devs configure the build tools on your build machine. Normally this doesn’t lead to better maintainability of your sysytem…
Weiterlesen