My build keeps on sporadically failing with:
/bin/bash: line 98: openssl: command not found
I am using GitLab CI to run a test build using SFDX (Salesforce Developer Experience), but even before I am able to do anything the script fails! This doesn’t happen every single time and there is no correlation between what I am committing and this error being thrown.
It is literally the first line , does anyone have any idea why this could be failing?
The only workaround I have found at the moment is to go to “Pipelines” > “Run Pipline” > select Merge Req > “Run Pipeline”. This is probably happening with 2/5 commits.
Below is the start of my script (there is a lot more after this).
# # Download the Salesforce CLI and install it # before_script: # Decrypt server key - openssl enc -nosalt -aes-256-cbc -d -in assets/server.key.enc -out assets/server.key -base64 -K $DECRYPTION_KEY -iv $DECRYPTION_IV # Set up environment variables - export CLIURL=https://developer.salesforce.com/media/salesforce-cli/sfdx-linux-amd64.tar.xz - export SFDX_AUTOUPDATE_DISABLE=false - export SFDX_USE_GENERIC_UNIX_KEYCHAIN=true - export SFDX_DOMAIN_RETRY=300 - export SFDX_DISABLE_APP_HUB=true - export SFDX_LOG_LEVEL=DEBUG - export DEPLOYDIR=src - export TESTLEVEL=RunLocalTests #Create sfdx directory - mkdir sfdx #Install Salesforce CLI - wget -qO- $CLIURL | tar xJ -C sfdx --strip-components 1 - "./sfdx/install" - export PATH=./sfdx/$(pwd):$PATH # Output CLI version and plug-in information - sfdx --version - sfdx plugins --core
I need to decrypt the encrypted server key to be used in a JWT Auth Flow using SFDX