Skip to content

Commit 6827d02

Browse files
authored
actions: use github actions (#194)
1 parent 0cb3147 commit 6827d02

File tree

6 files changed

+76
-221
lines changed

6 files changed

+76
-221
lines changed

.ci/jobs/defaults.yml

-59
This file was deleted.

.ci/jobs/ecs-logging-java-mbp.yml

-5
This file was deleted.

.github/workflows/test-reporter.yml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
## Workflow to process the JUnit test results and add a report to the checks.
3+
name: Test Report
4+
on:
5+
workflow_run:
6+
workflows:
7+
- test
8+
types:
9+
- completed
10+
11+
jobs:
12+
report:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: elastic/apm-pipeline-library/.github/actions/test-report@current
16+
with:
17+
artifact: test-results # artifact name
18+
name: JUnit Tests # Name of the check run which will be created
19+
path: "**/*.xml" # Path to test results (inside artifact .zip)
20+
reporter: java-junit # Format of test results

.github/workflows/test.yml

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: test
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
paths-ignore: [ '*.md', '*.asciidoc' ]
7+
pull_request:
8+
branches: [ "main" ]
9+
paths-ignore: [ '*.md', '*.asciidoc' ]
10+
11+
permissions:
12+
contents: read
13+
14+
env:
15+
MAVEN_CONFIG: "-V -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -Dhttps.protocols=TLSv1.2 -Dmaven.wagon.http.retryHandler.count=3 -Dmaven.wagon.httpconnectionManager.ttlSeconds=25"
16+
JAVA_VERSION: 11
17+
JAVA_DIST: adopt
18+
19+
jobs:
20+
21+
pre-commit:
22+
name: Run pre-commit
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: elastic/apm-pipeline-library/.github/actions/pre-commit@current
26+
27+
goals:
28+
runs-on: ubuntu-latest
29+
timeout-minutes: 5
30+
strategy:
31+
matrix:
32+
goal:
33+
- 'clean install -DskipTests=true -Dmaven.javadoc.skip=true license:aggregate-third-party-report -Dlicense.excludedGroups=^co.elastic.'
34+
- 'test'
35+
- 'compile javadoc:javadoc'
36+
fail-fast: false
37+
steps:
38+
- uses: actions/checkout@v3
39+
- uses: actions/setup-java@v3
40+
with:
41+
java-version: ${{ env.JAVA_VERSION }}
42+
distribution: ${{ env.JAVA_DIST }}
43+
cache: 'maven'
44+
- run: ./mvnw ${{ matrix.goal }}
45+
- name: Store test results
46+
if: ${{ matrix.goal == 'test' }} && (success() || failure())
47+
uses: actions/upload-artifact@v3
48+
with:
49+
name: test-results
50+
path: '**/target/surefire-reports'
51+
- uses: actions/upload-artifact@v3
52+
if: contains(${{ matrix.goal }}, 'license')
53+
with:
54+
name: license-report
55+
path: target/site/aggregate-third-party-report.html

.pre-commit-config.yaml

+1-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ repos:
66
- id: check-executables-have-shebangs
77
- id: check-merge-conflict
88

9-
- repo: git@github.com:elastic/apm-pipeline-library
9+
- repo: https://github.com/elastic/apm-pipeline-library
1010
rev: current
1111
hooks:
1212
- id: check-bash-syntax
13-
- id: check-jenkins-pipelines
14-
- id: check-jjbb

Jenkinsfile

-154
This file was deleted.

0 commit comments

Comments
 (0)