Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade to more recent Jenkins core version #482

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

name: GitHub CI

on: [push, pull_request]

jobs:
build:

strategy:
matrix:
os: [ubuntu-latest,windows-latest, macOS-latest]
java: [8, 11]
fail-fast: false

runs-on: ${{ matrix.os }}

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set up cache for ~./m2/repository
uses: actions/cache@v1
with:
path: ~/.m2/repository
key: maven-${{ matrix.os }}-java${{ matrix.java }}-${{ hashFiles('**/pom.xml') }}
restore-keys: |
maven-${{ matrix.os }}-java${{ matrix.java }}-
maven-${{ matrix.os }}-

- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}

- name: Build with Maven
run: mvn verify -e -B -V
37 changes: 31 additions & 6 deletions jenkins-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,6 @@
<artifactId>dom4j</artifactId>
</dependency>

<dependency>
<groupId>org.jvnet.hudson</groupId>
<artifactId>xstream</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>net.sf.json-lib</groupId>
<artifactId>json-lib</artifactId>
Expand Down Expand Up @@ -87,6 +81,19 @@
</dependency>

<!-- Testing -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>jenkins-core</artifactId>
<version>${jenkins-version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Expand Down Expand Up @@ -163,6 +170,24 @@
</plugins>
</build>
</profile>
<profile>
<id>java9+</id>
<activation>
<jdk>[9,)</jdk>
</activation>
<dependencies>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.1</version>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<version>2.3.1</version>
</dependency>
</dependencies>
</profile>
</profiles>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import javax.xml.bind.JAXBException;
import java.io.IOException;
import java.net.URISyntaxException;
import java.util.Objects;

import static org.junit.Assert.assertTrue;

Expand Down
35 changes: 35 additions & 0 deletions jenkins-client/src/test/resources/log4j2-test.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration>
<ThresholdFilter level="debug"/>

<Appenders>
<RollingFile
name="RollingFile"
fileName="target/test-app.log"
filePattern="target/test-$${date:yyyy-MM}/test-app-%d{MM-dd-yyyy}-%i.log.gz">
<PatternLayout>
<Pattern>%d %p %c{1.} [%t] %m%n</Pattern>
</PatternLayout>
<Policies>
<TimeBasedTriggeringPolicy/>
<SizeBasedTriggeringPolicy size="250 MB"/>
</Policies>
</RollingFile>

<Console name="console" target="SYSTEM_ERR">
<PatternLayout>
<Pattern>%d{yyyy-MM-dd HH:mm:ss} %-5p %c:%L - %m%n</Pattern>
</PatternLayout>
</Console>

</Appenders>

<Loggers>
<Root level="info">
<!-- <AppenderRef ref="RollingFile"/>-->
<AppenderRef ref="console"/>
</Root>
<Logger name="fqcn" level="debug"/>
</Loggers>

</Configuration>
16 changes: 7 additions & 9 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,10 @@
<asciidoctor-maven-plugin.version>2.0.0</asciidoctor-maven-plugin.version>

<!-- Version of Jenkins to use for Integration Tests -->
<jenkins-version>1.644</jenkins-version>
<jenkins-version>2.222.4</jenkins-version>
<junit.version>4.12</junit.version>
<mockito-core.version>3.0.0</mockito-core.version>
<commons-io.version>2.4</commons-io.version>
<xstream.version>1.4.7-jenkins-1</xstream.version>
<commons-lang.version>3.9</commons-lang.version>
<json-lib.version>2.4</json-lib.version>
<httpclient.version>4.5.8</httpclient.version>
Expand Down Expand Up @@ -110,10 +109,9 @@
</dependency>

<dependency>
<groupId>org.jvnet.hudson</groupId>
<artifactId>xstream</artifactId>
<version>${xstream.version}</version>
<scope>test</scope>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>jenkins-core</artifactId>
<version>${jenkins-version}</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -188,7 +186,7 @@
<dependency>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>jenkins-test-harness</artifactId>
<version>${jenkins-version}</version>
<version>2.71</version>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
Expand All @@ -199,12 +197,12 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.25</version>
<version>1.7.30</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-bom</artifactId>
<version>2.12.1</version>
<version>2.14.0</version>
<scope>import</scope>
<type>pom</type>
</dependency>
Expand Down