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 1 year has passed since last update.

Jenkins 操作

Posted at

はじめに

Jenkins の操作について、備忘録的なものを残す。

操作

UI

ダッシュボード

image.png

プロジェクト

image.png

設定

image.png

設定の下に Shell 追加する箇所がある

image.png

コンソール

image.png

パラメータ設定

image.png

parameter 設定した場合、Build 時に value が正しいか聞かれる

image.png

Choice を選択した場合

image.png
image.png

Boolean を選択した場合

image.png
image.png
image.png

コマンド

// Jenkins のコンテナに入る
$ docker exec -ti condescending_boyd bash

お試しコマンド

以下のコマンドを Jenkins の Shell に追加して、Build を実行すると結果が得られる。

結論: Jenkins の Build job 実行すると、ファイルや変数はコンテナを参照する。

// コンテナの中でお試しコマンド
NAME=fmyuk
$ echo "Hello, $NAME. Current date and time is $(date)"
// /tmp/info に出力
$ echo "Hello, $NAME. Current date and time is $(date)" > /tmp/info
$ cat /tmp/info
// /tmp/script.sh を作成して Jenkins で Build 実行すると結果が得られる。
// Terminal で以下を実施
$ vi /tmp/script.sh
#!/bin/bash
NAME=$1
LASTNAME=$2
echo "Hello, $NAME $LASTNAME"

$ sh /tmp/script.sh
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?