LoginSignup
0
0

More than 5 years have passed since last update.

Jenkinsからのメールに日付を埋め込む

Posted at

やりかたは この jenkinsから送信されるメールの件名にshell実行時の変数を使う
という記事の本命である「4. ビルド中の値を参照する」というやり方でやりました。
ありがとうございます。

違うところは日付の書式のうち、曜日を日本語にしたかっただけです。

tmp.prop
echo "PARAM_TODAY = `date +%m/%d(%a)`">> tmp.prop
echo "PARAM_TOMORROW = `LANG=ja_JP.utf8 date -d '1 days' '+%m/%d(%a)'`">> tmp.prop
echo "PARAM_NEXTWEEK = `LANG=ja_JP.utf8 date -d '7 days' '+%m/%d(%a)'`">> tmp.prop

以下のようにフォーマットされます。
mm/dd(曜日)
07/04(土)

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