Introducing the Chinese Workday Plugin
Many Jenkins jobs depend on business calendars.
For teams in China, that can be difficult to model with a simple weekday/weekend check. A weekday is not always a workday, and a weekend is not always a holiday. Chinese statutory holidays and make-up workdays change every year, so Pipeline logic often needs more than basic date rules.
The Chinese Workday Plugin was created to support that use case in Jenkins.
What the plugin provides
The plugin adds Pipeline steps for Chinese workday checks:
-
isChineseWorkday(…) -
isChineseHoliday(…) -
chineseWorkdaySupportedYears()
It also lets administrators add or override calendar data in:
Manage Jenkins → System → Chinese Workday
This makes it possible to keep holiday calendar logic in one place instead of repeating it across Jenkinsfiles.
Example
One common use case is to run a stage only on a Chinese workday:
pipeline {
agent any
stages {
stage('Release') {
when {
expression {
isChineseWorkday()
}
}
steps {
echo 'Release runs only on a Chinese workday.'
}
}
}
}
Why it helps
Without dedicated support, teams often duplicate holiday logic in Pipelines or rely on weekday-only checks. That can cause jobs to run during holidays or skip make-up workdays.
The plugin keeps those rules centralized and makes Pipeline behavior easier to understand.
Learn more
-
Plugin site: plugins.jenkins.io/chinese-workday
-
Source code: github.com/jenkinsci/chinese-workday-plugin
Feedback and contributions are welcome.