Codefresh Steps: Reusable Code for Common Operations
This page provides code you can use to perform common operations in the Codefresh CI/CD platform.
2K

aws-s3 aws-s3

Integration that uploads files to S3

arguments

  • AWS_IMAGE - The AWS S3 container registry/image for the step.
  • AWS_IMAGE_VERSION - Version of the AWS S3 image to use, Docker image tag.
  • BUCKET - The name of the bucket you are using
  • REGION - The region the bucket is in. Default is us-east-1
  • S3_INTEGRATION - The name of the S3 storage integration if you do not use a Service Account. if a SA exists, it will be used instead
  • S3_PREFIX - The prefix or path you want the files to be uploaded to. If a single file, this will be the object key unless you add a / at the end.
  • SOURCE - The name of the directory or file you want to upload. Path from /codefresh/volume/
  • working_directory - The directory where you want to be in. The default value is '/codefresh/volume/'
    uploadToS3:
  title: Uploading to S3
  type: aws-s3
  stage: cleanup
  arguments:
    REGION: us-east-1
    BUCKET: my-s3-bucket
    S3_PREFIX: myDirectory/subdirectory
    S3_INTEGRATION: amazon
    SOURCE: '${{CF_REPO_NAME}}/myDirectory'

  
    uploadToS3:
  title: Uploading to S3
  type: aws-s3
  stage: cleanup
  arguments:
    REGION: us-east-1
    BUCKET: my-s3-bucket
    S3_PREFIX: myDirectory/subdirectory
    SOURCE: '${{CF_REPO_NAME}}/myDirectory'

  
github.com
Luke Goodfellow
Apr 27, 2023