I have created a job for automation where code are copied to node and executed
java -cp "./*" com.atlassian.db.config.password.tools.CipherTool -p $NewPass
This command works in jira in cd /apps/jira/server/bin path
Working example securecrt:
[jira@cvjrad0004 bin]$ pwd
/apps/jira/server/bin
[jira@cvjrad0004 bin]$ PASS="newpass"
[jira@cvjrad0004 bin]$ ENC_PASS=`java -cp "./*" com.atlassian.db.config.password.tools.CipherTool -p $PASS | grep '<password>' `
[jira@cvjrad0004 bin]$ echo $ENC_PASS
<password>bmV3cGFzcw==</password>
[jira@cvjrad0004 bin]$
and not working if i add in job using ssh
sshpass -p $password ssh $username@$IP '
sudo su - jira << 'EOF'
cd /apps/jira/server/bin
java -cp "./*" com.atlassian.db.config.password.tools.CipherTool -p $NewPass | grep '<password>'
EOF '
Before adding line:
10.201.165.160 Last login: Wed Mar 6 05:19:22 EST 2024 jira /apps/jira/server/bin 10.201.165.160 [Pipeline] } [Pipeline] // stage [Pipeline] } [Pipeline] // node [Pipeline] End of Pipeline Finished: SUCCESS
after adding java cp command Eror:
password_rotation_automation/Aurora_Local_DB_Password_Rotation/Jira/password_update.sh: line 18: password: No such file or directory[Pipeline] }[Pipeline] // stage[Pipeline] }[Pipeline] // node[Pipeline] End of PipelineERROR: script returned exit code 1