This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var axios = require('axios'); | |
| const jenkinsUrl = 'http://example_jenkins_server_url.com/job/<JOB_NAME>/build'; | |
| const userName = 'example_user'; | |
| const password = 'example_pass' | |
| var config = { | |
| method: 'post', | |
| url: jenkinsUrl, | |
| headers: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var axios = require('axios'); | |
| var qs = require('qs'); | |
| const jenkinsUrl = 'http://example_jenkins_server_url.com/job/<JOB_NAME>/buildWithParameters'; | |
| // notice the url has buildWithParameters instead of build ^ | |
| const userName = 'example_user'; | |
| const password = 'example_pass'; | |
| const jobParametersObject = { | |
| 'stringParam1': 'value' | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var axios = require('axios'); | |
| var FormData = require('form-data'); | |
| var fs = require('fs'); | |
| var data = new FormData(); | |
| const jenkinsUrl = 'http://example_jenkins_server_url.com/job/<JOB_NAME>/build'; | |
| // notice the URL has build not buildWithParameters if the job has file parameters. ^ | |
| const userName = 'example_user'; | |
| const password = 'example_pass' |
OlderNewer