GitHub Release Pipeline for Java

Goals Set up Maven build pipeline for a Java 11 app Release Maven artifact on GitHub using GitHub actions Setup Maven Assuming that we have a project named sample-app released for my hascode GitHub account: We’re adding some release information to our project’s pom.xml: pom.xml <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.hascode</groupId> <artifactId>sample-app</artifactId> <version>1.0.0-SNAPSHOT</version>bookmark-manager <name>sample-app</name> <description>hasCode.com Bookmark Manager</description> <scm> <developerConnection>scm:git:https://github.com/hascode/sample-app.git </developerConnection> </scm> <distributionManagement> <repository> <id>github</id> <name>GitHub</name> <url>https://maven.pkg.github.com/hascode/sample-app</url> </repository> </distributionManagement> <properties> <java.version>11</java.version> <project.scm.id>github</project.scm.id> </properties> [..] </project> ...

May 14, 2021 · 2 min · 398 words · Micha Kops

Whitesource Snippets

Whitesource Configuration for GitLab Pipeline The following configuration derives values from predefined GitLab Variables whitesource.conf # Providing project information from GitLab CI wss_project_name="$CI_PROJECT_NAME" wss_project_version="$CI_JOB_ID" wss_project_tag="$CI_COMMIT_TAG" # Providing product information wss_product_name="The Product Name" wss_product_version="$POM_VERSION" # Analyze the Maven POM and its transitive dependencies only, no file-system check # Use this only if you don't have any extra checked in jar-files or stuff like that! fileSystemScan=false includes=pom.xml # Only scanning the Maven project resolveAllDependencies=false maven.resolveDependencies=true ...

November 11, 2018 · 1 min · 89 words · Micha Kops

Continuous Delivery with GitHub Cloud and GitHub Pipelines

Atlassian has added a continuous integration service as a new feature to their GitHub Cloud product. It’s called GitHub Pipelines and it is similar to Travis CI for GitHub offering a nice integration for continuous integration/delivery pipelines for projects hosted on GitHub. It’s still in the beta phase and requires a sign-up but nevertheless I’d like to demonstrate the current state of this service and how easy it is to add scripted pipelines to a project. ...

July 1, 2016 · 4 min · 760 words · Micha Kops

Unix-like data pipelines with Java 8 Streams and UStream

We all love the simplicity when chaining commands and pipes in an Unix derivative environment. UStream takes this approach and extends Java 8′s stream API to mimic some of the well known commands and apply them on streams. In the following tutorial, I’d like to share some slim examples for using UStream. Figure 1. Data pipelines with UStream Dependencies We simply need to add one dependency to our pom.xml (using Maven): io.github.benas:ustream:0.2 ...

November 8, 2015 · 4 min · 659 words · Micha Kops

GitLab Snippets

Generate AsciiDoc Documentation and Publish it with GitLab Pages We setup a repository and add a directory named docs there .. this is the home of our AsciiDoc files. We’re using asciidoctor/docker-asciidoctor as Docker image for tool provisioning This is the .gitlab-ci.yml, we’re running the stage only when something in the docs directory has changed. stages: - "Build docs" # The name of the job activates the GitLab pages publication pages: image: asciidoctor/docker-asciidoctor stage: "Build docs" tags: - build script: - sh ./gen_docs.sh - mv output public only: refs: - master changes: - /docs/* artifacts: paths: - public expose_as: 'Documentation Archive' ...

March 1, 2010 · 1 min · 186 words · Micha Kops