diff --git a/.github/workflows/test-core.yml b/.github/workflows/test-core.yml index 808247b36c..e29b531c9e 100644 --- a/.github/workflows/test-core.yml +++ b/.github/workflows/test-core.yml @@ -61,11 +61,8 @@ jobs: CI_CACHE_PATH: "/tmp/cache" LOCAL_DEV_CHECK: 1 CI_RETRY_COUNT: 3 - OPENPROJECT_ENABLE_CAPYBARA_SCREENSHOT_S3_UPLOADS: true - AWS_ACCESS_KEY_ID: "${{ secrets.CAPYBARA_AWS_ACCESS_KEY_ID }}" - AWS_SECRET_ACCESS_KEY: "${{ secrets.CAPYBARA_AWS_SECRET_ACCESS_KEY }}" - AWS_REGION: "eu-west-1" - S3_BUCKET_NAME: "openproject-ci-public-logs" + CAPYBARA_AWS_ACCESS_KEY_ID: "${{ secrets.CAPYBARA_AWS_ACCESS_KEY_ID }}" + CAPYBARA_AWS_SECRET_ACCESS_KEY: "${{ secrets.CAPYBARA_AWS_SECRET_ACCESS_KEY }}" steps: - uses: actions/checkout@v2 - name: cache diff --git a/docker-compose.ci.yml b/docker-compose.ci.yml index 250e985b02..80b4df98a9 100644 --- a/docker-compose.ci.yml +++ b/docker-compose.ci.yml @@ -11,6 +11,8 @@ services: environment: RSPEC_RETRY_RETRY_COUNT: "${CI_RETRY_COUNT:-3}" JOBS: "${CI_JOBS:-8}" + CAPYBARA_AWS_ACCESS_KEY_ID: "${CAPYBARA_AWS_ACCESS_KEY_ID}" + CAPYBARA_AWS_SECRET_ACCESS_KEY: "${CAPYBARA_AWS_SECRET_ACCESS_KEY}" tmpfs: - "/tmp" volumes: diff --git a/spec/support/capybara.rb b/spec/support/capybara.rb index 30099df9b3..0efe1f4cae 100644 --- a/spec/support/capybara.rb +++ b/spec/support/capybara.rb @@ -35,14 +35,14 @@ Capybara::Screenshot.prune_strategy = :keep_last_run Capybara.server = :puma, { Silent: false } # Set up S3 uploads if desired -if ENV['OPENPROJECT_ENABLE_CAPYBARA_SCREENSHOT_S3_UPLOADS'] && ENV['AWS_ACCESS_KEY_ID'] +if ENV['CAPYBARA_AWS_ACCESS_KEY_ID'] Capybara::Screenshot.s3_configuration = { s3_client_credentials: { - access_key_id: ENV.fetch('AWS_ACCESS_KEY_ID'), - secret_access_key: ENV.fetch('AWS_ACCESS_KEY_SECRET'), - region: ENV.fetch('AWS_REGION', 'eu-west-1') + access_key_id: ENV.fetch('CAPYBARA_AWS_ACCESS_KEY_ID'), + secret_access_key: ENV.fetch('CAPYBARA_AWS_SECRET_ACCESS_KEY'), + region: ENV.fetch('CAPYBARA_AWS_REGION', 'eu-west-1') }, - bucket_name: ENV.fetch('S3_BUCKET_NAME', 'openproject-travis-logs') + bucket_name: ENV.fetch('CAPYBARA_AWS_BUCKET', 'openproject-ci-public-logs') } end