Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ inputs:
detect-trust-cert:
description: 'Acceptable Values: TRUE, FALSE. If TRUE, Detect will trust the Black Duck certificate even if the certificate is not in the keystore.'
default: 'TRUE'
detect-binary-repo-url:
description: 'Repository which the detect binary will be obtained from'
default: 'https://sig-repo.synopsys.com'
required: false
detect-binary-repo-path:
description: 'Path in the repository where the detect binary versions are located'
default: 'bds-integrations-release/com/synopsys/integration/synopsys-detect'
required: false
runs:
using: 'node12'
main: 'dist/index.js'
5 changes: 2 additions & 3 deletions src/detect/detect-manager.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { find, downloadTool, cacheFile } from '@actions/tool-cache'
import { exec } from '@actions/exec'
import path from 'path'
import { DETECT_VERSION } from '../inputs'
import { DETECT_VERSION, DETECT_BINARY_REPO_URL, DETECT_BINARY_REPO_PATH } from '../inputs'

const DETECT_BINARY_REPO_URL = 'https://sig-repo.synopsys.com'
export const TOOL_NAME = 'detect'

export async function findOrDownloadDetect(): Promise<string> {
Expand All @@ -29,5 +28,5 @@ export async function runDetect(detectPath: string, detectArguments: string[]):
}

function createDetectDownloadUrl(repoUrl = DETECT_BINARY_REPO_URL): string {
return `${repoUrl}/bds-integrations-release/com/synopsys/integration/synopsys-detect/${DETECT_VERSION}/synopsys-detect-${DETECT_VERSION}.jar`
return `${repoUrl}/${DETECT_BINARY_REPO_PATH}/${DETECT_VERSION}/synopsys-detect-${DETECT_VERSION}.jar`
}
2 changes: 2 additions & 0 deletions src/inputs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ export const SCAN_MODE = getInput('scan-mode').toUpperCase()
export const FAIL_ON_ALL_POLICY_SEVERITIES = getBooleanInput('fail-on-all-policy-severities')
export const OUTPUT_PATH_OVERRIDE = getInput('output-path-override')
export const DETECT_TRUST_CERT = getInput('detect-trust-cert')
export const DETECT_BINARY_REPO_URL = getInput('detect-binary-repo-url')
export const DETECT_BINARY_REPO_PATH = getInput('detect-binary-repo-path')