Skip to content
This repository has been archived by the owner on Dec 31, 2022. It is now read-only.

Commit

Permalink
encrypt dummy app s3 credentials for travis
Browse files Browse the repository at this point in the history
  • Loading branch information
ajgon committed Feb 6, 2021
1 parent fee3f5e commit b8c5aa4
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
12 changes: 3 additions & 9 deletions .travis.yml
Expand Up @@ -3,15 +3,11 @@ sudo: required
dist: bionic
services:
- docker

# Use caching feature
cache:
directories:
- vendor/bundle

rvm:
- 2.6.0

addons:
apt:
sources:
Expand All @@ -20,10 +16,11 @@ addons:
packages:
- chefdk
- python-pip

env:
global:
- CHEF_LICENSE=accept
- secure: gN9V9u6SJXtEo3l8DCl/bjr22X3Tg+JQFNigYUaZLj686L5jc+n8I3LDffPTpGcCfm0IxFSsQq0pW3mXKGGbav4ccG6ft+WbQVGELc/M3/kvMhwtATlAd4743Zbo7ynFVHxXbDPvteaCi/CVmU3sFbIml6awhrce0qnf42JxXt3MROaqomyAQXqi8/6+MdAaMwfIu/67GFHdO4ra2VIEGUDkJBqQXMJ29NXYcItfmfdGTAujZH4slTkbHFxWWEDkNbprm3/0rdjiNj/Xz3myHfXUwPenKmm9uOGxD5t9/pStWa5Q9rUWTYKONPMsOamoKKcaB6xxG7Nye5LG1gMoMvv0xq5N0mw68mWSsOG/aI1IDsdOWPmmk1pP8WL0mqMzMIEOeMxyZpKVMjusPRu/KSq2vJrWz5U9Yl1MCUxXM+fcS5VpCeWnSSlYTrzF703PN8FrgA8Guxb2xQIzJMvTuOX7xepqIX56k6QrcDSb4i7tAkPnHCCGrGOyau75itTLwuINonBOZcD8586pmGgzO86V+UKg3nNHduDDEAuw78gfOXNKFe0Osx5ufusF2DSHunHS723DXzC6R9TS2SlqtT7ingww3SD65A8v9824y0SDUHAEQKxu3a3J1p8h1yksAoPgwe7XLPfr/PBt6gONClAy/ezEP+kQxxkfSV3f2TE=
- secure: PcWh1lEuy2hadGAQVLBtDa/oMgXGeTwK9bwcYtZYGUV8AKvGn+j7CheH6dN7tzh0TRraxM0qiyTIiZa0ipcKie4eK5wi+iw/MlO19CjveejJ3j6cSgZy93NVfHq4V2rvLe98QSbZpTsCreUn9zqTbFqWAcDMDignF8NesJfo4mlu+pkhJoEPXBlhLLNeUyP3YB0KqHJliYO1hHp+t2br63+AL686tKRERmwwiMdN2qA6SxCHMaGflZEnmOV8XpBKxlRyo4x1f4juhZPBv2IEKbWHDNMTagz51geAlINaWZqyQl2z5btGuGY4la11jLk0F1jFw5E+IQ+pfnKj6cbrrIDrS6ArjX/DIY4nsxFU160hd862M7YrhNvhfRMCvqnpLsyyKiir47WWJcRrjWpkMJMRkbWZ+lNsug4s3JGxHUZL7ZVGrUCucmRzSxDpGG+dXeTUQRTeyc80ebpDP/9qWKWm53Pje9cCwIyj9dn9hwKR6EBKo8B96igugX8z2B0BeB43JwdlveQBaIa64zLclNfWsGwrHMgR9WEuGwzhjP0MKK6sFslEJZHa7DjHZFI2pVf7BF795tUUDPTa5T1XCsydARQAHbS+cmzySX8Q8uGzUP0RKAaxbwbdeZMmOb+1cOjGPmY5p2yrOkbblDEHaWogakIPTSoFO/LZtit75to=
matrix:
- INSTANCE=default-ubuntu-1804
- INSTANCE=all-options-ubuntu-1804
Expand All @@ -32,21 +29,18 @@ env:
- INSTANCE=s3-thin-nginx-padrino-delayed-job-ubuntu-1804
- INSTANCE=nullified-ubuntu-1804
- INSTANCE=maximum-override-ubuntu-1804

before_install:
- gem install bundler

install:
- pip install --user yamllint
- chef exec bundle install --jobs=5 --retry=5

before_script:
- sudo iptables -L DOCKER || sudo iptables -N DOCKER
- git config --global user.email "travis@travis.ci"
- git config --global user.name "Travis CI"
- chef exec bundle exec overcommit --sign
- chef exec bundle exec overcommit --sign pre-commit

- ruby test/integration/update_data_bag.rb
script:
- chef exec bundle exec overcommit -r
- chef exec bundle exec rspec
Expand Down
1 change: 1 addition & 0 deletions .yamllint
Expand Up @@ -2,4 +2,5 @@ extends: default

rules:
line-length:
ignore: .travis.yml
max: 120
@@ -1,11 +1,9 @@
{
"app_id": "3aef37c1-7e2b-4255-bbf1-03e06f07701a",
"app_source": {
"password": "xhFwHAMEr51z1+eKylU0zLZEzxwgleiaMcFikGW7",
"ssh_key_comment": "Don't get cocky, this is are dummy AWS credentials only for this purpose",
"type": "s3",
"url": "https://s3.eu-west-2.amazonaws.com/opsworks-ruby-dummy-app/test/s3_thin_nginx_padrino_delayed_job.tar.gz",
"user": "AKIAJLVMILCB53T2UMQA"
"url": "https://s3.eu-west-2.amazonaws.com/opsworks-ruby-dummy-app/test/s3_thin_nginx_padrino_delayed_job.tar.gz"
},
"attributes": {
"auto_bundle_on_deploy": true,
Expand Down
10 changes: 10 additions & 0 deletions test/integration/update_data_bag.rb
@@ -0,0 +1,10 @@
# frozen_string_literal: true

require 'json'

bag_file = File.expand_path('data_bags/s3_thin_nginx_padrino_delayed_job/aws_opsworks_app/dummy_project.json', __dir__)

data_bag = JSON.parse(File.read(bag_file))
data_bag['app_source']['user'] = ENV['AWS_ACCESS_KEY_ID']
data_bag['app_source']['password'] = ENV['AWS_SECRET_ACCESS_KEY']
File.write(bag_file, data_bag.to_json)

0 comments on commit b8c5aa4

Please sign in to comment.