Simple collection of Groovy scripts to help me maintain some Jenkins systems.
See also https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+Script+Console
Please comment & let me know if you have a fork / fixes you'd like to include.
Simple collection of Groovy scripts to help me maintain some Jenkins systems.
See also https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+Script+Console
Please comment & let me know if you have a fork / fixes you'd like to include.
.git |
<?php | |
namespace Traits\Tests; | |
/** | |
* Mocks the entity manager | |
* | |
* Provides everything in the memory, so the tests does not depend on doctrine, | |
* which does a lot of stuff (maybe too much). This also allows to avoid to | |
* need and modify the data in the database, even if those are for the tests. |
{ | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Description": "AppServer Stack", | |
"Parameters": { | |
"KeyName": { | |
"Type": "String", | |
"Description": "Name of an existing EC2 KeyPair to enable SSH access to the web server", | |
"Default": "AWS_SSH_KEY" | |
}, | |
"InstanceType": { |
require 'rubygems' | |
require 'chef/encrypted_data_bag_item' | |
secret = Chef::EncryptedDataBagItem.load_secret('data_bag_key') | |
data = {"id" => "mysql", "root" => "some secret password"} | |
encrypted_data = Chef::EncryptedDataBagItem.encrypt_data_bag_item(data, secret) | |
FileUtils.mkpath('data_bags/passwords') | |
File.open('data_bags/passwords/mysql.json', 'w') do |f| | |
f.print encrypted_data.to_json |
# copy to your Capistrano recipe file | |
namespace :deploy do | |
task :clear_cached_assets, :roles => :web do | |
dir = "#{current_release}/public" | |
run %(rm #{dir}/javascripts/all.js #{dir}/stylesheets/master.css) | |
end | |
end |