11
votes
Accepted
Is running docker-compose not supported in BitBucket?
Here is my solution: (bitbucket-pipelines.yml)
pipelines:
default:
- step:
script:
- export DOCKER_COMPOSE_VERSION=1.18.0
- export DOCKER_COMPOSE_URL=https://github....
10
votes
Accepted
What are best practices for using Ansible Vault on public CI's and Source Control Repositories like BitBucket?
--vault-password-file can instead point to an executable script that writes to stdout. This little-known feature should solve your problem.
First, write a simple, executable script that prints a ...
6
votes
how to automatically create a subdomain for every pull request
We do this at work.
We have a small server, let's call it the receiver, it's the target of the GitHub webhook events. It runs a small application that parses the payload and incorporates logic around ...
6
votes
How to close a branch by default after a pull request has been merged in Bitbucket?
What I really want is to add a comment to the accepted answer, but I don't have enough reputation to do so. So I'll note it here. I've closed BSERV-10344 because it's in the wrong tracker. This ...
6
votes
Accepted
Git & Jenkins: get latest green commit on branch
You don't make any mention of the scripting language you want to use, so I will talk specifically about the HTTP requests to the BitBucket API:
Assumptions
If you have a BitBucket Repository that ...
6
votes
Is running docker-compose not supported in BitBucket?
We are less likely to see support of native docker-compose integration because pipelines API is a custom implementation of similar functionality, and also because possible security issues, but looks ...
5
votes
Accepted
Bitbucket Webhook plugin for Jenkins - differentiate between branches
I believe it is now possible to configure the webhook on per-repo basis:
https://mohamicorp.atlassian.net/wiki/spaces/DOC/pages/381419546/Configuring+Webhook+To+Jenkins+for+Bitbucket+Bitbucket+Branch+...
4
votes
Accepted
Why does `docker-login` fail in BitBucket pipelines?
At the moment the docker login and docker push commands are only available to Pipelines Alpha members.
You can read about the features available to Alpha at "Pipelines Alpha".
In order to ...
4
votes
What approach should I follow for adopting continuous integration?
I am in a similar pair of shoes as you - I am currently, slowly, getting into the DevOps topics after having many, many years of conventional development (and close connections to conventional ops) ...
4
votes
How to close a branch by default after a pull request has been merged in Bitbucket?
For Bitbucket Server you can set this up on a project or repo-level under Settings > Branches (under the Workflow section), scroll to the bottom and tick this setting on and press save:
So all in ...
4
votes
Accepted
How to close a branch by default after a pull request has been merged in Bitbucket?
Apparently selecting the Close branch option in the very dialogue illustrated in your question will actually delete the branch as well. From
Why only "Close" a branch instead of "Delete" it?:
Ben ...
4
votes
Accepted
How to bind ports for docker container in bitbucket pipelines?
Try running with -d detached flag
docker run -td -p 3000:3000 -p 6379:6379 -p 8983:8983 my_dockerhub/image
# here ^
Containers started in detached mode exit when the root process used to run ...
4
votes
Trigger jenkins pipeline job with Bitbucket hook
If you just need generic post-receive hooks, you can just do a regular web hook and hit the build API endpoint. For instance, if the name of your Jenkins server is jenkins.example.com and the name of ...
3
votes
Accepted
Is it possible to create a robot account in bitbucket without creating a new email account?
After doing some research and comparing various documents it seems that a bot account is basically a real user account and needs a separate email account in order to create such an account as using an ...
3
votes
What approach should I follow for adopting continuous integration?
As you are already using Bitbucket, Bitbucket pipelines could be useful.
What languages are supported?
Node, Ruby, Python, PHP, and more. Anything you can run in a Docker
container is ...
3
votes
Jenkins Pipeline and stash Pull Request Builder not working on PR create/update
To expand on the answer above - try using:
branch: "origin/pr/${pullRequestId}/from"
Because in groovy, string interpolation is not done for simple strings - i.e. strings within single quotes. See ...
3
votes
Jenkins Pipeline and stash Pull Request Builder not working on PR create/update
In groovy script, you need to reference environment variables in a different way than in bash.
So probably this line is causing trouble:
branch: ('origin/pr/${pullRequestId}/from')
Try using:
...
3
votes
Is running docker-compose not supported in BitBucket?
I managed to use docker-compose to push images to a remote host by using the following image.
tmaier/docker-compose:latest
This is the basic docker image with docker-compose installed.
My bitbucket-...
3
votes
How can I automatically post Codefresh build results to pull requests in Bitbucket?
One could update the build status in bitbucket as follows:
Adding a build result to a commit
To associate a build result with a particular commit, you need to POST
a JSON object to the build ...
3
votes
Git & Jenkins: get latest green commit on branch
In a typical Continuous Delivery/Deployment pipeline you would have the following happen:
Developer pushes one or more commits, or, a pull request is merged.
Jenkins automatically builds and executes ...
3
votes
Jenkins & Bitbucket; cancel previous build if new commit made to same branch?
Note: this answer comes from my background of building custom solutions, it's not a config-only one, which, if available, would obviously be preferable. But it's maybe something to consider otherwise.
...
3
votes
Jenkins shows "No changes in any of the builds."
Temporary workaround
Instead of calculating changes between builds compare changes against specific branch.
Open job configuration
Go to Source Code Management -> Git -> Additional Behaviours
Add ...
3
votes
Deploying and testing features on a server by more than one developer
Since you have a single released version product one thing to consider would be keeping the Develop branch or not:
keeping it would have the advantage that at any moment you can bring in a hotfix in ...
2
votes
Is running docker-compose not supported in BitBucket?
bitbucket-pipelines.yml
image: python:3.8.1
pipelines:
branches:
"**":
- step:
name: Build
services:
- docker
caches:
- docker
...
2
votes
Accepted
Jenkins Testing PR's - allowing broken builds
On GitHub - you can't. Basically, their PRs are temporary branches, and there's no check if base commit is HEAD of branch to merge in.
This problem is solved with gating systems like Zuul, which puts ...
2
votes
Bitbucket Webhook plugin for Jenkins - differentiate between branches
You could:
prune your branches. (guessing you'd have done this by now if feasible.)
implement Jenkinsfile, a code-driven pipeline,
and simply remove the jenkinsfile from the branches you don't want
...
2
votes
Accepted
how to automatically create a subdomain for every pull request
this setup worked perfectly for me using aws code deploy:
2
votes
What approach should I follow for adopting continuous integration?
You've chosen a fairly difficult stack to support. WAMP is largely used in dev environments, and the windows builds of mysql, php, and apache typically lag their Linux counterparts by a significant ...
2
votes
Accepted
What are best practices of deploying docker-compose using Ansible?
Instead of using a symlink that will be stored as is in BitBucket one could use:
- name: Copy docker-compose.yml
copy:
src: ../../../../docker-compose.yml
dest: /path/to/docker-compose.yml
2
votes
Accepted
Is it possible to show a code coverage badge in bitbucket repositories?
You can certainly show a code coverage badge in a bitbucket repository, but it would have to be from an external source like jenkins, codeclimate, etc.
According to your link, if you are using ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
bitbucket × 48jenkins × 20
git × 10
jenkins-pipeline × 7
continuous-integration × 6
jenkins-plugins × 5
bcbsn × 5
bitbucket-pipelines × 4
docker × 3
ansible × 2
docker-compose × 2
gitlab × 2
deployment × 2
continuous-deployment × 2
builds × 2
git-hooks × 2
codefresh × 2
containers × 1
linux × 1
automation × 1
windows × 1
cicd × 1
jenkinsfile × 1
github × 1
python × 1