Rakefile in rake_circle_ci-0.8.0.pre.1 vs Rakefile in rake_circle_ci-0.8.0.pre.2
- old
+ new
@@ -1,21 +1,44 @@
require 'yaml'
require 'rake_circle_ci'
require 'rake_github'
require 'rake_ssh'
+require 'rake_gpg'
+require 'securerandom'
require 'rspec/core/rake_task'
task :default => :spec
RSpec::Core::RakeTask.new(:spec)
-RakeSSH.define_key_tasks(
- namespace: :deploy_key,
- path: 'config/secrets/ci/',
- comment: 'maintainers@infrablocks.io'
-)
+namespace :encryption do
+ namespace :passphrase do
+ task :generate do
+ File.open('config/secrets/ci/encryption.passphrase', 'w') do |f|
+ f.write(SecureRandom.base64(36))
+ end
+ end
+ end
+end
+namespace :keys do
+ namespace :deploy do
+ RakeSSH.define_key_tasks(
+ path: 'config/secrets/ci/',
+ comment: 'maintainers@infrablocks.io')
+ end
+
+ namespace :gpg do
+ RakeGPG.define_generate_key_task(
+ output_directory: 'config/secrets/ci',
+ name_prefix: 'gpg',
+ owner_name: 'InfraBlocks Maintainers',
+ owner_email: 'maintainers@infrablocks.io',
+ owner_comment: 'rake_circle_ci CI Key')
+ end
+end
+
RakeCircleCI.define_project_tasks(
namespace: :circle_ci,
project_slug: 'github/infrablocks/rake_circle_ci'
) do |t|
circle_ci_config =
@@ -51,9 +74,10 @@
]
end
namespace :pipeline do
task :prepare => [
+ :'circle_ci:project:follow',
:'circle_ci:env_vars:ensure',
:'circle_ci:ssh_keys:ensure',
:'github:deploy_keys:ensure'
]
end