Philip Hodder Atlassian Team

Comments

  • Hello Joseph, For the workflow you're mentioning, you can use branch pipelines. For example: pipelines: branches: master: - step: script: - # Create zip and deploy to s3. pull-requests: feature-branch-*: - step: script: - # Run unit tests In this configuration, the zip creation and deployment will only happen when a new…
  • Hello, Q1: You're correct in how Pipelines works. The build binaries are stored temporarily in Bitbucket (for a week) if you define them as artifacts. Which you can then reference in later steps of the same pipeline, for deploying. If you'd like longer term storage, you can use an external service, such as JFrog's…
  • Hello, This could potentially be a formatting issue. I'm not 100% on the formatting that you used, as it didn't copy into the code block properly. However, I got the configuration to successfully parse with the following indentation: definitions: steps: - step: &build-web name: Build web & Zip server image:…
  • Hello, Are you trying to use the default Pip cache provided by Pipelines? You need to add that to your bitbucket-pipelines.yml: # bitbucket-pipelines.yml image: atlassian/default-image:2 pipelines: default: - step: caches: # Add this! - pip services: - docker script: # Modify the commands below to build your repository. #…
  • Hello, Right now you're using NPM in your bitbucket-pipelines.yml. Do you have an NPM project (you mention you just have a text file in your repository at the moment). NPM is a build tool that looks for a package.json file to get additional information for executing commands. It's typically used for Node.js and Javascript…
  • Hey Alan, Sorry for the delay, I was on annual leave for the last two weeks. Have you gotten any more information since your last message? Looking at what you have so far: * This definitely appears to be hitting the User Namespace security feature I mentioned earlier. Which is why this issue won't be occurring locally on…
  • Can you list out the steps you've tried for setting this up at the moment? It'll make it easier for me to see if you've missed anything in particular. From the error message, it looks like NPM isn't using SSH. It's calling an HTTPS URL, and mentions an invalid username and password, rather than an invalid SSH key.
  • Hi Hema, This question refers to SSH in Bitbucket Pipelines, not in Bamboo. I don't have much Bamboo exposure, so unfortunately I cannot provide much advice. Try looking for discussions in the Bamboo section of Community. If you can't find anything, try open a new question with details. Thanks, Phil
  • Hello Mustafa, By default, Pipelines uses a shallow clone when cloning the repository. If you'd like the entire Git history. Please set the clone depth to be full with the configuration…
  • Hello Attoumane, The cache is global across the entirely repository. However, for it to be used you need to specify the cache in the step definition. So you will need the bitbucket-pipelines.yml configuration you have in your question. Note that the Maven cache only caches dependencies. So it won't carry over the compiled…
  • Hi Vyacheslav, Could you include a copy of your Dockerfile here? When running "build" on Docker, once one Docker layer invalidates the Docker cache, all subsequent layers ignore the Docker cache. It's possible that you have a command early in your Dockerfile that invalidates the cache.…
  • Hello Welton, Bitbucket Pipelines doesn't have a local agent you can test against. We suggest you use Docker locally for this. You can open a feature request for this here: https://bitbucket.org/site/master/issues/new We have a feature request for a similar feature, which is SSH access into your build environment. Thanks,…
  • Hi Tomas, We have an open feature request for adding support for more than 10 steps. I suggest you follow that to receive updates when we have them. Thanks, Phil
  • Hi Luis, Currently, you can only have a single deployment environment associated with a single step. So you would need create a new step with a deployment tag to the new environment. Perhaps using YAML anchors may help you to remove some duplication across your deployment steps? Thanks, Phil
  • What's the tag you created? What does your bitbucket-pipelines.yml file look like?
  • No worries. We'll get there! 🕵️‍♂️ Lets try something else. What you got in the output of 1 could actually be a small lead. As the directory that failed to be created was now a different one than before (as that one now exists). It looks like we can create the directories though Bash commands. But behat is doing something…
  • @alanhardin hmmm. Okay, lets work through a few things. 1. Can I get you to add mkdir -p /var/www/app/var/cache/test/profiler inside of your run-bahat-tests.sh. Just after you run whoami should be fine. 2. If 1 returns permissions issues, can you then move that command before you run "chmod -R 777 /var/www/app/var". I'd…
  • @Jeannie wang the state of your step (in this case successful), is based on the exit code of your script. In this case, the command you're using to run your tests is still returning a successful exit code, even though you have a failing test. Bitbucket Pipelines only looks for the presence of failed tests in the xUnit…
  • Hey Alan, Sorry for the delay getting back to you. Yeah, looks like the chmod commands wont work in this case. So lets not try that anymore. :) Can I get a little bit more information to debug with? Can you paste in an example of your docker-compose.yml? (Feel free to replace any sensitive data with dummy values) Can you…
  • Hello Matt, The step that moves the built app into the Docker image is the one in the Dockerfile. <span># Bundle app source</span><span>COPY</span><span> . /usr/src/app</span> The NPM install and NPM test steps are used if you're building are Javascript or NodeJS application. If you're building a .war, I assume you're…
  • Hi Neeraj, Your approach is how I recommend you do this. You will need to push your Docker image in your 'Deploy to test' step, and pass the name/tag of that image as an artifact to your 'Deploy to staging' step. You can then pull the image in that step and then trigger the staging deployment. Thanks, Phil
  • Hello, Bitbucket Pipelines now provides the ability to place restrictions on triggering Deployment Steps. Right now you can restrict them to only being triggered by repository administrators, and/or on a specific branch. For example, you could set a production deployment to only be able to be triggered by a repository…
  • Hello Olmo, EDIT: The Deployments REST API is available publicly. My mistake. You can view it here. The Step object in the Pipelines API will contain a reference to the environment if it is a deployment step. So that information may help you too. Have a look at the Jira integration I mentioned originally, as that may still…
  • Hello Evgeny, Currently we only show the information in your screenshot on the deployment card. But, I think it's a good use idea to be able to customise the message shown. Can you open a feature request, so that our product managers can track demand and use-cases for this. Thanks, Phil
  • Hi Dariusz, EDIT: My bad, the Deployments API has been released. However, it looks like the Deployment Variables endpoints weren't included in this. I've opened an internal ticket for this, and also another ticket here, which you can…
  • Hello William, We've just released a variable that exposes the UUID of the user that triggered a specific step. The variable is called: BITBUCKET_STEP_TRIGGERER_UUID We haven't documented it yet, as we've only just added it. But, it's ready for use! Thanks, Phil
  • Before the Docker-Compose. I suspect you'll need to make modifications to the Docker images that are being created, before they are referenced in your build. If you're building your own, you'll just need to add an instructions like: RUN chmod 777 /var/www/app/var/cache To the Dockerfile. If you're using a public image, can…
  • Hello Alan, Due to us having Docker user namespaces enabled, you will need to have fairly loose permissions when writing to Docker containers. In this case, the "/var/www/app/var/caches" directory is only writable by the "owner" of the directory. If you set the permissions to allow "other" (i.e. anyone) to be able to write…
  • Hello, Could you attach and example of your bitbucket-pipelines.yml file? Can you also check the "Build Teardown" logs of your pipeline, as it's possible that the directories you're trying to cache exceed the size limit of 1GB (after compression). Thanks, Phil
  • Hello Serge, I'm assuming this is for a Jira project? There is currently no automatic way to get the Jira project key within a Pipelines build. You could consider adding the Jira issue to the commit message itself, which will also automatically link in the URL with your Jira project in the UI, if you have set up the…