Jenkins:Version Number進(jìn)行日志文件命名(筆記)

插件名稱:Version Number

例如:${JOB_NAME}_${BUILD_DATE_FORMATTED, "yyyyMMdd"}_${BUILDS_TODAY}

Jenkins配置


日志文件

插件預(yù)定義版本號:

BUILD_DATE_FORMATTED

Takes the second argument and returns a java-formatted date string for the given build date. For example, ${BUILD_DATE_FORMATTED, "yyyy-MM-dd"} would return the date (and not the time) as something like 2009-10-01. The date format string must be surrounded by quotes, and any whitespace within the format string is significant.

BUILD_DAY

With no arguments, it just returns the day of the build as an integer. If there is an argument, it takes the number of characters in the argument and uses that pad the date string. For example, if it's the third of the month, ${BUILD_DAY} would return 3, ${BUILD_DAY, X} would return 3, and ${BUILD_DAY, XX} would return 03.

BUILD_WEEK

Returns the week, with the same argument convention for BUILD_DAY

BUILD_MONTH

Returns the month, with the same argument convention for BUILD_DAY

BUILD_YEAR

Returns the year, with the same argument convention for BUILD_DAY

BUILDS_TODAY

Returns the number of builds that have happened today, including this one. This resets at midnight. The argument convention is the same as for BUILD_DAY

BUILDS_THIS_WEEK

Returns the number of builds that have happened this week, including this one. This resets at the start of the week. The argument convention is the same as for BUILD_DAY

BUILDS_THIS_MONTH

Returns the number of builds that have happened this month, including this one. This resets at the first of the month. The argument convention is the same as for BUILD_DAY

BUILDS_THIS_YEAR

Returns the number of builds that have happened this year. This resets at the first of the year. The argument convention is the same as for BUILD_DAY.

BUILDS_ALL_TIME

Returns the number of builds that have happened since the project has begun. This is distinct from the hudson build number, in that it can be reset periodically (for example, when moving from 1.0.${BUILDS_ALL_TIME} to 2.0.${BUILDS_ALL_TIME}, and can be configured to start at an arbitrary number instead of the standard begin date.

MONTHS_SINCE_PROJECT_START

The number of months since the project start date. This is strictly dependent on the month of the current build and the month of the project start date; if the project was begun October 31st and the build was November 1st, then this would return 1. If the project was begin October 1st and the build was November 30th, this would also return 1. The argument convention is the same as for BUILD_DAY.

YEARS_SINCE_PROJECT_START

The number of years since the project start date. Like MONTHS_SINCE_PROJECT_START, this is dependent only on the year.

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末垂蜗,一起剝皮案震驚了整個(gè)濱河市珍剑,隨后出現(xiàn)的幾起案子,更是在濱河造成了極大的恐慌毯欣,老刑警劉巖盲厌,帶你破解...
    沈念sama閱讀 216,496評論 6 501
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件署照,死亡現(xiàn)場離奇詭異祸泪,居然都是意外死亡,警方通過查閱死者的電腦和手機(jī)建芙,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 92,407評論 3 392
  • 文/潘曉璐 我一進(jìn)店門没隘,熙熙樓的掌柜王于貴愁眉苦臉地迎上來,“玉大人禁荸,你說我怎么就攤上這事右蒲。” “怎么了赶熟?”我有些...
    開封第一講書人閱讀 162,632評論 0 353
  • 文/不壞的土叔 我叫張陵瑰妄,是天一觀的道長。 經(jīng)常有香客問我钧大,道長翰撑,這世上最難降的妖魔是什么? 我笑而不...
    開封第一講書人閱讀 58,180評論 1 292
  • 正文 為了忘掉前任啊央,我火速辦了婚禮眶诈,結(jié)果婚禮上,老公的妹妹穿的比我還像新娘瓜饥。我一直安慰自己逝撬,他們只是感情好,可當(dāng)我...
    茶點(diǎn)故事閱讀 67,198評論 6 388
  • 文/花漫 我一把揭開白布乓土。 她就那樣靜靜地躺著宪潮,像睡著了一般。 火紅的嫁衣襯著肌膚如雪趣苏。 梳的紋絲不亂的頭發(fā)上狡相,一...
    開封第一講書人閱讀 51,165評論 1 299
  • 那天,我揣著相機(jī)與錄音食磕,去河邊找鬼尽棕。 笑死,一個(gè)胖子當(dāng)著我的面吹牛彬伦,可吹牛的內(nèi)容都是我干的滔悉。 我是一名探鬼主播,決...
    沈念sama閱讀 40,052評論 3 418
  • 文/蒼蘭香墨 我猛地睜開眼单绑,長吁一口氣:“原來是場噩夢啊……” “哼回官!你這毒婦竟也來了?” 一聲冷哼從身側(cè)響起搂橙,我...
    開封第一講書人閱讀 38,910評論 0 274
  • 序言:老撾萬榮一對情侶失蹤歉提,失蹤者是張志新(化名)和其女友劉穎,沒想到半個(gè)月后,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體唯袄,經(jīng)...
    沈念sama閱讀 45,324評論 1 310
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡弯屈,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 37,542評論 2 332
  • 正文 我和宋清朗相戀三年,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了恋拷。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點(diǎn)故事閱讀 39,711評論 1 348
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡厅缺,死狀恐怖蔬顾,靈堂內(nèi)的尸體忽然破棺而出,到底是詐尸還是另有隱情湘捎,我是刑警寧澤诀豁,帶...
    沈念sama閱讀 35,424評論 5 343
  • 正文 年R本政府宣布,位于F島的核電站窥妇,受9級特大地震影響舷胜,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜活翩,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 41,017評論 3 326
  • 文/蒙蒙 一烹骨、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧材泄,春花似錦沮焕、人聲如沸。這莊子的主人今日做“春日...
    開封第一講書人閱讀 31,668評論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽。三九已至旦事,卻和暖如春魁巩,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背姐浮。 一陣腳步聲響...
    開封第一講書人閱讀 32,823評論 1 269
  • 我被黑心中介騙來泰國打工谷遂, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留,地道東北人单料。 一個(gè)月前我還...
    沈念sama閱讀 47,722評論 2 368
  • 正文 我出身青樓埋凯,卻偏偏與公主長得像,于是被迫代替她去往敵國和親扫尖。 傳聞我的和親對象是個(gè)殘疾皇子白对,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 44,611評論 2 353