diff --git a/.drone.yml b/.drone.yml index 0cb3f49..68ca21e 100644 --- a/.drone.yml +++ b/.drone.yml @@ -13,7 +13,7 @@ steps: - name: publish image: plugins/docker settings: - repo: plugins/aws-cli + repo: plugins/drone-aws-cli auto_tag: true dockerfile: docker/Dockerfile username: @@ -49,7 +49,7 @@ steps: image: plugins/docker settings: dockerfile: docker/Dockerfile.linux.arm64 - repo: plugins/aws-cli + repo: plugins/drone-aws-cli username: from_secret: docker_username password: @@ -92,7 +92,7 @@ steps: image: plugins/docker settings: dockerfile: docker/Dockerfile - repo: plugins/aws-cli + repo: plugins/drone-aws-cli username: from_secret: docker_username password: diff --git a/README.md b/README.md index 764f766..b18c5b9 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # DRONE AWS-CLI Plugin -The aws-cli plugin is designed to automate the installation, configuration, and execution of the AWS Command Line Interface (CLI) in your CI pipeline. This plugin simplifies the process of setting up and managing AWS credentials and configurations within your pipeline, allowing you to easily interact with AWS services. +The drone aws-cli plugin is designed to automate the installation, configuration, and execution of the AWS Command Line Interface (CLI) in your CI pipeline. This plugin simplifies the process of setting up and managing AWS credentials and configurations within your pipeline, allowing you to easily interact with AWS services. Features of the plugin include: @@ -23,8 +23,8 @@ The following settings changes this plugin's behavior. * aws_session_token (optional) sets the AWS Session Token. * binary_dir (optional) sets the binary directory for the AWS CLI. Default: /usr/local/bin. * disable_aws_pager (optional) controls AWS CLI output paging. Default: true. -* install_dir (optional) sets the installation directory for the AWS CLI. Default: /usr/local/aws-cli. -* install_dir (optional) sets the installation directory for the AWS CLI. Default: /usr/local/aws-cli. +* install_dir (optional) sets the installation directory for the AWS CLI. Default: /usr/local/drone-aws-cli. +* install_dir (optional) sets the installation directory for the AWS CLI. Default: /usr/local/drone-aws-cli. * override_installed (optional) controls whether to override the installed AWS CLI version. Default: false. * profile_name (optional) sets the profile name to be configured. Default: default. * role_arn (optional) sets the Role ARN for assuming an IAM role with web identity. @@ -41,8 +41,8 @@ kind: pipeline name: default steps: - - name: run plugins/aws-cli plugin - image: plugins/aws-cli + - name: run plugins/drone-aws-cli plugin + image: plugins/drone-aws-cli pull: if-not-exists settings: aws_access_key_id: your_aws_access_key_id @@ -51,7 +51,7 @@ steps: aws_session_token: your_aws_session_token binary_dir: /usr/local/bin disable_aws_pager: true - install_dir: /usr/local/aws-cli + install_dir: /usr/local/drone-aws-cli override_installed: false profile_name: default role_arn: your_role_arn @@ -73,7 +73,7 @@ scripts/build.sh Build the plugin image: ```text -docker build -t plugins/aws-cli -f docker/Dockerfile . +docker build -t plugins/drone-aws-cli -f docker/Dockerfile . ``` # Testing @@ -93,6 +93,6 @@ docker run --rm \ -e DRONE_BUILD_STATUS=success \ -w /drone/src \ -v $(pwd):/drone/src \ - plugins/aws-cli + plugins/drone-aws-cli ``` diff --git a/docker/manifest.tmpl b/docker/manifest.tmpl index 5132571..8612d45 100644 --- a/docker/manifest.tmpl +++ b/docker/manifest.tmpl @@ -1,4 +1,4 @@ -image: plugins/aws-cli:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}} +image: plugins/drone-aws-cli:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}} {{#if build.tags}} tags: {{#each build.tags}} @@ -7,12 +7,12 @@ tags: {{/if}} manifests: - - image: plugins/aws-cli:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64 + image: plugins/drone-aws-cli:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64 platform: architecture: amd64 os: linux - - image: plugins/aws-cli:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64 + image: plugins/drone-aws-cli:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64 platform: variant: v8 architecture: arm64 diff --git a/go.mod b/go.mod index eb5edda..3125227 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/plugins/aws-cli +module github.com/plugins/drone-aws-cli go 1.19 diff --git a/main.go b/main.go index 7c92626..833bc1f 100644 --- a/main.go +++ b/main.go @@ -7,7 +7,7 @@ package main import ( "context" - "github.com/plugins/aws-cli/plugin" + "github.com/plugins/drone-aws-cli/plugin" "github.com/kelseyhightower/envconfig" "github.com/sirupsen/logrus" @@ -31,13 +31,14 @@ func main() { } if err := plugin.Exec(context.Background(), args); err != nil { - logrus.Fatalln(err) + logrus.Fatalln(err) } } // default formatter that writes logs without including timestamp // or level information. -type formatter struct {} +type formatter struct{} + func (*formatter) Format(entry *logrus.Entry) ([]byte, error) { return []byte(entry.Message), nil } diff --git a/plugin.yml b/plugin.yml index f058fa6..53d5893 100644 --- a/plugin.yml +++ b/plugin.yml @@ -1,3 +1,3 @@ run: go: - module: github.com/plugins/aws-cli + module: github.com/plugins/drone-aws-cli