Skip to content

Instantly share code, notes, and snippets.

View ZhukovAlexander's full-sized avatar
:octocat:

Alexander Zhukov ZhukovAlexander

:octocat:
View GitHub Profile
FROM python:3.7-slim
COPY requirements.txt /
RUN pip install -r requirements.txt
COPY pipe.py /
ENTRYPOINT ["python3", "pipe.py"]
boto3==1.9.115
bitbucket-pipes-toolkit==1.3.1
import os
import boto3
from bitbucket_pipes_toolkit import Pipe
# defines the schema for pipe variables
variables = {
'AWS_ACCESS_KEY_ID': {'type': 'string', 'required': True},
'AWS_SECRET_ACCESS_KEY': {'type': 'string', 'required': True},
'AWS_DEFAULT_REGION': {'type': 'string', 'required': True},
pipelines:
default:
- step:
name: Create invalidation
script:
- pipe: docker://example-repository/example-image:latest
variables:
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
AWS_DEFAULT_REGION: "us-east-1"