I am a beginner with Rundeck, I would like to create a job to test logins in a specific website. How do I do that?
You can create a job with an inline script step that calls the site API using CURL.
For example, to test against rundeck itself you can use the following script inside a rundeck job:
curl -v -c cookie -b cookie -d j_username=admin -d j_password=admin http://localhost:4440/j_security_check \
-H "Accept: application/json" \
http://localhost:4440/api/38/system/info/
And the job definition, you can copy it and save it as a YAML file, then import it to your project to test.
- defaultTab: nodes
description: ''
executionEnabled: true
id: 2dc15b18-5b2c-4081-be72-17eb3618d68c
loglevel: INFO
name: Login
nodeFilterEditable: false
plugins:
ExecutionLifecycle: null
scheduleEnabled: true
sequence:
commands:
- fileExtension: .sh
interpreterArgsQuoted: false
script: |-
curl -v -c cookie -b cookie -d j_username=admin -d j_password=admin http://localhost:4440/j_security_check \
-H "Accept: application/json" \
http://localhost:4440/api/38/system/info/ | jq
scriptInterpreter: /bin/bash
keepgoing: false
strategy: node-first
uuid: 2dc15b18-5b2c-4081-be72-17eb3618d68c
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.