Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ check_expiring_certificates:
script:
- *bundle_install
- bundle exec rake db:setup --trace
- bundle exec rake certs:print_expiring
- bundle exec rake certs:print_expiring[0]

# Build a container image async, and don't block CI tests
# Cache intermediate images for 1 week (168 hours)
Expand Down
5 changes: 3 additions & 2 deletions lib/tasks/certs.rake
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ namespace :certs do
end

desc 'Print expiring certs'
task print_expiring: :environment do
deadline = 30.days.from_now
task :print_expiring, [:deadline_days] => [:environment] do |t, args|
args.with_defaults(:deadline_days => 30)
deadline = args[:deadline_days].to_i.days.from_now

cert_store = CertificateStore.instance
cert_store.load_certs!(dir: Rails.root.join('config/certs'))
Expand Down