[Jenkins] 將當前專案的環境變數 作為post的請求中的參數
jenkins 將當前專案的環境變數 作為post的請求中的參數
jenkins中 調用 curl 發送post命令時,使用當前專案的環境變數作為post請求的參數,
要用"' '"將環境變數括起來。
寫法如下
"mail_pass":"'${mail_pass}'"
要用' '將環境變數括起來。
curl -X POST http://172.26.12.87:9090/send/email -H 'Content-Type: application/json' -H \
'cache-control: no-cache' -d '{"mail_sender":"'${mail_sender}'","mail_receiver":"'${mail_receiver}'","mail_pass":"'${mail_pass}'"}'
為顯示方便所以換行 執行時候需要合併一整行執行
curl -k -X POST -H "Content-Type: application/json" -u "autouser" https://xx.xx.xx.xx:443/mgmt/tm/ltm/virtual \
-d \
'{"name":"vs_123.123.123.123_443","destination":"123.123.123.123:443","ipProtocol":"tcp","pool":"/Common/pool_443_123.123.123.123",
"sourceAddressTranslation":{"type":"automap"},
"profiles": [{"name":"/Common/tcp", "context":"clientside" },{"name":"/Common/tcp-wan-optimized", "context":"serverside" },"/Common/http","/Common/STAR_123_com","/Common/SNI_STAR_123_net_http2"],
"rules": [ "/Common/irule_Test_json_v3" ],"persist": [ {"name": "/Common/cookie"}],"vlansEnabled": true,"vlans": ["/Common/MGMT", "/Common/External_VPN_valn"]}'
#
轉換 SNMP 直
snmpwalk -m F5-BIGIP-SYSTEM-MIB -c public -v 2c 172.19.4.166 .1.3.6.1.4.1.3375.2.1.1.2.4.4.0
snmpwalk -m F5-BIGIP-SYSTEM-MIB -c public -v 2c 172.19.4.166 .1.3.6.1.4.1.3375.2.1.1.2.4.5.0
數字轉換
snmptranslate -Of .1.3.6.1.4.1.3375.2.1.1.2.4.3.0
Pytty log
&Y&M&D&T_&H_putty.log
沒有留言:
張貼留言