Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

bamboo deployment to nexus repository manager

Hi,

To put it simply. I have a src file, with pom.xml file in it. My job consist of the follow task 

Source code checkout , and build using maven x3. Now the question is i want to push this artifact to nexus oss repository manager. How can this be done? i do not see solutions for this. 

1 answer

1 accepted

1 vote
Answer accepted

Hi,

You should configure your Maven 3.x task with a goal like this:

clean install -U deploy

This assumes that the Maven executable you are using are configured to deploy to your Nexus repo.

Regards

Lasse Langhorn

Hi thank you ! :) 

The above worked for me. However, i will not be using pom.xml all the time. 

I found this following script below: 

if ((Test-Path -Path ${bamboo.build.working.directory}\uploadcheck.ps1) -ne "False") {

echo "script not found"

throw -1

}

. "${bamboo.build.working.directory}\uploadcheck.ps1"

uploadart "${bamboo.ship.buildmaster.username}" "${bamboo.ship.buildmaster.password}" "${bamboo.build.working.directory}\${bamboo.app.name.01}\" "WebApplicationMVC.zip" "${bamboo.nexus.artifactrepository.url}/${bamboo.nexus.artifactrepository.id}/${bamboo.nexus.artifactrepository.groupid}/${bamboo.app.name.01}/${bamboo.version}/WebApplicationMVC.zip"

uploadart "${bamboo.ship.buildmaster.username}" "${bamboo.ship.buildmaster.password}" "${bamboo.build.working.directory}\${bamboo.app.name.02}\" "WebApplicationSample.zip" "${bamboo.nexus.artifactrepository.url}/${bamboo.nexus.artifactrepository.id}/${bamboo.nexus.artifactrepository.groupid}/${bamboo.app.name.02}/${bamboo.version}/WebApplicationSample.zip"

uploadart "${bamboo.ship.buildmaster.username}" "${bamboo.ship.buildmaster.password}" "${bamboo.build.working.directory}\${bamboo.app.name.03}\" "WebAPI.zip" "${bamboo.nexus.artifactrepository.url}/${bamboo.nexus.artifactrepository.id}/${bamboo.nexus.artifactrepository.groupid}/${bamboo.app.name.03}/${bamboo.version}/WebAPI.zip"

uploadart "${bamboo.ship.buildmaster.username}" "${bamboo.ship.buildmaster.password}" "${bamboo.build.working.directory}\${bamboo.app.name.04}\" "WebApplicationCore.zip" "${bamboo.nexus.artifactrepository.url}/${bamboo.nexus.artifactrepository.id}/${bamboo.nexus.artifactrepository.groupid}/${bamboo.app.name.04}/${bamboo.version}/WebApplicationCore.zip"

uploadart "${bamboo.ship.buildmaster.username}" "${bamboo.ship.buildmaster.password}" "${bamboo.build.working.directory}\${bamboo.app.name.02}\" "WebApplicationSQL.zip" "${bamboo.nexus.artifactrepository.url}/${bamboo.nexus.artifactrepository.id}/${bamboo.nexus.artifactrepository.groupid}/${bamboo.app.name.02}/${bamboo.version}/WebApplicationSQL.zip"

 

Can this be used in the script task? for the deployment of artifact to nexus oss repo? Thank you. 

Hi,

I have worked with powershell, mostly shell scripts, so I guess you will have to do some experiements with the setup.

Regards

Lasse Langhorn

Hi,

 

I have not played around with scripting, any advice how i should move forward?

How do i understand the above? no help is given in the internet. If i were to write in powershell, any tips how will it be? 

Thank you and Regards,
Deepak Kumar 

Hi,

Sorry for not being specific. I have not worked with powershell that much. I assume your Bamboo server is running on a Windows machine.

Deploying to Nexus is best achieved by using Maven so if you are not using Maven all the time you will have to create some kind of script that can deploy your artifacts to Nexus.

But please consider using Maven when deploying to Nexus, it will make your life a lot easier. If same Java projects do not use Maven then consider using Maven.

Regards

Lasse Langhorn

Hi,

Thank you for the prompt reply ! The reason why is because i am using .NET projects and .Net framwork project, so i have to use PowerShell. Do you think you could guide me where to begin? totally stuck. Thank you ! Appreciate it truly. I will accept your answer too. 

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bamboo

Bamboo 7.2 is here!

I'm happy to announce that Bamboo 7.2 has been released and it’s overflowing with awesome new features. This will be the last major Server release before the launch of Bamboo DC. Bamboo logs We...

514 views 5 7
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