This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def execute_jslint(working_directory:) | |
| Dir.chdir(working_directory) do | |
| puts "Running jslint on #{working_directory}..." | |
| results = `find . -name "*.js" -print0 | xargs -0 jslint` | |
| puts results | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Build | |
| module Commit | |
| class ExtendedStaticAnalysis < StaticAnalysis | |
| def initialize(store:) | |
| # execute base class logic first | |
| super(store: store) | |
| # execute custom logic | |
| execute_jslint(working_directory: store.get(attrib_name: "params")[:working_directory]) | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @meta[:steps].each do |step| | |
| task_sym = "#{@meta[:pipeline]}:#{step[:phase]}:#{step[:name]}".to_sym | |
| define_task(step[:description], task_sym) do |t, args| | |
| # derive worker class namespace::name | |
| pipeline = @meta[:pipeline].capitalize | |
| phase = step[:phase].capitalize | |
| job = step[:name].split('_').collect(&:capitalize).join | |
| class_ref = "#{pipeline}::#{phase}::#{job}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'yaml' | |
| require 'blog_refactor_gem' | |
| # Read in the application's pipeline metadata | |
| meta_path = File.join(File.expand_path(File.dirname(__FILE__)), 'pipeline-meta.yml') | |
| @meta = YAML.load(IO.read(meta_path)) | |
| # Define where our pipeline will keep its parameter store, | |
| # responsible for passing parameters from task to task during the execution of the pipeline. | |
| @store_path = File.join(File.expand_path(File.dirname(__FILE__)), 'store.json') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| "DbPassword": { | |
| "Type": "String", | |
| "Description": "Password for the database", | |
| "NoEcho": true | |
| }, | |
| "DbUsername": { | |
| "Type": "String", | |
| "Description": "Username for the database" | |
| }, | |
| "DbUrl": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| apt-get update | |
| apt-get install git -y | |
| git clone git://github.com/stelligent/blog_refactor_php /opt/greeter | |
| if [ ":" == ":$(dpkg -l | grep chefdk)" ]; then | |
| pushd /tmp | |
| wget --quiet https://packages.chef.io/stable/ubuntu/12.04/chefdk_0.16.28-1_amd64.deb | |
| dpkg -i chefdk_0.16.28-1_amd64.deb | |
| mkdir /tmp/cookbooks | |
| fi |