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
7dd257ca39
commit
ecef6e69db
@ -42,9 +42,10 @@ 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 org="$SNYK_ORG"
|
||||
snyk config set api="$SNYK_API_TOKEN"
|
||||
fi
|
||||
echo "Setting snyk org to $SNYK_ORG and api token to $SNYK_API_TOKEN"
|
||||
snyk config set org="$SNYK_ORG"
|
||||
snyk config set api="$SNYK_API_TOKEN"
|
||||
|
||||
if [ -z "$PARENT_BUILD_VERSION" ]; then
|
||||
echo "PARENT_BUILD_VERSION is empty, setting default"
|
||||
|
@ -43,9 +43,10 @@ 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 org="$SNYK_ORG"
|
||||
snyk config set api="$SNYK_API_TOKEN"
|
||||
fi
|
||||
echo "Setting snyk org to $SNYK_ORG and api token to $SNYK_API_TOKEN"
|
||||
snyk config set org="$SNYK_ORG"
|
||||
snyk config set api="$SNYK_API_TOKEN"
|
||||
|
||||
if ! [ -x "$(command -v /usr/local/bin/packagesbuild)" ]; then
|
||||
echo 'Packages build does not exist! Please set it up before running this script!' >&2
|
||||
|
@ -39,9 +39,10 @@ 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%
|
||||
)
|
||||
echo "Setting snyk org to %SNYK_ORG% and api token to %SNYK_API_TOKEN%"
|
||||
call snyk config set org=%SNYK_ORG%
|
||||
call snyk config set api=%SNYK_API_TOKEN%
|
||||
|
||||
:: Below command replaces buildVersion with the appropriate build number from jenkins
|
||||
sed -i -e "s/\"buildNumber\"[[:space:]]*\:[[:space:]]*\".*\"/\"buildNumber\":\"%PARENT_BUILD_VERSION%\"/g" package.json
|
||||
|
@ -27,9 +27,10 @@ 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%
|
||||
)
|
||||
echo "Setting snyk org to %SNYK_ORG% and api token to %SNYK_API_TOKEN%"
|
||||
call snyk config set org=%SNYK_ORG%
|
||||
call snyk config set api=%SNYK_API_TOKEN%
|
||||
|
||||
:: Below command replaces buildVersion with the appropriate build number from jenkins
|
||||
sed -i -e "s/\"buildNumber\"[[:space:]]*\:[[:space:]]*\".*\"/\"buildNumber\":\"%PARENT_BUILD_VERSION%\"/g" package.json
|
||||
|
Loading…
Reference in New Issue
Block a user