There are scenarios in which it’s useful to enable or disable stages in a Jenkins pipeline depending on the build status. This is about having different stages in a Jenkinsfile that will be executed depending on the `buildResult` and `stageResult` of the Jenkins pipeline and the different stages inside the Jenkins pipeline. Continue reading
Run gradle in offline mode
Sometimes it’s necessary to run `gradle` in offline mode. E.g. when having no internet connection or when you want to prevent `gradle` to download files in case you have a limited download volume. This describes how to run gradle in offline mode. Continue reading
Java Script with GraalVM – or writing software that is directly executable
This is about writing java software that does not need a JVM in order to execute it. For this the GraalVM can be used. In the end it provides a binary that is ways smaller than a full JVM and can directly be executed on the target operating system.
m for mvnw – Running maven wrapper a more convenient way
Maven wrapper is a cool tool thing for running maven
builds with the correct maven
version. This introduces a script that is already known for gradle
. Simply type m
on the command line and run the maven
wrapper. Even in case the wrapper is not in the current directory. Continue reading
Restarting cloudfoundry apps without downtime
When running an application on Cloudfoundry it’s possible to start multiple instances of an application. This might be for performance reasons, but also by means of reliability. When restarting an application the default behaviour is first stopping all instances of an application and the starting them again. This results in a small downtime when there is no running instance available. Let’s see how to improve this approach. Continue reading
Archiving websites with wget
Sometimes there is a great article, some useful information or anything else on a web site you want to preserve. When downloading the page in the browser by using something like Save as ...
this doesn’t work properly all the time. But don’t worry, there is a solution for this.
Continue reading
Tunneling socks via http/s
Nowadays many govermental authorities or network administrators think that blocking all the network traffic for security reasons is a good idea. One common approach is to block everything, but allow some traffic that is whitelisted. Thus it is not possible to do all the interesting stuff that the firewall prevents to do. But by blocking http
or https
no webserver would be available any more. So normally these ports are open and thus this is the way to go. Continue reading
Using Cloud Foundry client in Jenkins
When using Cloud Foundry on a Jenkins build server it’s possible to deploy an application with Jenkins to a Cloud Foundry instance. This is supported by the Jenkins Cloud Foundry Plugin
. But in case further Cloud Foundry actions are necessary, another solution is required. Continue reading
Determining content type with Apache Tika
About Apache Tika
The project is hosted by the Apache Software Foundation. It supports detecting various file and content types. There is a full list of supported formats. When having a look at the list that displays the supported formats, many document formats are listed in there. E.g. text/plain
, text/xml
, the propritary Microsoft OOXML or the office standard Open Document. Furthermore images (image/gif
, image/jpeg
, image/bmp
or image/tiff
), videos (video/avi
, video/mpgeg
or video/mp4
) and audios (audi/ogg
, audio/x-wav
or audio/mpeg
) can be recognized by Tika
. Even feeds (application/rss+xml
, application/atom+xml
) may be recognized. And many, many more … Continue reading
How to debug encrypted HTTP traffic
When developing software, sometime it’s necessary to sniff the traffic that is transmitted between two computer systems. For that purpose tools like wireshark or tcpdump may be useful. Wireshark is a great tool, but when handling encrypted connections it is not possible to decrypt the traffic without having the key used for encryption. When sniffing http
traffic the private key of the certificate is required to decrypt the information. But when talking to a foreign server, without having its private key another approach is necessary. Continue reading