-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Added test and package steps to Github Actions (#61)
* doc: Added ISSUE_TEMPLATE content that was missing * ci: Release workflow * release: Bumped version of project to 1.6.0
- Loading branch information
1 parent
db408b6
commit eaf29cb
Showing
20 changed files
with
355 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
name: "Bug report \U0001F41B" | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: bug | ||
assignees: '' | ||
--- | ||
|
||
[NOTE]: # ( ^^ Provide a general summary of the issue in the title above. ^^ ) | ||
|
||
## Description | ||
[NOTE]: # ( Describe the problem you're encountering. ) | ||
[TIP]: # ( Do NOT share sensitive information, whether personal, proprietary, or otherwise! ) | ||
|
||
## Expected Behavior | ||
[NOTE]: # ( Tell us what you expected to happen. ) | ||
|
||
## [NR Diag](https://docs.newrelic.com/docs/using-new-relic/cross-product-functions/troubleshooting/new-relic-diagnostics) results | ||
[NOTE]: # ( Provide any other relevant log data. ) | ||
[TIP]: # ( Scrub logs and diagnostic information for sensitive information ) | ||
|
||
## Steps to Reproduce | ||
[NOTE]: # ( Please be as specific as possible. ) | ||
[TIP]: # ( Link a sample application that demonstrates the issue. ) | ||
|
||
## Your Environment | ||
[TIP]: # ( Include as many relevant details about your environment as possible including the running version of New Relic software and any relevant configurations. ) | ||
|
||
## Additional context | ||
[TIP]: # ( Add any other context about the problem here. For example, relevant community posts or support tickets. ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
blank_issues_enabled: false | ||
contact_links: | ||
- name: Troubleshooting | ||
url: https://github.com/newrelic/nri-redis/blob/master/README.md#support | ||
about: Check out the README for troubleshooting directions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
priority: '' | ||
--- | ||
|
||
## Is your feature request related to a problem? Please describe. | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
## Feature Description | ||
A clear and concise description of the feature you want or need. | ||
|
||
## Describe Alternatives | ||
A clear and concise description of any alternative solutions or features you've considered. Are there examples you could link us to? | ||
|
||
## Additional context | ||
Add any other context here. | ||
|
||
## Priority | ||
Please help us better understand this feature request by choosing a priority from the following options: | ||
[Nice to Have, Really Want, Must Have, Blocker] |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
--- | ||
name: Prerelease pipeline | ||
|
||
on: | ||
release: | ||
types: | ||
- prereleased | ||
tags: | ||
- 'v*' | ||
|
||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GPG_MAIL: '[email protected]' # [email protected] | ||
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | ||
GPG_PRIVATE_KEY_BASE64: ${{ secrets.GPG_PRIVATE_KEY_BASE64 }} # base64 encoded | ||
PFX_CERTIFICATE_BASE64: ${{ secrets.PFX_CERTIFICATE_BASE64 }} # base64 encoded | ||
PFX_PASSPHRASE: ${{ secrets.PFX_PASSPHRASE }} | ||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | ||
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} | ||
TAG: ${{ github.event.release.tag_name }} | ||
|
||
jobs: | ||
|
||
test: | ||
name: Run tests | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Restore gradle cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.gradle/caches | ||
~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: '11' | ||
java-package: jdk | ||
- name: Build with Gradle | ||
run: ./gradlew build --info --stacktrace | ||
|
||
package-linux: | ||
name: Run Linux package task | ||
runs-on: ubuntu-18.04 | ||
needs: test | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Restore gradle cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.gradle/caches | ||
~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: '11' | ||
java-package: jdk | ||
- name: Package with Gradle | ||
run: ./gradlew package --warn --stacktrace | ||
- name: Install debsigs | ||
run: sudo apt-get install -y debsigs | ||
- name: Sign packages | ||
run: ./script/sign.sh | ||
- name: Upload release asset to GitHub Release | ||
run: script/upload_to_linux_release.sh ./build/distributions/nrjmx ${{ env.TAG }} | ||
|
||
package-windows: | ||
name: Run Windows package task | ||
runs-on: windows-2019 | ||
strategy: | ||
matrix: | ||
arch: [ amd64 ] | ||
needs: test | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Restore gradle cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.gradle/caches | ||
~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: '11' | ||
java-package: jdk | ||
- name: Build jlink code | ||
run: ./gradlew jlink --info --stacktrace | ||
- name: Get PFX certificate from GH secrets | ||
run: '[IO.File]::WriteAllBytes("wincert.pfx", [Convert]::FromBase64String($env:PFX_CERTIFICATE_BASE64))' | ||
- name: Install cert | ||
run: Import-PfxCertificate -FilePath wincert.pfx -Password (ConvertTo-SecureString -String $env:PFX_PASSPHRASE -AsPlainText -Force) -CertStoreLocation Cert:\CurrentUser\My | ||
- name: Create MSI | ||
run: ./win_build.ps1 -arch ${{ matrix.arch }} -version ${{ env.TAG }} | ||
- name: Upload release asset to GitHub Release | ||
shell: bash | ||
run: script/upload_to_release.sh ./target/msi/Release/nrjmx-${{ matrix.arch }} ${{ env.TAG }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,36 @@ | ||
--- | ||
name: Java CI - PR | ||
name: Push/PR pipeline | ||
|
||
on: [ pull_request ] | ||
on: | ||
push: | ||
branches: | ||
- '**' | ||
tags-ignore: | ||
- '**' | ||
|
||
env: | ||
GPG_MAIL: '[email protected]' # [email protected] | ||
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | ||
GPG_PRIVATE_KEY_BASE64: ${{ secrets.GPG_PRIVATE_KEY_BASE64 }} # base64 encoded | ||
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} | ||
|
||
jobs: | ||
|
||
test: | ||
runs-on: ubuntu-20.04 | ||
name: Run tests | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Restore gradle cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.gradle/caches | ||
~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v1 | ||
with: | ||
|
@@ -21,17 +40,17 @@ jobs: | |
run: ./gradlew build --info --stacktrace | ||
- name: Package with Gradle | ||
run: ./gradlew package --warn --stacktrace | ||
- name: Push bin to GH workflow artifacts cache | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: dist-linux | ||
path: build/distributions | ||
- name: Install debsigs | ||
run: sudo apt-get install -y debsigs | ||
- name: Sign packages | ||
run: ./script/sign.sh | ||
|
||
snyk: | ||
name: Run security checks via snyk | ||
runs-on: ubuntu-20.04 | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Run Snyk to check for vulnerabilities | ||
uses: snyk/actions/gradle-jdk11@master | ||
env: | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
@echo off | ||
java -jar "C:\Program Files\New Relic\nrjmx\nrjmx.jar" %* | ||
"%~dp0/bin/nrjmx.bat" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -124,28 +124,48 @@ tasks.register<Zip>("jlinkDistZip") { | |
tasks.register<Tar>("jlinkDistTar") { | ||
dependsOn(tasks.jlink, "downloadJmxTerm", "jmxtermScripts") | ||
destinationDirectory.set(file("${buildDir}/distributions")) | ||
archiveFileName.set("${project.name}-${project.version}-jlink.tar.bz2") | ||
compression = Compression.BZIP2 | ||
archiveFileName.set("${project.name}-${project.version}-jlink.tar.gz") | ||
compression = Compression.GZIP | ||
|
||
into("${project.name}-${project.version}") | ||
from("LICENSE") { | ||
into("usr/share/doc/nrjmx") | ||
} | ||
|
||
from("LICENSE") | ||
from("README.md") | ||
from("${buildDir}/image") | ||
from("README.md") { | ||
into("usr/share/doc/nrjmx") | ||
} | ||
|
||
from("${buildDir}/image") { | ||
into("usr/lib/nrjmx") | ||
} | ||
|
||
from("${buildDir}/jmxterm/lib") { | ||
include("jmxterm-uber.jar") | ||
into("lib") | ||
into("usr/lib/nrjmx/lib") | ||
} | ||
|
||
from("${buildDir}/jmxterm/bin") { | ||
into("bin") | ||
into("usr/lib/nrjmx/bin") | ||
fileMode = 0x1ED | ||
} | ||
|
||
from("src/rpm/usr/bin") { | ||
into("usr/bin") | ||
include("**") | ||
fileMode = 0x1ED | ||
} | ||
} | ||
|
||
tasks.buildDeb { | ||
dependsOn(tasks.jlink, "downloadJmxTerm", "jmxtermScripts") | ||
|
||
setRelease("1") | ||
setArch("amd64") | ||
setOs(LINUX) | ||
setVendor("New Relic Infrastructure Team <[email protected]>") | ||
setPackageGroup("Application/System") | ||
setLicense("Apache 2.0") | ||
|
||
from("${buildDir}/jmxterm") { | ||
include("lib/jmxterm-uber.jar") | ||
into("/usr/lib/${project.name}") | ||
|
@@ -168,15 +188,15 @@ tasks.buildDeb { | |
} | ||
|
||
tasks.buildRpm { | ||
dependsOn(tasks.jlink, "downloadJmxTerm", "jmxtermScripts") | ||
|
||
setRelease("1") | ||
setArch(X86_64) | ||
setOs(LINUX) | ||
setVendor("New Relic Infrastructure Team <[email protected]>") | ||
setPackageGroup("Application/System") | ||
setLicense("Apache 2.0") | ||
|
||
dependsOn(tasks.jlink, "downloadJmxTerm", "jmxtermScripts") | ||
|
||
from("${buildDir}/jmxterm") { | ||
include("lib/jmxterm-uber.jar") | ||
into("/usr/lib/${project.name}") | ||
|
@@ -210,8 +230,8 @@ tasks.distZip { | |
|
||
tasks.distTar { | ||
dependsOn("downloadJmxTerm", "jmxtermScripts") | ||
archiveExtension.set("tar.bz2") | ||
compression = Compression.BZIP2 | ||
archiveExtension.set("tar.gz") | ||
compression = Compression.GZIP | ||
|
||
from("${buildDir}/jmxterm") { | ||
include("**") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
group=nrjmx | ||
version=1.6.0-SNAPSHOT | ||
version=1.6.0 | ||
description=The New Relic JMX tool provides a command line tool to connect to a JMX server and retrieve the MBeans it exposes | ||
jmxTermVersion=1.0.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.