Skip to content

Commit

Permalink
Final
Browse files Browse the repository at this point in the history
  • Loading branch information
lalitKumarHCL committed Nov 10, 2021
1 parent a470d79 commit c24552b
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: Maven Build and Release Artifact
name: Maven Main Build and Release Artifact

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build-project:
Expand All @@ -32,7 +30,7 @@ jobs:
echo ${{ steps.extract.outputs.artifact-id }}
echo ${{ steps.extract.outputs.version }}
shell: bash
- name: ${{ steps.extract.outputs.artifact-id }}-${{ steps.extract.outputs.version }}
- name: Upload Build Artifact
uses: actions/upload-artifact@v2
with:
name: ${{ steps.extract.outputs.artifact-id }}-${{ steps.extract.outputs.version }}
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/mvnPRCreated.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: Maven Pull Request Build

on:
pull_request:
branches: [ main ]

jobs:
build-project:
name: Build Artifact
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
cache: maven
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Extract GAV
id: extract
uses: andreacomo/maven-gav-extractor@v1
- name: Log GAV
run: |
echo ${{ steps.extract.outputs.group-id }}
echo ${{ steps.extract.outputs.artifact-id }}
echo ${{ steps.extract.outputs.version }}
shell: bash
- name: Upload Build Artifact
uses: actions/upload-artifact@v2
with:
name: ${{ steps.extract.outputs.artifact-id }}-${{ steps.extract.outputs.version }}
path: /home/runner/work/hcl-accelerate-plugin/hcl-accelerate-plugin/target/hcl-accelerate.hpi
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.hcl.devops</groupId>
<artifactId>hcl-accelerate</artifactId>
<version>2.1.4-SNAPSHOT</version>
<version>2.1.4</version>
<packaging>hpi</packaging>
<name>HCL Accelerate Plugin</name>
<description>This plugin can run Jenkins jobs as a part of a deployment plan in HCL Accelerate.</description>
Expand Down

0 comments on commit c24552b

Please sign in to comment.