mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-12-27 01:11:13 -06:00
update snyk to use org for builds
Signed-off-by: Vishwas Shashidhar <vishwas.shashidhar@symphony.com>
This commit is contained in:
parent
5e5e5414b9
commit
7dd257ca39
@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
NODE_REQUIRED_VERSION=v12.13.1
|
||||
SNYK_API_TOKEN=885953dc-9469-443c-984d-524352d54116
|
||||
SNYK_ORG=sda
|
||||
|
||||
if ! [ -x "$(command -v git)" ]; then
|
||||
echo 'GIT does not exist! Please set it up before running this script!' >&2
|
||||
@ -42,7 +42,8 @@ fi
|
||||
if ! [ -x "$(command -v snyk)" ]; then
|
||||
echo 'Snyk does not exist! Installing and setting it up' >&2
|
||||
npm install -g snyk
|
||||
snyk config set api=$SNYK_API_TOKEN
|
||||
snyk config set org="$SNYK_ORG"
|
||||
snyk config set api="$SNYK_API_TOKEN"
|
||||
fi
|
||||
|
||||
if [ -z "$PARENT_BUILD_VERSION" ]; then
|
||||
@ -67,7 +68,7 @@ npm install
|
||||
|
||||
# Run Snyk Security Tests
|
||||
echo "Running snyk security tests"
|
||||
snyk test --file=package.json
|
||||
snyk test --file=package-lock.json --org="$SNYK_ORG"
|
||||
|
||||
# replace url in config
|
||||
echo "Setting default pod url to https://corporate.symphony.com"
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
NODE_REQUIRED_VERSION=v12.13.1
|
||||
SNYK_API_TOKEN=885953dc-9469-443c-984d-524352d54116
|
||||
SNYK_ORG=sda
|
||||
|
||||
# Check basic dependencies
|
||||
if ! [ -x "$(command -v git)" ]; then
|
||||
@ -43,7 +43,8 @@ fi
|
||||
if ! [ -x "$(command -v snyk)" ]; then
|
||||
echo 'Snyk does not exist! Installing and setting it up' >&2
|
||||
npm install -g snyk
|
||||
snyk config set api=$SNYK_API_TOKEN
|
||||
snyk config set org="$SNYK_ORG"
|
||||
snyk config set api="$SNYK_API_TOKEN"
|
||||
fi
|
||||
|
||||
if ! [ -x "$(command -v /usr/local/bin/packagesbuild)" ]; then
|
||||
@ -81,7 +82,7 @@ npm install
|
||||
|
||||
# Run Snyk Security Tests
|
||||
echo "Running snyk security tests"
|
||||
snyk test --file=package.json
|
||||
snyk test --file=package-lock.json --org="$SNYK_ORG"
|
||||
|
||||
# Replace url in config
|
||||
echo "Setting default pod url to https://corporate.symphony.com"
|
||||
|
@ -6,7 +6,7 @@ echo %PATH%
|
||||
|
||||
set DISABLE_REBUILD=true
|
||||
set NODE_REQUIRED_VERSION=12.13.1
|
||||
set SNYK_API_TOKEN=885953dc-9469-443c-984d-524352d54116
|
||||
set SNYK_ORG=sda
|
||||
|
||||
set PATH=%PATH%;C:\Program Files\nodejs\;C:\Program Files\Git\cmd
|
||||
echo %PATH%
|
||||
@ -39,6 +39,7 @@ WHERE snyk
|
||||
if %ERRORLEVEL% NEQ 0 (
|
||||
echo "Snyk does not exist! Installing and setting it up"
|
||||
call npm i snyk -g
|
||||
call snyk config set org=%$SNYK_ORG%
|
||||
call snyk config set api=%SNYK_API_TOKEN%
|
||||
)
|
||||
|
||||
@ -54,7 +55,7 @@ call npm install
|
||||
|
||||
# Run Snyk Security Tests
|
||||
echo "Running snyk security tests"
|
||||
call snyk test --file=package.json
|
||||
call snyk test --file=package-lock.json --org=%SNYK_ORG%
|
||||
|
||||
:: Set expiry if required
|
||||
IF "%EXPIRY_PERIOD%"=="" (
|
||||
|
@ -6,7 +6,7 @@ echo %PATH%
|
||||
|
||||
set DISABLE_REBUILD=true
|
||||
set NODE_REQUIRED_VERSION=12.13.1
|
||||
set SNYK_API_TOKEN=885953dc-9469-443c-984d-524352d54116
|
||||
set SNYK_ORG=sda
|
||||
|
||||
set PATH=%PATH%;C:\Program Files\nodejs\;C:\Program Files\Git\cmd
|
||||
echo %PATH%
|
||||
@ -27,6 +27,7 @@ WHERE snyk
|
||||
if %ERRORLEVEL% NEQ 0 (
|
||||
echo "Snyk does not exist! Installing and setting it up"
|
||||
call npm i snyk -g
|
||||
call snyk config set org=%$SNYK_ORG%
|
||||
call snyk config set api=%SNYK_API_TOKEN%
|
||||
)
|
||||
|
||||
@ -42,7 +43,7 @@ call npm install
|
||||
|
||||
# Run Snyk Security Tests
|
||||
echo "Running snyk security tests"
|
||||
call snyk test --file=package.json
|
||||
call snyk test --file=package-lock.json --org=%SNYK_ORG%
|
||||
|
||||
:: Set expiry if required
|
||||
IF "%EXPIRY_PERIOD%"=="" (
|
||||
|
Loading…
Reference in New Issue
Block a user