bitbucket-pipelines

Configuring a bitbucket repository to “activate” pipelines

和自甴很熟 提交于 2019-12-11 09:14:43
问题 I have multiple repositories in a BitBucket project. I wish to automatically create a bitbucket repository, and enable pipelines (setting the pipeline configuration should be easy, with pushing a bitbucket-pipelines.yml file). How can I do it using the REST API? 回答1: You can create a repository with the BitBucket REST API. $ curl -X POST -H "Content-Type: application/json" -d '{ "scm": "git", "project": { "key": "Foo" } }' https://api.bitbucket.org/2.0/repositories/<username>/<repo_slug> Push

JSON value substitution in bitbucket pipeline

依然范特西╮ 提交于 2019-12-11 07:38:40
问题 I have a JSON file "appSettings.json" which has the following content: { "Branch": { "Name": "test" }, } My question is, how do I set the value "Branch.Name" to something else when running the bitbucket pipleline? 回答1: figured it out after checking this question. - apt-get update - apt-get install -y jq # install jq - tmp=$(mktemp) - jq '.Branch.Name = "prod"' appsettings.json > "$tmp" && mv "$tmp" appsettings.json 回答2: You can use standard Bash/Shell commands to do a 'Find and Replace'

Docker: bitbucket pipelines ext-zip *

前提是你 提交于 2019-12-11 04:37:21
问题 I'm trying to set up pipelines with Bitbucket for one of the Laravel driven project and I've spent already hours trying to get it to work, but just can't get over the following: + composer install Do not run Composer as root/super user! See https://getcomposer.org/root for details Loading composer repositories with package information Installing dependencies (including require-dev) from lock file Your requirements could not be resolved to an installable set of packages. Problem 1 -

Bitbucket pipelines deploy to gCloud AppEngine causes [13] An internal error occurred

南笙酒味 提交于 2019-12-11 01:12:56
问题 I'm trying to use bitbucket pipelines with my project. I use Nodejs. When I'm running gcloud app deploy manually from Mac or Windows - it works fine, deploy successfully finishes. But from bitbucket pipelines it fails with Error Response: [13] An internal error occurred. Here is the stack trace which I've got by running gcloud app deploy --verbosity=debug : Updating service [default]... .DEBUG: Operation [apps/my-project/operations/a68a837e-edcf-4987-83db-d9b47f4309ae] not complete. Waiting

Can “if” statements be used in bitbucket pipelines?

痞子三分冷 提交于 2019-12-10 13:04:27
问题 Im trying to run the following step, but it does not execute the "if" steps (lines 5 and 6) (I'm pretty sure they should as the directory tested for does not exist, i tried in multiple formats of bash if, but all of them fails. Is there a way to test for a condition than the one I'm using? - step: name: Google Cloud SDK Installation caches: - pip - cloudsdk script: - export ENV=dev - source scripts/setenv.sh - export CLOUDSDK_CORE_DISABLE_PROMPTS=1 - SDK_FILENAME=google-cloud-sdk-$SDK_VERSION

SSH into staging machine from docker instance using Bitbucket Pipelines

偶尔善良 提交于 2019-12-09 04:46:29
问题 Using the new Bitbucket Pipelines feature, how can I SSH into my staging box from the docker container it spins up? The last step in my pipeline is an .sh file that deploys the necessary code on staging, however because my staging box uses public key authentication and doesn't know about the docker container, the SSH connection is being denied. Anyway of getting around this without using password authentication over SSH (which is causing me issues as well by constantly choosing to

How to use git submodules with Bitbucket pipelines?

老子叫甜甜 提交于 2019-12-08 02:39:51
问题 How to use git submodules with Bitbucket pipelines? I'm using Bitbucket pipelines to build my project and I'm having issues pulling in my submodule, I'm probably not configuring the SSH keys correctly. What I've done: Created SSH key pair in my computer. Pasted the same key pair in both repositories (repo where the build will run and in the dependency repo) under Settings/SSH keys. The build error: Submodule 'dependencies/my-dependency' (git@bitbucket.org:mycompany/my-dependency.git)

Bitbucket pipeline fail to push to heroku

﹥>﹥吖頭↗ 提交于 2019-12-07 13:10:21
问题 I do have a react.js app (create-react-app) I setup the file just like explained in the official docs, everything went good but the push failed with this specific line git push https://heroku:$API_KEY@git.heroku.com/$APP_NAME.git HEAD:master The bitbucket-pipelines.yml is on the root folder: image: node:6 clone: depth: full pipelines: default: - step: script: - npm install - npm test - git push git push https://heroku:$API_KEY@git.heroku.com/$APP_NAME.git HEAD:master What I'm doing wrong? The

Auto Deploy Angular 4 App using Bitbucket Pipeline and AWS CodeDeploy

你说的曾经没有我的故事 提交于 2019-12-06 08:13:58
问题 I have an Angular 4 app with MongoDB and NodeJS . I have been looking into auto deployment of my app on amazon AWS EC2 instance. I am using BitBucket repo for my project. After reading through articles I have come across Bitbucket Pipeline and AWS CodeDeploy . There are many scenarios and configurations to be done in order to get it done. I am really confused after reading all the documentations all day. I want to auto deploy my app when code is pushed to specific branch. Can someone please

Bitbucket pipeline fail to push to heroku

删除回忆录丶 提交于 2019-12-06 03:48:28
I do have a react.js app (create-react-app) I setup the file just like explained in the official docs, everything went good but the push failed with this specific line git push https://heroku :$API_KEY@git.heroku.com/$APP_NAME.git HEAD:master The bitbucket-pipelines.yml is on the root folder: image: node:6 clone: depth: full pipelines: default: - step: script: - npm install - npm test - git push git push https://heroku:$API_KEY@git.heroku.com/$APP_NAME.git HEAD:master What I'm doing wrong? The goal here is to use the CI on bitbucket platform but also push master commits to heroku repository to