HUB
Sign inSign up

projectnebula/s3-uploader

By projectnebula

•Updated over 6 years ago

The AWS S3 uploader task uploads a single file, directory, or inline content to an S3 bucket.

Image
0

3.1K

projectnebula/s3-uploader repository overview

⁠AWS S3 uploader

This AWS S3 uploader step container uploads a single file, directory, or inline content to an S3 bucket.

Use the following specifications:

⁠Specifications

SettingChild settingData typeDescriptionDefaultRequired
awsmappingA mapping of AWS account configuration.NoneTrue
accessKeyIDstringAn access key ID for the AWS account. You can pass the ID into Nebula as a secret. See the example below.NoneTrue
secretAccessKeystringThe secret access key corresponding to the access key ID. Pass the key into Nebula as a secret. See the example below.NoneTrue
regionstringThe AWS region to use (for example, us-west-2).NoneTrue
bucketstringThe name of the target S3 bucketNoneTrue
keystringSpecify a key name for the object.NoneIf sourceContent is present
sourcePathstringThe relative path, within the Git repository given in the git parameters, to upload. One of sourcePath or sourceContent must be specified.NoneIf sourceContent is not present
sourceContentstringThe data to upload as a string.NoneIf sourcePath is not present
gitmappingA map of git configuration. If you're using HTTPS, only name and repository are required.NoneRequired if sourcePath is present
ssh_keystringThe SSH key to use when cloning the git repository. You can pass the key to Nebula as a secret. See the example below.NoneTrue
known_hostsstringSSH known hosts file. Use a Nebula secret to pass the contents of the file into the workflow as a base64-encoded string. See the example below.NoneTrue
namestringA directory name for the git clone.NoneTrue
branchstringThe Git branch to clone.masterFalse
repositorystringThe git repository URL.NoneTrue
filters[]arrayA YAML sequence (array) of path filters, applied in order.NoneFalse
typestringThe type of the filter, one of include or exclude.NoneTrue
patternstringThe pattern for the filter. See the S3 CLI documentation⁠ for details on the syntax.NoneTrue
aclstringThe canned ACL to use for the uploaded objects. For a list of canned ACLs, see Access Control List (ACL) Overview⁠NoneFalse
storageClassstringThe storage class to use for the uploaded objects. For informaton on storage classes, see Amazon S3 Storage Classes⁠NoneFalse
contentTypestringThe media type of the uploaded object. Automatically detected when using sourcePath if possible.Automatically detected, falling back to binary/octet-streamFalse
cacheControlstringThe value of the HTTP Cache-Control header to associate with the uploaded objects.NoneFalse
contentDispositionstringThe value of the HTTP Content-Disposition header to associate with the uploaded objects.NoneFalse
contentEncodingstringThe value of the HTTP Content-Encoding header to associate with the uploaded objects.NoneFalse
contentLanguagestringThe value of the HTTP Content-Language header to associate with the uploaded objects.NoneFalse
expiresstringThe time at which the uploaded object is no longer cacheable, in ISO 8601 format.NoneFalse
metadatamappingA YAML mapping of arbitrary key-value data to store with the uploaded objects.NoneFalse

Note: The value you set for a secret must be a string. If you have multiple key-value pairs to pass into the secret, or your secret is the contents of a file, you must encode the values using base64 encoding, and use the encoded string as the secret value.

⁠Examples

Here is an example of the step in a Nebula workflow:

steps:

...

- name: s3-uploader
  image: projectnebula/s3-uploader:latest
  spec:
    aws:
      accessKeyID:
        $type: Secret
        name: key-id 
      secretAccessKey:
        $type: Secret
        name: access-key
      region: us-west-2  
    bucket: my-bucket
    key: my-docs
    sourcePath: ./docs
    git: 
      ssh_key:
        $type: Secret
        name: ssh_key
      known_hosts:
        $type: Secret
        name: known_hosts
      name: my-git-repo
      branch: dev
      repository: path/to/your/repo 
    filters:
    - type: include
      pattern: *.txt
    - type: exclude
      pattern: .git/*  
    acl: public-read
    storageClass: STANDARD 
    metadata:
      author: John Smith
Tag summary
Recent tags
Content type
Image
Digest
Size
75.3 MB
Last updated
over 6 years ago
docker pull projectnebula/s3-uploader:latest