Jenkins Deployment to Staging - ruby-on-rails

I'm trying to find a way for Jenkins to deploy to my staging server on Engine Yard when all all tests have passed? Are there any plugin for this post-build action from Jenkins?

You can also consider creating build pipeline https://wiki.jenkins-ci.org/display/JENKINS/Build+Pipeline+Plugin
One build to build & test and another for deployment (or maybe more to deploy to staging automatically if tests pass and do third step - deploy to next environment triggered manually).
-Radim

engineyard-jenkins looks like it will do the trick.

Related

Jenkins Pipeline procedure

When I check in my gitlab code from dev, it triggers Jenkins to build this dev branch and deploy the application on the staging server 1. I have selenium automated testing to run against this deployed application (eg Test UI & API etc).
Question:
If the test all passes, Jenkins should deploy a production code on server 2. Can and should Jenkins make a merge request from dev to master in order to do the build?
Theese are possible.
1.You need conditional steps in jenkins.
2.You need conditional steps again and you must use git commands.(git commit,git push etc.)

How to build different configs in Azure DevOps release pipeline?

I currenly have an Azure DevOps release pipeline containing Test, Acceptance and Production stage, that are triggered in that order. The Test is triggered when there is a new build available to deploy.
The problem I have with this is that all stages currently deploy the exact same artifact. But this is wrong, since they are deploying to different environments that need to have their own version of the Web.config.
How do I change my setup in such a way that all environments get the right package? Should I change my build setup in such a way that it builds for multiple different configs or should I have separate builds for each environment? And how do I select what artifact each stage of the release pipeline should deploy?
This is what my release pipeline looks like now:
Each environment can have its own variables defined. Simply click on the variables tab and make sure you scope any of those variables to the proper environment.
Then using the Azure App Service Deploy (if targeting Azure) or IIS Web app deploy tasks, you can update your configuration files with the values of your variables, here is the documentation on how to do so.

Run script before removing job in Jenkins Pipelines

I'm setting up a development environment where I have Jenkins as CI server (using pipelines), and the last build step in Jenkinsfile is a deployment to staging. The idea is to have a staging environment for each branch that is pushed.
Whenever someone deletes a branch (sometimes after merging), Jenkins automatically removes its respective job.
I wonder if there is a way to run a custom script before the automatic job removal, then I would be able to connect to the staging server and stop or remove all services that are running for the job that is going to be deleted.
The plugin multibranch-action-triggers-plugin might be worth a look.
This plugin enables building/triggering other jobs when a Pipeline job is created or deleted, or when a Run (also known as Build) is deleted by a Multi Branch Pipeline Job.

Using Jenkins for Continuous Deployment of WebApp - Publish Artifacts to Server

We are searching for a CI and CD Solution for our WebApp based on NodeJS/Meteor.
Our Process should be:
On each Push to Master/ Pull Request/ Merge to Master do the following:
Checkout
Run Code Style Checks (coffeelint, scsslinter, etc.)
Build Code
Run Tests
Generate Tarball-Archive
Deploy archive to Developmet (Quality Management) Server, extract and run
next step would be manual testing of the app on our dev server.
when we think it is deployable, I want have a button in jenkins like "Deploy these Artifacts NOW to Live-Instance". How can I achive this? Also Nice would be something like deploy these artifacts at 2am to the live instances.
From Checkout to deploy to dev-server is already implemented in jenkins. What we need now is a button "deploy this artifact to live"
You need another job to get this working. The other job takes the artifact from the build job and deploy it wherever you want.
There is no possibility to include such behavior in the same job.

How do you skip testing stage in bamboo?

I'm using a Maven project from an svn in Bamboo. I was wondering if there is a way to skip the testing phase or at least skip a few specific tests through Bamboo settings (without modifying the code or pom)
under environment variables
MAVEN_OPTS="-Dmaven.test.skip=true"

Resources