Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
.idea
3 changes: 2 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
node_modules
.idea
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM redshelf/chrome-node:nvm

COPY package.json /srv/app/package.json

WORKDIR /srv/app/

ARG NPM_TOKEN
RUN NPM_TOKEN=$NPM_TOKEN npm i

COPY . /srv/app

36 changes: 36 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
stage('publish') {
node('redshelf') {

checkout scm;

env.TAG_NAME = shWithReturn('git describe --exact-match --tags HEAD || :');

if(isTagBuild()) {
env.DOCKER_TAG = dockerTag(env.TAG_NAME.substring(0, env.TAG_NAME.length() - 1));
env.NPM_TAG = 'stable';
} else {
env.DOCKER_TAG = "";
env.NPM_TAG = "";
}

if(env.DOCKER_TAG != "") {
withCredentials([string(credentialsId: 'npm-token', variable: 'NPM_TOKEN')]) {
sh 'sudo -E docker build --build-arg NPM_TOKEN=$NPM_TOKEN-t ${DOCKER_TAG} .';
sh 'sudo -E docker run -e "NPM_TOKEN=$NPM_TOKEN" ${DOCKER_TAG} bash -c "npm --no-git-tag-version version ${DOCKER_TAG} && npm publish --tag ${NPM_TAG}"';
sh "sudo -E docker push ${DOCKER_TAG}";
}
}
}
}

def dockerTag(buildName) {
return "redshelf/git-release-notes:${buildName}";
}
def isTagBuild() {
return env.TAG_NAME && env.TAG_NAME != "";
}

def shWithReturn(script) {
returnVal = sh(returnStdout: true, script: script);
return returnVal;
}
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 18 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
{
"author": "ariatemplates <contact@ariatemplates.com> (http://github.com/ariatemplates)",
"name": "git-release-notes",
"author": "redshelf",
"name": "@redshelf/git-release-notes",
"description": "Generate beautiful release notes from a git log.",
"keywords": [
"git",
"log",
"release notes",
"compare",
"version"
],
"scripts": {
"lint": "eslint --fix cli.js index.js lib",
"test": "jest",
Expand All @@ -19,29 +12,27 @@
"test-script": "node cli.js -s ./samples/post-processing.js 32a369f..0419636 ./templates/markdown.ejs",
"test:watch": "jest --watch"
},
"version": "3.3.1",
"version": "0.0.0",
"dependencies": {
"date-fns": "^1.29.0",
"debug": "^3.1.0",
"ejs": "^2.5.7",
"optimist": "^0.6.1"
},
"contributors": [
{
"name": "Fabio Crisci",
"email": "fabio@ariatemplates.com",
"url": "https://github.com/piuccio"
}
"redshelf"
],
"bin": "./cli.js",
"bin": {
"git-release-notes": "./cli.js"
},
"repository": {
"type": "git",
"url": "https://github.com/ariatemplates/git-release-notes"
"url": "git+https://github.com/virdocssoftware/git-release-notes.git"
},
"engines": {
"node": ">=4"
},
"homepage": "https://github.com/ariatemplates/git-release-notes",
"homepage": "https://github.com/virdocssoftware/git-release-notes",
"preferGlobal": true,
"devDependencies": {
"cross-env": "^5.1.3",
Expand All @@ -53,5 +44,13 @@
"testMatch": [
"**/*.test.js"
]
}
},
"bugs": {
"url": "https://github.com/virdocssoftware/git-release-notes/issues"
},
"main": "index.js",
"directories": {
"lib": "lib"
},
"license": "ISC"
}