Follow up - a86b288f4c - Fixes #3411: Missing 'dotenv' gem in production causes rake tasks to fail.

This commit is contained in:
Thorsten Eckel 2021-02-26 08:43:35 +01:00
parent 78eda936e0
commit bfcca2fe79
2 changed files with 5 additions and 3 deletions

View file

@ -2,7 +2,7 @@ name: build-docker-image
on:
push:
branches: [develop]
branches: [thorsteneckel-debug-docker-image-build]
jobs:
build-docker-image:

View file

@ -1,5 +1,3 @@
require 'dotenv'
namespace :zammad do
namespace :ci do
@ -7,6 +5,10 @@ namespace :zammad do
desc 'Re-fresh-es dynamic ENV variables'
task refresh_envs: :environment do
# require only at runtime of process to avoid errors when loading
# rake tasks in production without this gem installed
require 'dotenv'
Dotenv.overload('fresh.env')
result = ExternalCredential::Microsoft365.refresh_token(