Bitbucket is getting a new navigation

We’re rolling out these changes, so the documentation may not match your experience in the Bitbucket Cloud app. Read about the new Bitbucket navigation

npm へのデプロイ

Bitbucket Pipelines を使用して、npm パッケージをビルド、テスト、公開することができます。

You can use the feature of pushing back to your repository from within your pipeline to update the tag.

ビルドの無限ループを回避するため、バージョンをアップグレードする際のコミット メッセージには必ず [skip ci] を含めてください。

Use the npm publish pipe to publish the package to the npm registry. To publish to a private npm package, edit your package.json to add a section like the example below.

package.json { "name": "package", "version": "1.0.11", "description": "Description", "publishConfig":{"registry":"my-internal-registry.local"} }

There are even more examples in the pipe repository of how to use the pipe with npm.

For this example, we need to add the $NPM_TOKEN variable in Bitbucket.

bitbucket-pipelines.yml image: node:10.15.1 pipelines: default: - step: name: Build and Test script: - npm install - npm test - step: name: Publish deployment: production script: - npm version minor -m "Upgrade to %s [skip ci]" - git push && git push --tags - pipe: atlassian/npm-publish:0.2.0 variables: NPM_TOKEN: $NPM_TOKEN

さらにヘルプが必要ですか?

アトラシアン コミュニティをご利用ください。