Tag: bitbucket

带有NPM的私有存储库的版本号注释

我正在将一个正在工作的工具放到我们的工作项目中。 该工具是在一个私人的bitbucket存储库,我把它拉到项目的package.json下面的依赖线: "content-deployment-tool": "git+https://<account>:<apikey>@bitbucket.org/<account>/content-deployment-tool.git#2.0.2", 这是有效的,但是这是一个PITA b / c,我不得不每次更新标签号并在content-deployment-tool存储库中推送一个新的标签。 我试过使用语义版本通配符来logging我想要的版本号…#^2.0.0 ,但是在尝试时出现错误。 npm ERR! code 1 npm ERR! Command failed: /usr/bin/git checkout ^2.0.0 npm ERR! error: pathspec '^2.0.0' did not match any file(s) known to git. 我是否每次都需要硬编码? 我很难find有关从私人回购专门注意版本号的文档。

我们是否需要在bitbucket上推送node_modules

在bitbucket上推送angular2应用程序时,是否还需要将node_modules和typings文件夹一起推送? 我不得不在azure色的应用程序。 据我从各种文章了解到,当我们部署在Azure上,然后运行npm install本身,因此node_modules和types文件夹被创build。 请分享一下。

如何在Bitbucket上的Azure网站上部署一个git标签

我们目前正在使用git flow来开发在Azure网站上运行的nodejs网站。 这个部署在一个分支(例如开发)中运行良好,但是如果我指定一个版本标签(甚至强制与BitBucket同步),似乎不会检出任何新东西。 任何想法如何我应该这样做,因为我真的想要生产网站匹配一个版本?

package.json中使用bitbucket在Azure上部署Angular2项目时出错

我正面临在azure上部署angular2应用的问题。 我在下面的行中遇到错误 "engines":{"node":"6.2.1"}, 我已经给出了这个版本,因为WEBSITE_NODE_DEFAULT_VERSION的值是6.2.1。 任何人有这个想法然后请分享。 这是错误快照: package.json看起来如下所示: { "name": "angular-quickstart", "version": "1.0.0", "engines":{"node":"6.2.1"}, "description": "QuickStart package.json from the documentation, supplemented with testing support", "scripts": { "start": "tsc && concurrently \"tsc -w\" \"lite-server\" ", "docker-build": "docker build -t ng2-quickstart .", "docker": "npm run docker-build && docker run -it –rm -p 3000:3000 -p 3001:3001 ng2-quickstart", "pree2e": "npm […]

有没有一种简单的方法在Bitbucket Pipelines Docker容器中更改为非root用户?

Bitbucketpipe道使用Docker容器来执行任务,默认情况下,Docker容器以root身份运行。 这是NPM生命周期脚本的一个问题,因为NPM在运行脚本时试图降级它的权限。 当执行postinstall脚本时, NPM会抛出一个错误 ,它cannot run in wd %s %s (wd=%s) 。 最简单的解决scheme是使用–unsafe-perm标志运行npm install,但我不喜欢这种方法。 Docker写Dockerfiles的最佳实践指出: 如果一项服务可以运行没有权限,使用USER来更改为非root用户。 当configuration一个典型的Docker容器时,我将创build一个新的非root用户,并以该用户身份运行我的npm脚本。 在阅读Pipelines文档后,我找不到Docker的USER命令的任何等价物。 我可能能够使用useradd , chown和su (还没有testing过),但有一个更简单的解决scheme吗? 不幸的是,添加useradd , chown和su到bitbucket-pipelines.yml脚本部分中断pipe道并导致失败的repo:push webhook。 image: node:6.2 pipelines: default: – step: script: – useradd –user-group –create-home –shell /bin/false node – chown -R node: /opt/atlassian/bitbucketci/agent/build – su -s /bin/sh -c "npm install" node – su […]

直接从Bitbucket部署到AWS Elastic Beanstalk

如何将最新的位(在本例中为nodejs应用程序)从Bitbucket部署到AWS Elastic Beanstalk。 我想避免从我的本地系统做一个git aws.push,因为这推动了整个repo,在低带宽情况下可能会很痛苦。 我想要的是能够在本地提交我的更改,然后推送到Bitbucket。 然后触发从Bitbucket到Elastic Beanstalk部署的部署。 任何帮助,将不胜感激。 我很乐意避免为了这样做而注册第三方服务,但是如果有必要的话,我会欢迎您的build议

不能npm从bitbucket回购安装

我试图安装最近从github移动到bitbucket的私人包。 npm install git@bitbucket.org:owner/repo.git结束与npm http GET https://registry.npmjs.org/git (注意url中的包)与此错误npm ERR! notarget No compatible version found: git@'bitbucket.org:flyvictor/fortune-secruity.git' npm ERR! notarget No compatible version found: git@'bitbucket.org:flyvictor/fortune-secruity.git' (注意@之后) 我试图逃避@,用引号包装回购商名,但总是得到相同的结果。 对于github我们使用URL格式为git://github.com/owner/repo#vvv ,这工作正常! 但是,如果我使用相同的语法bitbucket npm挂起什么都不做。 任何想法? ps密钥,访问权限等都是正确的。 我可以为这些回购做出贡献,用git克隆它们,但是不能用npm install。 安装好的Github包也是私有的。