-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
For more details on the release process, please read docs/RELEASE.md In previous releases, we packaged the db2ia.node and other extra files Now we restrict the files packaged using the files section of the package.json https://docs.npmjs.com/cli/v8/configuring-npm/package-json#files
- Loading branch information
Showing
9 changed files
with
5,946 additions
and
3,954 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
pipeline { | ||
agent { | ||
node { | ||
label 'ibmi7.3' | ||
} | ||
} | ||
environment { | ||
NODE_PATH = '/QOpenSys/pkgs/lib/nodejs18/bin' | ||
} | ||
stages { | ||
stage('build') { | ||
steps { | ||
sh ''' | ||
export PATH=$NODE_PATH:$PATH | ||
npm i | ||
./node_modules/.bin/node-pre-gyp rebuild --production | ||
./node_modules/.bin/node-pre-gyp package | ||
''' | ||
} | ||
} | ||
stage('create-gh-release') { | ||
environment { | ||
GH_TOKEN = credentials('idb-connector-gh-token') | ||
} | ||
steps { | ||
sh ''' | ||
export PATH=$NODE_PATH:$PATH | ||
export GITHUB_TOKEN=$GH_TOKEN_PSW | ||
./node_modules/release-it/bin/release-it.js --ci --no-increment --no-git --github.release --github.update --no-plugins.@release-it/conventional-changelog.infile | ||
''' | ||
} | ||
} | ||
stage('create-npm-release') { | ||
environment { | ||
NPM_TOKEN = credentials('idb-connector-npm-token') | ||
} | ||
steps { | ||
sh ''' | ||
export PATH=$NODE_PATH:$PATH | ||
npm config set --location=project //registry.npmjs.org/:_authToken $NPM_TOKEN | ||
./node_modules/release-it/bin/release-it.js --ci --no-increment --no-git --npm.publish --npm.skipChecks --no-plugins.@release-it/conventional-changelog.infile | ||
''' | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
PATH="/QOpenSys/pkgs/bin:$PATH" | ||
DATE=$(date +"%Y-%m-%d_%H-%M-%S") | ||
BRANCH="release-$DATE" | ||
REMOTE="origin" | ||
MAIN_BRANCH="master" | ||
|
||
if [ ! -d node_modules ]; then | ||
# install deps | ||
npm install | ||
fi | ||
|
||
# checkout main branch and pull the latest changes | ||
git checkout $MAIN_BRNACH | ||
git pull $REMOTE $MAIN_BRANCH | ||
# create release branch and run release | ||
git checkout -b "$BRANCH" $REMOTE/$MAIN_BRANCH | ||
npm run release | ||
# push branch to upstream remote to open a PR | ||
git push $REMOTE $BRANCH | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ build* | |
.lock* | ||
lib/binding/ | ||
npm-debug.log | ||
.npmrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"npm": { | ||
"publish": false | ||
}, | ||
"git": { | ||
"commitMessage": "chore: release ${version}", | ||
"push": false, | ||
"tag": false | ||
}, | ||
"github":{ | ||
"assets": ["build/stage/${version}/*.tar.gz"], | ||
"release": false, | ||
"autoGenerate": true, | ||
"releaseName": "${version}" | ||
}, | ||
"plugins": { | ||
"@release-it/conventional-changelog": { | ||
"header": "# idb-connector changelog", | ||
"preset": "conventionalcommits", | ||
"infile": "CHANGELOG.md", | ||
"ignoreRecommendedBump": true | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Release | ||
|
||
To create a new release the developer first needs to run `release.sh` | ||
```sh | ||
./release.sh | ||
``` | ||
|
||
This script will create a new release branch, run release-it, push the new branch upstream. | ||
|
||
From there the developer needs to: | ||
|
||
1) Open a pull request, have it approved by at least 1 reviewer, and merged into the master branch | ||
2) Create a new release and tag from the [GitHub Web UI](https://github.com/IBM/nodejs-idb-connector/releases/new) with the release and tag name matching the version number in package.json. | ||
|
||
|
||
After the release is created our Jenkins instance will: | ||
|
||
1) Build the package | ||
2) Update the GH release with the binary asset | ||
3) Publish the release to NPM | ||
|
||
After the release, the package version should be bumped to a `*-devel` suffix. | ||
This will make node-pre-gyp build from source in development builds or when installing the project from a git url. |
Oops, something went wrong.