-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for matrix blocks #19
base: master
Are you sure you want to change the base?
Conversation
syn keyword jenkinsfileCoreStep scm | ||
syn keyword jenkinsfileCoreStep sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The sh
step is already a jenkinsfilePipelineStep
below. It's better suited there so this conflicting definition is removed.
syn keyword jenkinsfileCoreStep docker dockerfile skipwhite nextgroup=jenkinsFileDockerConfigBlock | ||
syn keyword jenkinsfileCoreStep docker dockerfile skipwhite nextgroup=jenkinsfileDockerConfigBlock |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In several places I've made the case consistent, changing jenkinsFile
to jenkinsfile
.
syn region jenkinsFileDockerConfigBlock contained start='{' end='}' contains=groovyString,jenkinsfileDockerKeyword transparent | ||
syn keyword jenkinsFileDockerKeyword contained image args additionalBuildArgs label registryUrl registryCredentialsId alwaysPull filename dir | ||
syn region jenkinsfileAxisConfigBlock contained start='{' end='}' contains=groovyString,groovyComment,groovyLineComment,jenkinsfileAxisKeyword transparent | ||
syn keyword jenkinsfileAxisKeyword contained name notValues values | ||
|
||
syn region jenkinsfileDockerConfigBlock contained start='{' end='}' contains=groovyString,groovyComment,groovyLineComment,jenkinsfileDockerKeyword transparent | ||
syn keyword jenkinsfileDockerKeyword contained image args additionalBuildArgs label registryUrl registryCredentialsId reuseNode alwaysPull filename dir | ||
|
||
syn region jenkinsfileParametersConfigBlock contained start='{' end='}' contains=groovyString,groovyComment,groovyLineComment,jenkinsfileParametersKeyword transparent | ||
syn keyword jenkinsfileParametersKeyword contained string text booleanParam choice password |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of these config blocks can now contain both line and block comments.
syn keyword jenkinsfilePipelineStep nexusArtifactUploader nexusPolicyEvaluation nexusPublisher node nodejs nodesByLabel | ||
syn keyword jenkinsfilePipelineStep nexusArtifactUploader nexusPolicyEvaluation nexusPublisher nodejs nodesByLabel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a judgment call. Jenkins pipeline documentation seems to give special treatment to the node
step, so it stays a jenkinsfileCoreStep
above.
syn keyword jenkinsfilePipelineStep splitTests springBoot sscm sseBuild sseBuildAndPublish sshPublisher sshagent stage | ||
syn keyword jenkinsfilePipelineStep startET startSandbox startSession startTS stash step stepcounter stopET stopSandbox | ||
syn keyword jenkinsfilePipelineStep splitTests springBoot sscm sseBuild sseBuildAndPublish sshPublisher sshagent | ||
syn keyword jenkinsfilePipelineStep startET startSandbox startSession startTS stash stepcounter stopET stopSandbox |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to node
, stage
and step
also stay only as jenkinsfileCoreStep
s, above.
syn keyword jenkinsfilePipelineStep timeout timestamps tm tool touch triggerInputStep triggerJob typetalkSend uftScenarioLoad | ||
syn keyword jenkinsfilePipelineStep timeout timestamps tm touch triggerInputStep triggerJob typetalkSend uftScenarioLoad |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tool
is also a jenkinsfileDirective
. This conflicting definition is removed.
This PR adds support for
matrix
blocks, including the optionalexcludes
section. It also adds highlighting for built-in parameter types and makes several tweaks, as explained in inline PR comments.