Is it possible to download and configure jenkins with a script? - bash

I want to develop a continuous integration with one or many scripts locally and then on a server.
For that I need Jenkins. I installed jenkins in a docker container, but would it be possible to configure it with a script so that the configuration can be used on any computer that runs it? When I talk about configuration, I'm talking about jenkins jobs and plugins.

You can use a configuration management tool like chef or ansible to install and configure in automated way. If using chef you can use the community cookbook. If you are only looking for creating jobs automated way check this thread. Similar way you will be able to create groovy script to install plugins as well.
Also take a look at this article

Related

Should I use a Docker container as a GitLab Runner?

Newbie to GitLab CI/CD here.
I'd like to use a linux base container as the Runner. Reason being I only have access to a Windows VM, and I'd rather not have to write PowerShell scripts build/test/deploy. Also, the build is using Spring Boot + maven, and I'm doubtful that the build scripts provided by Spring will run on Windows.
To further the problem, the build done by maven+spring spins up a container to execute the build. In other words, my build would run a container in a container, which seems feasible based on this blog.
Any feedback is much appreciated.
Edit based on #JoSSte 's feedback:
Are there any better approaches to setup a runner besides needing a container inside a container? For instance, if WSL enables running bash scripts, can the Windows VM act as the build server?
And to satisfy #JoSSte's request to make this question less opinion based, are there any best practices to approach a problem like this?

Pulling but not deploying nuget packages on Octopus Server

I'm packaging up some mongo scripts along with the necessary binaries to run them into a Nuget package via Teamcity. Now what I want to do with Octopus is pull that package, extract the contents and run the scripts once per deployment. I don't want or need these to be deployed to any machines as these scripts are not target machine specific. I was thinking via powershell I could
Download the package (possibly query the feed for a specific version)
Extract it
Run the scripts
Clean up
Anyone experienced a similar problem?
The solution is to install a Tentacle on the Octopus Server, assign it to all environments, give it a unique role along the lines of octopus-server, and then configure a script step to use the octopus-server role as your target. You can then write a PowerShell, C# or Bash script in that script step that will call and execute the mongo scripts that you have stored in your project. That way, it'll only run on your Octopus Server. I've done something similar to run MySQL scripts recently.
The OctopusDeploy docs provide a nice walkthrough here and an explanation of why they chose to handle it that way.

Jenkins to oracle

How to configure Jenkins to run Query (select, Update) on Oracle database,
Is there any plugin available in Jenkins?
Is there any easy way to write script in python?
Jenkins is a Continuous Integration (CI) tool. It is a development practice that requires developers to integrate code into a shared repository several times a day. Each check-in is then verified by an automated build, allowing teams to detect problems early.
Is there any plugin available in Jenkins?
As far as i know, there are no plugins for the type of job you're looking for. However, it does provide you a mechanism to run your own scripts by using various options present in Build section such as running a Win batch script, shell script, perl, python, ant commands etc...
Is there any easy way to write script in python?
If you understand the language well, then yes!
This link might be of some interest: http://176.34.122.30/blog/2009/05/18/continuous-integration-with-oracle-plsql-utplsql-and-hudson/
Plugin to run Sql on Oracle database in Jenkins:
https://wiki.jenkins-ci.org/display/JENKINS/SQLPlus+Script+Runner+Plugin

Running load tests via Jenkins on a slave EC2 instance that starts and stops with the build

Ideally, we'd like to run load tests on an EC2 Jenkins slave that starts and stops with our build.
Are there any tools out there (without writing our own plugins) that currently solve this?
I've come across this, but it seems to only be triggered based on the load of Jenkins in general, and not tied to a build.
This configuration is environment specific, and not project specific, so I would prefer to keep this maintained within Jenkins instead of within Maven and the project itself. Although, I'm open to suggestions in that realm.
You can check out WebLOAD Jenkins plugin, it executes RadView's WebLOAD load testing tool, triggered by Jenkins. WebLOAD itself can launch EC2 cloud machines as needed, if that's what you need.

Automate Maven Scripts

I have a series of Maven Scripts which are to be run in Linux Platform for doing Reversion and Lableing for my Project. I would like to know what Building Tools i can use to automate the Maven Scripts in the Linux Platform?
Also say suppose I have got some error while doing the Reversioning / Lableing of the code. How can the Automate tools Handle these scenarios.
Please let me know of the effective tools and I would certainly reply back whether those do help me out or not!
I would suggest leveraging a "job" coordinator such as Jenkins or Cruise Control to manage any and all of our automation. Maven is natively supported and understood by these tools. An agent will reside on your server, and do the bidding of your coordinator.
Jenkins is a good solution to automate maven build:
easy to install
easy integration with maven
allow you to automate simple task after build failure/success like sending email
many plugins including this one that allow you to do more complex task after a build failure (or build success)
Any one of this
Jenkins
Hudson
Atlassian bamboo
TeamCity
After using LuntBuild, Jenkins and teamcity I can say without a doubt that TeamCity is by far the superior choice.
I think it's free for a small configuration (3 agents, and up to 10 build configurations).
It very easy to install and configure, compatible with most source control systems.

Resources