GithubHelp home page GithubHelp logo

krishi0408 / drone-s3-upload-publish Goto Github PK

View Code? Open in Web Editor NEW

This project forked from harness-community/drone-s3-upload-publish

1.0 0.0 0.0 10 KB

Drone plugin to upload file/directories to AWS S3 Bucket and display the bucket url under 'Executions > Artifacts' tab.

License: Apache License 2.0

Shell 3.76% Go 92.06% Dockerfile 4.18%

drone-s3-upload-publish's Introduction

drone-s3-upload-publish

Drone plugin to upload file/directories to AWS S3 Bucket and display the bucket url under 'Executions > Artifacts' tab.

Build

Build the binary with the following commands:

go build

Docker

Build the Docker image with the following commands:

./hacking/build.sh
docker buildx build -t DOCKER_ORG/drone-s3-upload-publish --platform linux/amd64 .

Please note incorrectly building the image for the correct x64 linux and with CGO disabled will result in an error when running the Docker image:

docker: Error response from daemon: Container command
'/bin/drone-s3-upload-publish' not found or does not exist..

Usage

docker run --rm \
  -e PLUGIN_AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID} \
  -e PLUGIN_AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY} \
  -e PLUGIN_AWS_DEFAULT_REGION=ap-southeast-2 \
  -e PLUGIN_AWS_BUCKET=bucket-name \
  -e PLUGIN_SOURCE=OBJECT_PATH \
  -e PLUGIN_ARTIFACT_FILE=url.txt \
  -v $(pwd):$(pwd) \
  -w $(pwd) \
  harnesscommunity/drone-s3-upload-publish

In Harness CI,

              - step:
                  type: Plugin
                  name: s3-upload-publish
                  identifier: custom_plugin
                  spec:
                    connectorRef: account.harnessImage
                    image: harnesscommunity/drone-s3-upload-publish
                    settings:
                      aws_access_key_id: <+pipeline.variables.AWS_ACCESS>
                      aws_secret_access_key: <+pipeline.variables.AWS_SECRET>
                      aws_default_region: ap-southeast-2
                      aws_bucket: bucket-name
                      artifact_file: url.txt
                      source: OBJECT_PATH
                    imagePullPolicy: IfNotPresent

To get the list of supported arguments:

go build

./drone-s3-upload-publish --help
NAME:
   drone-s3-upload-publish
...
...
GLOBAL OPTIONS:
   --aws-access-key value      AWS Access Key ID [$PLUGIN_AWS_ACCESS_KEY_ID]
   --aws-secret-key value      AWS Secret Access Key [$PLUGIN_AWS_SECRET_ACCESS_KEY]
   --aws-default-region value  AWS Default Region [$PLUGIN_AWS_DEFAULT_REGION]
   --aws-bucket value          AWS S3 Bucket [$PLUGIN_AWS_BUCKET]
   --source value              Source [$PLUGIN_SOURCE]
   --target-path value         target [$PLUGIN_TARGET]
   --artifact-file value       Artifact file [$PLUGIN_ARTIFACT_FILE]
...
...

drone-s3-upload-publish's People

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.