Skip to content
This repository has been archived by the owner on Apr 8, 2024. It is now read-only.

Commit

Permalink
fix: verify node installation in full image (#266)
Browse files Browse the repository at this point in the history
  • Loading branch information
cristiand391 authored Sep 10, 2021
1 parent b884a1a commit 36578e2
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ commands:
command: |
echo "export TAG=$(jq -r .version ./package.json)-slim" >> $BASH_ENV
- run:
name: Verify slim dependencies
command: |
SFDX_CLI_VERSION="$(docker run -it --rm salesforce/salesforcedx:$TAG bash -c 'sfdx --version')"
JAVA_VERSION="$(docker run -it --rm salesforce/salesforcedx:$TAG bash -c 'java --version | head -n 1')"
Expand All @@ -48,16 +49,25 @@ commands:
command: |
echo "export TAG=$(jq -r .version ./package.json)-full" >> $BASH_ENV
- run:
name: Verify full dependencies
command: |
NODE_VERSION="$(docker run -it --rm salesforce/salesforcedx:$TAG bash -c 'node -v')"
SFDX_CLI_VERSION="$(docker run -it --rm salesforce/salesforcedx:$TAG bash -c 'sfdx --version')"
JQ_VERSION="$(docker run -it --rm salesforce/salesforcedx:$TAG bash -c 'jq --version')"
if [[ ((`echo $SFDX_CLI_VERSION | grep -c "sfdx-cli/"` > 0))]]
then
echo "sfdx-cli installed -" $SFDX_CLI_VERSION
else
echo "The sfdx-cli installation could not be verified"
exit 1
fi
JQ_VERSION="$(docker run -it --rm salesforce/salesforcedx:$TAG bash -c 'jq --version')"
if [[ ((`echo $NODE_VERSION | grep -c "v"` > 0))]]
then
echo "node installed -" $NODE_VERSION
else
echo "The node installation could not be verified"
exit 1
fi
if [[ ((`echo $JQ_VERSION | grep -c "jq"` > 0))]]
then
echo "jq installed -" $JQ_VERSION
Expand Down

0 comments on commit 36578e2

Please sign in to comment.