Pre - and Post - Push Script Usage Steps
Prerequisites
- If the scripts are written using Python:
- Scripts for the on-prem deployment should start with
#!/appviewx/dependencies/appviewx_addons/Python/bin/python - Scripts for the SaaS deployment should start with
#!/usr/bin/python
- Scripts for the on-prem deployment should start with
- The script input can be consumed using the command line argument
sys.argv[1] - The script output should be in the JSON format, generated only using the
printstatement. -
Script Output Script Execution Status AppResponseCode:0Success AppResponseCode:-1or any other script errorsFailure - The script should be code-signed. Please contact AppViewX Support ([email protected]) to get the script code signed.
Using Scripted Integrations for On-prem
- Get the code-signed script from the AppViewX support team ([email protected]). This will be a .zip file that includes the script and the signature.
- Save the code-signed .zip file in all the AppViewX vendors pods running
node file system.
Default path: <home>/appviewx/appviewx_dependencies/aps/
- Mention in the .zip filename in all the relevant fields in the CERT+ user
interface.Note: The folder path for the file is not required. Custom folder paths are restricted.
#!/appviewx/dependencies/appviewx_addons/Python/bin/python
print({"status":"AppResponseCode:0"})
Using Scripted Integrations for SaaS
- Get the code-signed script from the AppViewX support team ([email protected]). This will be a .zip file that includes the script and the signature.
- Save the .zip file in all machines with the AppViewX Cloud Connector at the following location: <CC_INSTALLATION_PATH>/deps/aps/.
- Mention in the .zip filename in all the relevant fields in the CERT+ user
interface.Note: The folder path for the file is not required. Custom folder paths are restricted.
#!/usr/bin/python
print({"status":"AppResponseCode:0"})
Troubleshooting Script Usage Issues
| Error | Cause | Resolution |
|---|---|---|
| File not found | The python path mentioned in the script file is not correct. | Check the path in the vendors pod or the
mid-server-platform pod. For Python scripts:
|
| …bin/python^M: bad interpreter | The ^M is a carriage return character.
Linux uses the line feed character to
mark the end of a line, whereas Windows uses the two-character
sequence CR LF. Your file has Windows line endings, which is
confusing Linux |
Remove the spurious CR characters and then code sign
the script. You can remove these characters using the command:
|
