added Jenkinsfile
nclazz/api-cli/pipeline/head There was a failure building this commit
Details
nclazz/api-cli/pipeline/head There was a failure building this commit
Details
parent
a180505a8c
commit
7c4ff61785
|
@ -0,0 +1,28 @@
|
|||
pipeline {
|
||||
agent any
|
||||
environment {
|
||||
NPM_REGISTRY = 'https://nexus.nclazz.de/repository/npm_releases',
|
||||
NPM_CREDENTIALS = credentials('npm-publish')
|
||||
NPM_MAIL = 'info@nclazz.de'
|
||||
}
|
||||
stages {
|
||||
stage('Prepare') {
|
||||
sh 'npm install -g npm-cli-login'
|
||||
}
|
||||
stage('Set Version') {
|
||||
steps {
|
||||
when { branch 'master' }
|
||||
sh 'npm version patch'
|
||||
sh 'git push'
|
||||
}
|
||||
}
|
||||
stage('Deploy') {
|
||||
steps {
|
||||
when { tag 'v*' }
|
||||
sh 'npm-cli-login -u $NPM_CREDENTIALS_USR -p $NPM_CREDENTIALS_PSW -e $NPM_MAIL -r $NPM_REGISTRY'
|
||||
sh 'npm publish'
|
||||
sh 'npm logout --registry=$NPM_REGISTRY'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -4,7 +4,6 @@
|
|||
"description": "Commandline interface for generating and linting api-specs.",
|
||||
"main": "./bin/index.js",
|
||||
"bin": "./bin/index.js",
|
||||
"scripts": {},
|
||||
"publishConfig": {
|
||||
"registry": "https://nexus.nclazz.de/repository/npm_releases/"
|
||||
},
|
||||
|
|
49
test.json
49
test.json
|
@ -1,49 +0,0 @@
|
|||
{
|
||||
"name": "test",
|
||||
"description": "Test.",
|
||||
"info": {
|
||||
"contact": {
|
||||
"name": "Niclas Thobaben",
|
||||
"email": "info@nclazz.de",
|
||||
"url": "nclazz.de"
|
||||
},
|
||||
"license": {
|
||||
"name": "MIT",
|
||||
"url": "https://opensource.org/licenses/MIT"
|
||||
}
|
||||
},
|
||||
"imports": [],
|
||||
"headers": [],
|
||||
"enums": {},
|
||||
"interfaces": {},
|
||||
"models": {
|
||||
"healthcheck": {
|
||||
"description": "A simple response indicating the health status of a service.",
|
||||
"fields": [
|
||||
{
|
||||
"name": "status",
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"unions": {},
|
||||
"resources": {
|
||||
"healthcheck": {
|
||||
"path": "/_internal_/healthcheck",
|
||||
"operations": {
|
||||
"method": "GET",
|
||||
"path": "/healthcheck",
|
||||
"description": "Simple healthcheck endpoint to test the status of the service.",
|
||||
"responses": {
|
||||
"200": {
|
||||
"type": "healthcheck",
|
||||
"description": "Get the current health status of the service."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"attributes": {},
|
||||
"annotations": {}
|
||||
}
|
Loading…
Reference in New Issue