Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to use jenkin api to create job #8 #63

Open
chendelin1982 opened this issue Nov 12, 2022 · 0 comments
Open

how to use jenkin api to create job #8 #63

chendelin1982 opened this issue Nov 12, 2022 · 0 comments

Comments

@chendelin1982
Copy link
Contributor

  1. crumbIssuer 是否需要使用
    curl -v -X GET http://localhost:8080/crumbIssuer/api/json --user admin:11f2c9f9ac5ffcb954158447874613629d
    https://www.jenkins.io/doc/upgrade-guide/2.176/#upgrading-to-jenkins-lts-2-176-3

  2. 需要手动生成token
    查询job OK
    curl -X POST -u admin:11f2c9f9ac5ffcb954158447874613629d -H "Content-Type: text/xml" http://localhost:8080/job/test/api/json

创建job Fail
curl -X POST -u admin:11ea8ed26929bb9cfc3e716483d0a81887 -H "Content-Type: text/xml" -d "@config.xml" http://localhost:8080/createItem?name=test2

  1. 构建JOB fail
    curl -X POST http://localhost:8080/job/test/buildWithParameters --user admin:11f2c9f9ac5ffcb954158447874613629d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant