mirror of
https://github.com/nvim-treesitter/nvim-treesitter-context
synced 2024-09-16 14:14:03 +02:00
feat: added Groovy (and Jenkinsfile) syntax
This commit is contained in:
parent
f33905bf5a
commit
32bbb2136c
3 changed files with 114 additions and 0 deletions
|
@ -36,6 +36,7 @@ Note: if you need support for Neovim 0.6.x please use the tag `compat/0.6`.
|
|||
- [x] `glimmer`
|
||||
- [x] `go`
|
||||
- [x] `graphql`
|
||||
- [x] `groovy`
|
||||
- [x] `haskell`
|
||||
- [x] `html_tags`
|
||||
- [x] `ini`
|
||||
|
|
6
queries/groovy/context.scm
Normal file
6
queries/groovy/context.scm
Normal file
|
@ -0,0 +1,6 @@
|
|||
(juxt_function_call) @context
|
||||
|
||||
([
|
||||
(function_call)
|
||||
(closure)
|
||||
] @context)
|
107
test/test.groovy
Normal file
107
test/test.groovy
Normal file
|
@ -0,0 +1,107 @@
|
|||
pipeline {
|
||||
|
||||
agent {
|
||||
label "docker"
|
||||
}
|
||||
|
||||
options {
|
||||
ansiColor('xterm')
|
||||
timeout(time: 60, unit: 'MINUTES')
|
||||
timestamps()
|
||||
}
|
||||
|
||||
environment {
|
||||
|
||||
// Kubernetes deploy (default)
|
||||
KUBERNETES_CONFIG = 'kube.yaml'
|
||||
KUBERNETES_ENV="test"
|
||||
KUBERNETES_NAMESPACE="namspace-test"
|
||||
|
||||
// Docker
|
||||
HOME = "$WORKSPACE"
|
||||
DOCKER_WORKSPACE = "/workdir"
|
||||
|
||||
GIT_COMMIT = sh(
|
||||
script: "printf \$(git rev-parse --short HEAD)",
|
||||
returnStdout: true
|
||||
)
|
||||
GIT_BRANCH = sh(
|
||||
script: "printf \$(git rev-parse --abbrev-ref HEAD)",
|
||||
returnStdout: true
|
||||
)
|
||||
|
||||
GIT_TAG = sh(
|
||||
script: "git tag --points-at ${env.GIT_COMMIT}",
|
||||
returnStdout: true
|
||||
|
||||
|
||||
|
||||
// ...
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
)?.trim()
|
||||
|
||||
TAG_NAME = "${GIT_TAG}"
|
||||
|
||||
|
||||
|
||||
// ....
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
stages {
|
||||
|
||||
stage ('Checkout') {
|
||||
|
||||
steps {
|
||||
|
||||
checkout scm
|
||||
sh 'git rev-parse --abbrev-ref HEAD'
|
||||
sh 'git rev-parse --short HEAD'
|
||||
sh 'echo ${GIT_COMMIT}'
|
||||
sh 'echo ${GIT_BRANCH}'
|
||||
stash name: "source"
|
||||
|
||||
script {
|
||||
env.VERSION = env.TAG_NAME // will be NULL when empty
|
||||
sh "echo 'Found version ${env.VERSION}'"
|
||||
|
||||
|
||||
|
||||
|
||||
// ...
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
} // script
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// ...
|
||||
|
||||
|
||||
|
||||
|
||||
} // steps
|
||||
|
||||
} // Checkout
|
||||
|
||||
} // stages
|
||||
|
||||
} // pipeline
|
||||
|
Loading…
Reference in a new issue