0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

[jenkins-cli] Jenkins へファイルを POST する

Posted at

概要

CLI で Jenkins ジョブへファイルを渡す方法.

手順

1. 「ファイル」形式のパラメータを定義する

ここでは「ATFILE」というパラメータ名にする

image.png

2. 「ジョブ名/buildWithParameters?」に「--form ATFILE=@ファイルパス」を付与する

「/tmp/a.txt」を Jenkins ジョブに渡したい場合

$ curl -X POST --user 'ユーザ名:APIトークン' \
       'http://IP:PORT/job/ジョブ名/buildWithParameters?' \
       --form ATFILE=@/tmp/a.txt

以上.

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?