version: '2.1'
orbs:
aws-s3: circleci/aws-s3@3.0
jobs:
s3_sync_dev:
docker:
- image: 'cimg/python:3.10'
resource_class: small
steps:
- checkout
- aws-s3/sync:
aws-access-key-id: ACCESS_ID_DEV
aws-secret-access-key: SECRET_KEY_DEV
aws-region: AWS_REGION_DEV
from: .
to: 's3://ansible-bucket-test'
- run: aws --version
s3_sync_prod:
docker:
- image: 'cimg/python:3.10'
resource_class: small
steps:
- checkout
- aws-s3/sync:
aws-access-key-id: ACCESS_ID_PROD
aws-secret-access-key: SECRET_KEY_PROD
aws-region: AWS_REGION_PROD
from: .
to: 's3://ansible-bucket-prod'
- run: aws --version
workflows:
s3-execution:
jobs:
- s3_sync_dev:
filters:
branches:
only: dev
- s3_sync_prod:
filters:
branches:
only: prod
No comments:
Post a Comment