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
13 changes: 11 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18841,10 +18841,16 @@ async function run() {
let token = core.getInput('token');
let mode = core.getInput('mode');
let url_id = core.getInput('url_id');
let docker_name = "qualityclouds/pipeline-salesforce";
let api_url = core.getInput('api_url');
let api_url_param= "";
let reporter="";
let service = core.getInput('cloud');
const cloud = core.getInput('cloud') == null ? "0" : core.getInput('cloud');
const useServiceNow = String(cloud).trim() === "1" || String(cloud).trim().toLowerCase() === "servicenow";
const docker_name = useServiceNow
? "qualityclouds/pipeline-servicenow"
: "qualityclouds/pipeline-salesforce";

if(api_url != null && api_url != "") api_url_param = `-e API_URL=${api_url}`;

let branch = ref.replace("refs/heads/", "")
Expand Down Expand Up @@ -18886,7 +18892,10 @@ async function run() {
console.log('branch :' + branch);

await exec.exec(`docker pull ${docker_name} -q`);
let command = (`docker run --user root -v ${workspace}:/src/:rw --network="host" ${api_url_param} -e REPO_URL=${repoUrl} -e QC_API_KEY=${token} -e diff_mode="1" -e MODE=${mode} -e URL_ID=${url_id} -e BRANCH=${branch} -e OPERATION=${operation} -e PR_NUMBER=${pullNumber} -e REPORTER_TOKEN=${gitHubToken} -e REVIEW=${review} -e ALL_ISSUES=${allIssues} -e PR_FAILS_ON_BLOCKERS=${pr_fails_on_blockers} -e ZIP_PATH=${zip_path} -e CODEQUALITY=${codequality} -t ${docker_name}:${version} sf-scan`);

const scan_command = useServiceNow ? "snow-scan" : "sf-scan";

let command = (`docker run --user root -v ${workspace}:/src/:rw --network="host" ${api_url_param} -e REPO_URL=${repoUrl} -e QC_API_KEY=${token} -e diff_mode="1" -e MODE=${mode} -e URL_ID=${url_id} -e BRANCH=${branch} -e OPERATION=${operation} -e PR_NUMBER=${pullNumber} -e REPORTER_TOKEN=${gitHubToken} -e REVIEW=${review} -e ALL_ISSUES=${allIssues} -e PR_FAILS_ON_BLOCKERS=${pr_fails_on_blockers} -e ZIP_PATH=${zip_path} -e CODEQUALITY=${codequality} -t ${docker_name}:${version} ${scan_command}`);

try {
await exec.exec(command);
Expand Down
13 changes: 11 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,16 @@ async function run() {
let token = core.getInput('token');
let mode = core.getInput('mode');
let url_id = core.getInput('url_id');
let docker_name = "qualityclouds/pipeline-salesforce";
let api_url = core.getInput('api_url');
let api_url_param= "";
let reporter="";
let service = core.getInput('cloud');
const cloud = core.getInput('cloud') == null ? "0" : core.getInput('cloud');
const useServiceNow = String(cloud).trim() === "1" || String(cloud).trim().toLowerCase() === "servicenow";
const docker_name = useServiceNow
? "qualityclouds/pipeline-servicenow"
: "qualityclouds/pipeline-salesforce";

if(api_url != null && api_url != "") api_url_param = `-e API_URL=${api_url}`;

let branch = ref.replace("refs/heads/", "")
Expand Down Expand Up @@ -57,7 +63,10 @@ async function run() {
console.log('branch :' + branch);

await exec.exec(`docker pull ${docker_name} -q`);
let command = (`docker run --user root -v ${workspace}:/src/:rw --network="host" ${api_url_param} -e REPO_URL=${repoUrl} -e QC_API_KEY=${token} -e diff_mode="1" -e MODE=${mode} -e URL_ID=${url_id} -e BRANCH=${branch} -e OPERATION=${operation} -e PR_NUMBER=${pullNumber} -e REPORTER_TOKEN=${gitHubToken} -e REVIEW=${review} -e ALL_ISSUES=${allIssues} -e PR_FAILS_ON_BLOCKERS=${pr_fails_on_blockers} -e ZIP_PATH=${zip_path} -e CODEQUALITY=${codequality} -t ${docker_name}:${version} sf-scan`);

const scan_command = useServiceNow ? "snow-scan" : "sf-scan";

let command = (`docker run --user root -v ${workspace}:/src/:rw --network="host" ${api_url_param} -e REPO_URL=${repoUrl} -e QC_API_KEY=${token} -e diff_mode="1" -e MODE=${mode} -e URL_ID=${url_id} -e BRANCH=${branch} -e OPERATION=${operation} -e PR_NUMBER=${pullNumber} -e REPORTER_TOKEN=${gitHubToken} -e REVIEW=${review} -e ALL_ISSUES=${allIssues} -e PR_FAILS_ON_BLOCKERS=${pr_fails_on_blockers} -e ZIP_PATH=${zip_path} -e CODEQUALITY=${codequality} -t ${docker_name}:${version} ${scan_command}`);

try {
await exec.exec(command);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "action-full-scan",
"version": "2.2.0",
"version": "2.3.0",
"description": "Qualityclouds full scan action",
"main": "index.js",
"scripts": {
Expand Down