Bamboo script task artifact - continuous-integration

I am using Bamboo as a build server. We typically only build maven projects which is really easy with Bamboo.
We are now trying to build debian packages with Bamboo. I am able to build the .deb file just fine, but I would like to be able to use that deb file as an artifact for another task, such as adding it to a reprepro instance. I'm trying to separate the tasks out so I can reuse the "deploy to reprepro" task in all of my other plans.
I can't find a ton of documentation on script tasks other than very simple things. How can I do this? Or are there any plugins that I have missed that will build and deploy a deb for me? Thanks!

You should be able to find further information on Bamboo and Maven artifacts here:
https://confluence.atlassian.com/display/BAMBOO034/Configuring+Artifact+Sharing+between+Jobs

Related

Jenkins pipeline and Chef for Continues Deployment

I'm working on scenario, Jenkins is my CI tools and Maven is my build tool, ere I will be configuring the Jenkins pipeline through Jenkins file, but after the build steps are done, I want to deploy and install the artifacts (i.e .Jar files or some other) using chef(cookbooks-recipies) on the nodes, I was confused how can I achieve this process ! please help me
Thanks.
This question is way too vague to get a useful answer, and even if you make it more specific it's a very very broad question. I've got a write-up of my most recent build of this at https://coderanger.net/jenkins/, feel free to crib from it in part or in full.
Jenkins pipeline setup for the continues integration and Deployment, My only confusion was how Jenkins and chef are going to communicate in this process, after the continue integration, I want the chef to take over and install the Jar packages and deploy them on the several nodes. Here maven is my build tool. In Jenkins pipeline I can setup until the build is done , is there any thing that I can do in the Post section of the pipeline for the chef communication for deployment or it has to be done from the chef/cookbook/recipes/name.rb, is there any Jenkins plugin that make it possible !
Check chef plugin that lets you
run chef-client on remote host.
In Jenkins, deploy to a container plugin will help you to deploy your code to any of the workstation and use knife to upload into chef server and get deployed to all the nodes

Jenkins build and deploy separately

I need help in configuring a jenkins job. I am able to deploy the code using mule mvn deploy command in a single job. Now i need to build the package and use the package to deploy it to multiple environments with out building it again. Can some one help me with that. I am able to package the code using mvn package. BUt when I want to deploy the build package I am using mvn deploy command and this is compiling and building the code. Am I missing something?
Usually, you would build the project and then deploy it to one Nexus/Artifactory. If you need it in different artifact repositories, you usually proxy the original repository in the other repository.
If you really need to deploy the same file to two Nexus/Artifactory, you can add additional deployments using the goals in the deploy plugin.

Jenkins: How to complete a Gradle build with dependencies not in nexus?

I have a Gradle based project that is dependent on a couple of other projects one built via maven another via gradle. I can't push the other projects to our "enterprise" nexus repo because that involves much time/paperwork/pain. So is there a workaround I can use. Locally we simply build the other two projects so they are in our local repo and then can pull them from there. How can I achieve something similar on Jenkins? Each project is in a seprate Git repo.
I think you can do exactly the same thing inside Jenkins.
Before starting to build the gradle project, try checkout other projects firstly, and build them, so it will be installed into your local repo.
Then build the gradle as you did locally.
Br,
Tim

How to split maven tasks between tasks and pipelines without running redundant maven tasks

I'm trying to set up a deployment pipeline using GoCD as follows:
Compile, test and deploy to Maven repo
Check out source code from SVN
Run mvn clean compile test install
Run mvn deploy to deploy the WAR artifact to Sonatype repo
Deploy to Tomcat server
Retrieve WAR artifact from Sonatype repo
Run mvn tomcat7:redeploy to deploy it to the Tomcat instance I have running
The thing is, I can't seem to split 1.2 and 1.3 (for example) without having to rerun the whole the entire source code checkout again in 1.3. This seems redundant to me as I had already gotten it up to the package stage and should be able to just continue to run from there.
Between 1.3 and 2.2, I can see that it can retrieve the WAR artifact from Sonatype, but I can't do much with it with maven because there's just no pom.xml for me to execute the maven task with. Of course, I can just add the source code material and run the entire mvn package tomcat7:redeploy cycle again, but I'm pretty sure that's not what this was designed for initially.
I can also write a shell script and ask Go to run it to copy the WAR file to the right location, but again, I could have done everything in one maven pass and save myself some effort but that would just reduce the entire pipeline to a single box which isn't much help to help visualize the deployment pipeline.
Can I get some advice on how I should be designing this pipeline if I wanted to split a maven task flow into different Go tasks / pipelines?
Thanks
Wong

Maven deploy multi module project only if all modules build successfully

I have a maven multi module project with several modules. I want to deploy them (mvn deploy) only if they all pass a full mvn install (which includes the tests).
Currently, I run a mvn install on the project. If all modules pass, I run mvn deploy to do the deployment. The problem I see is the waste of time calling mvn twice (even if I skip tests on the second run).
Does anyone have an idea on this?
EDIT: I have learned that using Artifactory as a repository manager and the maven-artifactory-plugin with your maven setup will add the atomic deploy behaviour to the mvn deploy command. See the Build Integration section in the Artifactory documentation.
[DISCLOSURE - I'm associated with JFrog. Artifactory creator.]
Take a look at the deployAtEnd parameter of Maven Deployment plugin: http://maven.apache.org/plugins/maven-deploy-plugin/deploy-mojo.html
This is a bit tricky. Maven is not atomic when it executes the build life-cycle. So a broken set of artifacts may end up in a repository.
One solution I know is Nexus Pro: http://www.sonatype.com/Products/Nexus-Professional/Features - it allows you to promote builds or define certain repos as staging. So only verified versions get promoted to be used. Maybe artifactory has something similar - I just don't know.
If that solution is too expensive you probably need to create a cleanup build or profile to remove artifacts that where already uploaded. My first guess would be to write a Maven plugin to use the the proxy remote API or maybe the maven features are already sufficient. But since deploy means update the meta-data xml files too I dont think there is a delete - not sure on this either.

Resources