It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to deploy artifacts from pipelines?

Amiram Korach Jul 27, 2016

I want to deploy artifacts from pipelines build. I don't want the build to do the deploy for me, but I want it to give me just the artifacts and then I'll deploy them to aws, like I have now in bamboo. Is is possible?

1 answer

1 accepted

0 votes
Answer accepted
Thomas Bradshaw Atlassian Team Jul 28, 2016

At the moment there is no way to access artifacts after the build is finished. A work around is to build and deploy within the pipelines step or to transfer your artifacts to a server to which you have access and then retrieve it from this server.

To use SFTP with pipelines please consult the guide here: https://answers.atlassian.com/questions/39429257/how-do-i-set-up-ssh-public-key-authentication-so-that-i-can-use-ssh-sftp-or-scp-from-my-bitbucket-pipelines-pipeline

Alternatively to deploy to AWS from pipelines consult the guides here:

S3: https://bitbucket.org/ian_buchanan/pipeline-example-aws-s3

CodeDeploy: https://bitbucket.org/shivaman/bb_codedeploy_helloworld

Elastic Beanstalk: https://bitbucket.org/irlrobot/bb_beanstalk_python/src

Amiram Korach Jul 30, 2016

Thanks. Is it planned?

Kashif-Ur-Rehman Nov 21, 2016

@Thomas Bradshaw, I created a war from pipeline, my build is successfully completed. But i cannot see War file any where.
Here are  ending logs..
Copying webapp resources [/opt/atlassian/pipelines/agent/build/EmailService/WebContent]
[INFO] Webapp assembled in [117 msecs]
[INFO] Building war: /opt/atlassian/pipelines/agent/build/EmailService/target/EmailService-1.0-SNAPSHOT.war
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS


Will you please help me that how i can get that WAR file ? 

isaac weathers Dec 06, 2016

That's my question too. After I run a gradle build the build is generated in a build/libs/ directory but that is not checked in to the repo. So when I try to upload the artifact it does not see it. 

isaac weathers Dec 07, 2016

Found a solution https://answers.atlassian.com/questions/users?username=557058%7Ce2a778fb-f12e-41d6-9ed4-bfa92edd319a 

Run it from a bash script instead. The steps are just that... steps. So you need to run sets of executables together so they have a logical chaining order. 

EX:

#!/usr/bin/env bash

./gradlew clean build --stacktrace --no-daemon
python s3_upload.py sample build/libs/sample.war build/libs/sample.war
- step:
    script: # Modify the commands below to build your repository.
      - chmod +x pipelines-runner.sh #needed to allow Pipelines to run shell scripts
      - ./pipelines-runner.sh
Kashif-Ur-Rehman Dec 07, 2016

@isaac weathers you can also run maven script to get war file and then transfer that file to your FTP server. i.e 

you can get help from here:-
https://answers.atlassian.com/questions/39429257 

 

 

          

Kashif-Ur-Rehman Feb 21, 2017

@Thomas Bradshaw, is there any way that we can transfer our file (war file if build is successful) from pipeline to windows server instead of linux ? 

Thomas Bradshaw Atlassian Team Feb 21, 2017

Hi @Kashif-Ur-Rehman,

I can see you asked a similar question on https://answers.atlassian.com/questions/39429257 Steven's response to that question seems to answer the question nicely. From a pipelines perspective deploying to a windows or linux SFTP server should be exactly the same.

Cheers,

Tom

Kashif-Ur-Rehman Feb 21, 2017

Yes, I saw his reply, and going through his instructions.

Thanks  

Kashif-Ur-Rehman Mar 02, 2017

@Thomas Bradshaw, what should i do for transferring artifacts (war/ear file) to windows base server from pipeline cloud ?
right now I have installed "SFTP/SSH Server on Windows using OpenSSH"
here is URL :- https://winscp.net/eng/docs/guide_windows_openssh_server#installing_sftp_ssh_server

but i am not sure how can i send artifacts from cloud to windows server ? 

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Bitbucket Pipelines

Building a Bitbucket Pipe as a casual coder

...ipe.sh :  #!/bin/bash source "$(dirname "$0")/common.sh" enable_debug extra_args="" if [[ "${DEBUG}" == "true" ]]; then extra_args="--verbose" fi # mandatory variables R...

3,121 views 1 22
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you