USAGE:
sassruist [FLAGS]<path>
FLAGS:
-f, --fix fix original file(s)-h, --help Prints help information
-V, --version Prints version information
ARGS:
<path> target file or directory path
error[E0433]: failed to resolve: use of undeclared type or module `imp`--> /~~~/.cargo/registry/src/github.com-1ecc6299db9ec823/same-file-1.0.4/src/lib.rs:261:9
|
261 | imp::Handle::stdout().map(Handle)
| ^^^ use of undeclared type or module `imp`
namespace :rails do
task :build_image do
run_locally do
within fetch(:deploy_work_path) do
execute 'aws', 'ssm', '--profile', fetch(:profile).to_s,
'get-parameters',
'--with-decryption',
'--region', 'ap-northeast-1',
'--name', "/#{fetch(:application)}/rails/master_key",
'--query', '"Parameters[0].Value"',
'--output', 'text', '>', 'config/master.key'
execute 'docker', 'build', '--no-cache=true',
'-t', "#{fetch(:ecr_host)}/#{fetch(:env)}-#{fetch(:application)}-rails:#{fetch(:rails_tag)}",
'--build-arg', "RAILS_ENV=#{fetch(:rails_env)}",
'-f', 'docker/deploy/rails/Dockerfile', '.'
end
end
end
task :tag_image do
run_locally do
within fetch(:deploy_work_path) do
execute 'docker', 'tag',
"#{fetch(:ecr_host)}/#{fetch(:env)}-#{fetch(:application)}-rails:#{fetch(:rails_tag)}",
"#{fetch(:ecr_host)}/#{fetch(:env)}-#{fetch(:application)}-rails:latest"
end
end
end
task :push_image_to_ecr do
run_locally do
within fetch(:deploy_work_path) do
push_image_to_ecr("#{fetch(:ecr_host)}/#{fetch(:env)}-#{fetch(:application)}-rails:#{fetch(:rails_tag)}")
push_image_to_ecr("#{fetch(:ecr_host)}/#{fetch(:env)}-#{fetch(:application)}-rails:latest")
end
end
end
end
def push_image_to_ecr(image)
execute 'ecs-cli', 'push', "#{image}",
'--aws-profile', fetch(:profile).to_s,
'--region', fetch(:region).to_s
end