From 9774b97f2bfccf81c435f15d711d3a784cc62ecd Mon Sep 17 00:00:00 2001
From: sephiroth-j <23166289+sephiroth-j@users.noreply.github.com>
Date: Sun, 1 Oct 2023 19:32:59 +0200
Subject: [PATCH] switch CI build to gh actions
---
.github/workflows/ci-build.yml | 42 ++++++++++++++++++++++++++++++++++
.travis.yml | 17 --------------
README.md | 2 +-
pom.xml | 4 ++--
4 files changed, 45 insertions(+), 20 deletions(-)
create mode 100644 .github/workflows/ci-build.yml
delete mode 100644 .travis.yml
diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml
new file mode 100644
index 0000000..d03f1c4
--- /dev/null
+++ b/.github/workflows/ci-build.yml
@@ -0,0 +1,42 @@
+name: CI build
+
+on:
+ push:
+ branches: [ master ]
+ pull_request:
+ branches: [ master ]
+
+jobs:
+ build:
+ strategy:
+ fail-fast: false
+ matrix:
+ java: [17, 21]
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ - name: Set up JDK ${{ matrix.java }}
+ uses: actions/setup-java@v3
+ with:
+ java-version: ${{ matrix.java }}
+ distribution: 'zulu'
+ cache: 'maven'
+ - name: check Sonar pre-conditions
+ id: check_sonar
+ continue-on-error: true
+ env:
+ SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }}
+ SONAR_ORGANIZATION: ${{ secrets.SONARCLOUD_ORGANIZATION }}
+ run: test "${SONAR_ORGANIZATION}" -a "${SONAR_TOKEN}"
+ shell: bash
+ - name: Build with Sonar
+ id: build_sonar
+ if: matrix.java == '17' && steps.check_sonar.outcome == 'success' && !startsWith(github.head_ref, 'dependabot/')
+ env:
+ SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }}
+ SONAR_ORGANIZATION: ${{ secrets.SONARCLOUD_ORGANIZATION }}
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ run: mvn -B clean test javadoc:jar site:site package verify org.sonarsource.scanner.maven:sonar-maven-plugin:3.10.0.2594:sonar -Dsonar.host.url=https://sonarcloud.io -Dsonar.projectKey=de.sephiroth-j:spring-security-ltpa2 -Dsonar.organization=$SONAR_ORGANIZATION -Dsonar.login=$SONAR_TOKEN
+ - name: Build without Sonar
+ if: steps.build_sonar.conclusion == 'skipped'
+ run: mvn -B clean test package verify
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index eea9e40..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,17 +0,0 @@
-language: java
-dist: jammy
-jdk:
- - openjdk17
-
-addons:
- sonarcloud:
- organization: "sephiroth-j-github"
- token:
- secure: "G4fIIoaWBqiBCmO72ZLtv6P1wDQRANVO9KMxGlhTW9RuvA194iklaEyHqO99ah0bspmR5LKyAdLjxDypUl0cYNDHlrK8aYPkYogJZTkyjr8oVFrMBfmm3GHcxsb8IaPgms8zBIxQ+AH2CaBWKoK40TNgvuwPe3dq966Jq7pHnHQnPJzvO74LM+tSrRkwxiuZ1gky040FepCa2m/E+8jPjWuFEFyiddbhFgqA2+UPANxf8ug/A7gS9uGfB3OBUXF/3otnalD1Q97yQUkRqjHOHwwYZRGMR6RQP/TbaP1Bf7V1Q/3Er8jwj6ue639JNdEwIV8Cr8+doWCyxrgLrac+qEupmEgq63MutoLpj+bWmULBySqYXUyGTj4nPX1l3Doe+Xm+qtsfZa9uhrAsc98gidcTkwdGX3fht9ITG6kpNB5GDh2TP1J4/kK5aNb15GjJrzyX4Avj0CvBSvxw5jo2cNVWVsN1xnZc8m9SyPEp0wGpUigZu4HLW+pjmW1FqXL2YiWF+yPyyohkZI4oxwxJI+pRLVYCDEXDZuFnasKH03uR4DpRfniwb25N+iSv8r97V/ntUapTSaFVMOk4mBnfJcbIZmTc/UaanvLwCMpQEBT/HlsAC+LerCzvwhR/2SflZbF6jHZflZVZxTLehk5G0pZPmMRrtivsH+Be0NTMQPA="
-script:
- - mvn clean test verify javadoc:jar site:site sonar:sonar
-
-# access full scm history
-# https://docs.travis-ci.com/user/sonarcloud/#accessing-full-scm-history
-git:
- depth: false
diff --git a/README.md b/README.md
index 1b65b2b..f0bfd5a 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# Spring Security LTPA2
-[![Build Status](https://app.travis-ci.com/sephiroth-j/spring-security-ltpa2-core.svg?branch=master)](https://app.travis-ci.com/github/sephiroth-j/spring-security-ltpa2-core) [![Quality Gate](https://sonarcloud.io/api/project_badges/measure?project=de.sephiroth-j%3Aspring-security-ltpa2&metric=alert_status)](https://sonarcloud.io/dashboard?id=de.sephiroth-j%3Aspring-security-ltpa2) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
+[![Build Status](https://github.com/sephiroth-j/spring-security-ltpa2-core/workflows/CI%20build/badge.svg)](https://github.com/sephiroth-j/spring-security-ltpa2-core/actions?query=workflow%3A%22CI+build%22) [![Quality Gate](https://sonarcloud.io/api/project_badges/measure?project=de.sephiroth-j%3Aspring-security-ltpa2&metric=alert_status)](https://sonarcloud.io/dashboard?id=de.sephiroth-j%3Aspring-security-ltpa2) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
Add Spring Security support for user pre-authentication using IBM Lightweight Third Party Authentication (LTPA) v2. LTPA2 tokens can be created as well to consume other LTPA2-protected services or act as an LTPA2 authentication service.
diff --git a/pom.xml b/pom.xml
index 5746f7e..ebd44bf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -14,8 +14,8 @@
https://github.com/sephiroth-j/spring-security-ltpa2-core/issues
- Travis
- https://app.travis-ci.com/github/sephiroth-j/spring-security-ltpa2-core
+ GitHub
+ https://github.com/sephiroth-j/spring-security-ltpa2-core/actions?query=workflow%3A%22CI+build%22