Archived
0
0
Fork 0

ci: fix jenkinsfile

This commit is contained in:
Daryl Ronningen 2021-07-03 20:36:50 -05:00
parent 4b4d4aea5d
commit 5c595dfb05
Signed by: Daryl Ronningen
GPG key ID: FD23F0C934A5EC6B
3 changed files with 72 additions and 69 deletions

22
Jenkinsfile vendored
View file

@ -1,7 +1,7 @@
pipeline { pipeline {
agent { agent {
docker { docker {
image 'node:14-alpine' image 'node:14'
} }
} }
@ -12,7 +12,6 @@ pipeline {
GIT_AUTHOR_EMAIL = 'jenkins@relms.dev' GIT_AUTHOR_EMAIL = 'jenkins@relms.dev'
GIT_COMMITTER_NAME = 'JenkinsCI' GIT_COMMITTER_NAME = 'JenkinsCI'
GIT_COMMITTER_EMAIL = 'jenkins@relms.dev' GIT_COMMITTER_EMAIL = 'jenkins@relms.dev'
NODE_ENV = 'production'
} }
stages { stages {
@ -32,14 +31,17 @@ pipeline {
stage('Publish') { stage('Publish') {
steps { steps {
echo '==========Publishing to NPM==========' script {
if(env.BRANCH_NAME == 'master') { echo '==========Publishing to NPM=========='
echo '==========Publishing as Development Version==========' if(env.BRANCH_NAME == 'master') {
sh 'yarn version $(jq --raw-output ".version" package.json)-$(git rev-parse --short HEAD).$(date +%s)' echo '==========Publishing as Development Version=========='
sh 'yarn npm publish --tag dev' sh 'echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc'
} else if(env.BRANCH_NAME == 'stable') { sh 'yarn version $(node -pe \'require("./package.json").version\')-$(git rev-parse HEAD).$(date +%s)'
echo '==========Publishing as Stable Version==========' sh 'npm publish --tag dev --access public'
sh 'semantic-release' } else if(env.BRANCH_NAME == 'stable') {
echo '==========Publishing as Stable Version=========='
sh 'semantic-release'
}
} }
} }
} }

View file

@ -22,7 +22,8 @@
"node": ">=14.*" "node": ">=14.*"
}, },
"files": [ "files": [
"dist/index.js" "dist/index.js",
"types/*"
], ],
"scripts": { "scripts": {
"build": "rollup -c --compact", "build": "rollup -c --compact",

116
yarn.lock
View file

@ -5,64 +5,6 @@ __metadata:
version: 4 version: 4
cacheKey: 8 cacheKey: 8
"@argonjs/library@workspace:.":
version: 0.0.0-use.local
resolution: "@argonjs/library@workspace:."
dependencies:
"@commitlint/cli": ^12.1.4
"@commitlint/config-conventional": ^12.1.4
"@commitlint/cz-commitlint": ^12.1.4
"@istanbuljs/nyc-config-typescript": ^1.0.1
"@rollup/plugin-strip": ^2.0.1
"@saithodev/semantic-release-gitea": ^2.1.0
"@semantic-release/changelog": ^5.0.1
"@semantic-release/commit-analyzer": ^8.0.1
"@semantic-release/git": ^9.0.0
"@semantic-release/npm": ^7.1.3
"@semantic-release/release-notes-generator": ^9.0.3
"@types/chai": ^4.2.19
"@types/eslint": ^7.2.13
"@types/mocha": ^8.2.2
"@types/node": ^15.14.0
"@types/rollup-plugin-progress": ^1.1.0
"@types/rollup-plugin-size-snapshot": ^0.10.0
"@types/semantic-release": ^17
"@types/sinon": ^10.0.2
"@types/source-map-support": ^0.5.3
"@typescript-eslint/eslint-plugin": ^4.28.1
"@typescript-eslint/parser": ^4.28.1
"@typescript-eslint/typescript-estree": ^4.28.1
chai: ^4.3.4
commitizen: ^4.2.4
eslint: ^7.29.0
eslint-formatter-pretty: ^4.1.0
eslint-plugin-header: ^3.1.1
husky: ^7.0.0
inquirer: ^8.1.1
lint-staged: ^11.0.0
mocha: ^9.0.1
nyc: ^15.1.0
pinst: ^2.0.0
rimraf: ^3.0.2
rollup: ^2.52.7
rollup-plugin-analyzer: ^4.0.0
rollup-plugin-multi-input: ^1.3.1
rollup-plugin-progress: ^1.1.2
rollup-plugin-size-snapshot: ^0.12.0
rollup-plugin-sizes: ^1.0.4
rollup-plugin-terser: ^7.0.2
rollup-plugin-typescript2: ^0.30.0
rollup-plugin-visualizer: ^5.5.1
semantic-release: ^17.4.4
sinon: ^11.1.1
source-map-support: ^0.5.19
ts-node: ^10.0.0
tsconfig-paths: ^3.9.0
tslib: ^2.3.0
typescript: ^4.3.5
languageName: unknown
linkType: soft
"@babel/code-frame@npm:7.12.11": "@babel/code-frame@npm:7.12.11":
version: 7.12.11 version: 7.12.11
resolution: "@babel/code-frame@npm:7.12.11" resolution: "@babel/code-frame@npm:7.12.11"
@ -614,6 +556,64 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"@neonjs/library@workspace:.":
version: 0.0.0-use.local
resolution: "@neonjs/library@workspace:."
dependencies:
"@commitlint/cli": ^12.1.4
"@commitlint/config-conventional": ^12.1.4
"@commitlint/cz-commitlint": ^12.1.4
"@istanbuljs/nyc-config-typescript": ^1.0.1
"@rollup/plugin-strip": ^2.0.1
"@saithodev/semantic-release-gitea": ^2.1.0
"@semantic-release/changelog": ^5.0.1
"@semantic-release/commit-analyzer": ^8.0.1
"@semantic-release/git": ^9.0.0
"@semantic-release/npm": ^7.1.3
"@semantic-release/release-notes-generator": ^9.0.3
"@types/chai": ^4.2.19
"@types/eslint": ^7.2.13
"@types/mocha": ^8.2.2
"@types/node": ^15.14.0
"@types/rollup-plugin-progress": ^1.1.0
"@types/rollup-plugin-size-snapshot": ^0.10.0
"@types/semantic-release": ^17
"@types/sinon": ^10.0.2
"@types/source-map-support": ^0.5.3
"@typescript-eslint/eslint-plugin": ^4.28.1
"@typescript-eslint/parser": ^4.28.1
"@typescript-eslint/typescript-estree": ^4.28.1
chai: ^4.3.4
commitizen: ^4.2.4
eslint: ^7.29.0
eslint-formatter-pretty: ^4.1.0
eslint-plugin-header: ^3.1.1
husky: ^7.0.0
inquirer: ^8.1.1
lint-staged: ^11.0.0
mocha: ^9.0.1
nyc: ^15.1.0
pinst: ^2.0.0
rimraf: ^3.0.2
rollup: ^2.52.7
rollup-plugin-analyzer: ^4.0.0
rollup-plugin-multi-input: ^1.3.1
rollup-plugin-progress: ^1.1.2
rollup-plugin-size-snapshot: ^0.12.0
rollup-plugin-sizes: ^1.0.4
rollup-plugin-terser: ^7.0.2
rollup-plugin-typescript2: ^0.30.0
rollup-plugin-visualizer: ^5.5.1
semantic-release: ^17.4.4
sinon: ^11.1.1
source-map-support: ^0.5.19
ts-node: ^10.0.0
tsconfig-paths: ^3.9.0
tslib: ^2.3.0
typescript: ^4.3.5
languageName: unknown
linkType: soft
"@nodelib/fs.scandir@npm:2.1.5": "@nodelib/fs.scandir@npm:2.1.5":
version: 2.1.5 version: 2.1.5
resolution: "@nodelib/fs.scandir@npm:2.1.5" resolution: "@nodelib/fs.scandir@npm:2.1.5"