Skip to content

Commit ce736a2

Browse files
Merge pull request #45 from reportportal/feature/EPMRPP-109184
Implemented reusable s3 artifact plugin worflow into build.yml
2 parents f7de1a6 + 9bee4c9 commit ce736a2

File tree

2 files changed

+31
-9
lines changed

2 files changed

+31
-9
lines changed

.github/workflows/build.yml

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Build
22

33
on:
4+
workflow_dispatch:
45
pull_request:
56
push:
67
branches:
@@ -11,17 +12,23 @@ on:
1112
- README.md
1213
- gradle.properties
1314

15+
permissions:
16+
id-token: write
17+
contents: read
18+
actions: read
19+
1420
jobs:
1521
build:
1622
runs-on: ubuntu-latest
23+
1724
steps:
1825
- name: Checkout repository
19-
uses: actions/checkout@v2
26+
uses: actions/checkout@v5
2027

2128
- name: Set up JDK 21
22-
uses: actions/setup-java@v2
29+
uses: actions/setup-java@v4
2330
with:
24-
distribution: 'adopt'
31+
distribution: 'temurin'
2532
java-version: '21'
2633

2734
- name: Grant execute permission for gradlew
@@ -35,6 +42,21 @@ jobs:
3542
token: ${{ secrets.GITHUB_TOKEN }}
3643

3744
- name: Build with Gradle
38-
id: build
39-
run: |
40-
./gradlew build
45+
run: ./gradlew build --stacktrace
46+
47+
- name: Upload built jars
48+
uses: actions/upload-artifact@v4
49+
with:
50+
name: build-libs
51+
path: build/libs/*.jar
52+
retention-days: 1
53+
54+
upload:
55+
needs: build
56+
if: github.ref_name == 'develop' || startsWith(github.ref_name, 'feature/')
57+
uses: reportportal/.github/.github/workflows/upload-plugin-artifact.yaml@main
58+
with:
59+
plugin_name: ${{ github.event.repository.name }}
60+
branch_name: ${{ github.ref_name }}
61+
run_number: "${{ github.run_number }}"
62+
secrets: inherit

build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ dependencies {
3636
implementation 'com.epam.reportportal:plugin-api'
3737
annotationProcessor 'com.epam.reportportal:plugin-api'
3838
} else {
39-
implementation 'com.github.reportportal:commons-dao:9b8b695'
40-
implementation 'com.github.reportportal:plugin-api:f59b724'
41-
annotationProcessor 'com.github.reportportal:plugin-api:f59b724'
39+
implementation 'com.github.reportportal:commons-dao:develop-SNAPSHOT'
40+
implementation 'com.github.reportportal:plugin-api:develop-SNAPSHOT'
41+
annotationProcessor 'com.github.reportportal:plugin-api:develop-SNAPSHOT'
4242
}
4343

4444
// add lombok support

0 commit comments

Comments
 (0)