Skip to content

Commit

Permalink
Fix connection check (#205)
Browse files Browse the repository at this point in the history
  • Loading branch information
RobiNino authored Sep 4, 2024
1 parent 254dc2c commit df9cbe0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/auto-build-publish-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Setup Go with cache
uses: jfrog/.github/actions/install-go-with-cache@main
Expand Down
2 changes: 1 addition & 1 deletion lib/cleanup.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ function checkConnectionToArtifactory() {
try {
core.startGroup('Checking connection to JFrog Artifactory');
const pingResult = yield utils_1.Utils.runCliAndGetOutput(['rt', 'ping']);
if (pingResult !== 'OK') {
if (pingResult.trim() !== 'OK') {
core.debug(`Ping result: ${pingResult}`);
core.warning('Could not connect to Artifactory. Skipping Build Info post tasks.');
return false;
Expand Down
2 changes: 1 addition & 1 deletion src/cleanup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ async function checkConnectionToArtifactory(): Promise<boolean> {
try {
core.startGroup('Checking connection to JFrog Artifactory');
const pingResult: string = await Utils.runCliAndGetOutput(['rt', 'ping']);
if (pingResult !== 'OK') {
if (pingResult.trim() !== 'OK') {
core.debug(`Ping result: ${pingResult}`);
core.warning('Could not connect to Artifactory. Skipping Build Info post tasks.');
return false;
Expand Down

0 comments on commit df9cbe0

Please sign in to comment.