mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Recognizing Jenkinsfile as Groovy source.
This commit is contained in:
@@ -1310,6 +1310,8 @@ Groovy:
|
|||||||
- .gvy
|
- .gvy
|
||||||
interpreters:
|
interpreters:
|
||||||
- groovy
|
- groovy
|
||||||
|
filenames:
|
||||||
|
- Jenkinsfile
|
||||||
|
|
||||||
Groovy Server Pages:
|
Groovy Server Pages:
|
||||||
type: programming
|
type: programming
|
||||||
|
|||||||
@@ -302,3 +302,6 @@
|
|||||||
|
|
||||||
# Android Google APIs
|
# Android Google APIs
|
||||||
- (^|/)\.google_apis/
|
- (^|/)\.google_apis/
|
||||||
|
|
||||||
|
# Jenkins Pipeline
|
||||||
|
- ^Jenkinsfile$
|
||||||
|
|||||||
46
samples/Groovy/filenames/Jenkinsfile
vendored
Normal file
46
samples/Groovy/filenames/Jenkinsfile
vendored
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
jettyUrl = 'http://localhost:8081/'
|
||||||
|
|
||||||
|
def servers
|
||||||
|
|
||||||
|
stage 'Dev'
|
||||||
|
node {
|
||||||
|
checkout scm
|
||||||
|
servers = load 'servers.groovy'
|
||||||
|
mvn '-o clean package'
|
||||||
|
dir('target') {stash name: 'war', includes: 'x.war'}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage 'QA'
|
||||||
|
parallel(longerTests: {
|
||||||
|
runTests(servers, 30)
|
||||||
|
}, quickerTests: {
|
||||||
|
runTests(servers, 20)
|
||||||
|
})
|
||||||
|
|
||||||
|
stage name: 'Staging', concurrency: 1
|
||||||
|
node {
|
||||||
|
servers.deploy 'staging'
|
||||||
|
}
|
||||||
|
|
||||||
|
input message: "Does ${jettyUrl}staging/ look good?"
|
||||||
|
|
||||||
|
stage name: 'Production', concurrency: 1
|
||||||
|
node {
|
||||||
|
sh "wget -O - -S ${jettyUrl}staging/"
|
||||||
|
echo 'Production server looks to be alive'
|
||||||
|
servers.deploy 'production'
|
||||||
|
echo "Deployed to ${jettyUrl}production/"
|
||||||
|
}
|
||||||
|
|
||||||
|
def mvn(args) {
|
||||||
|
sh "${tool 'Maven 3.x'}/bin/mvn ${args}"
|
||||||
|
}
|
||||||
|
|
||||||
|
def runTests(servers, duration) {
|
||||||
|
node {
|
||||||
|
checkout scm
|
||||||
|
servers.runWithServer {id ->
|
||||||
|
mvn "-o -f sometests test -Durl=${jettyUrl}${id}/ -Dduration=${duration}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -522,6 +522,9 @@ class TestBlob < Minitest::Test
|
|||||||
assert sample_blob("myapp/My Template.xctemplate/___FILEBASENAME___.h").vendored?
|
assert sample_blob("myapp/My Template.xctemplate/___FILEBASENAME___.h").vendored?
|
||||||
assert sample_blob("myapp/My Images.xcassets/some/stuff.imageset/Contents.json").vendored?
|
assert sample_blob("myapp/My Images.xcassets/some/stuff.imageset/Contents.json").vendored?
|
||||||
assert !sample_blob("myapp/MyData.json").vendored?
|
assert !sample_blob("myapp/MyData.json").vendored?
|
||||||
|
|
||||||
|
# Jenkins
|
||||||
|
assert sample_blob("Jenkinsfile").vendored?
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_documentation
|
def test_documentation
|
||||||
|
|||||||
Reference in New Issue
Block a user