Commit 09ec0fdf authored by GridexX's avatar GridexX
Browse files

doc(aws): Change Doc according to Thomas' Review

- Udpate the stage
- Remove variables unecessarly
- Emoji to bucket
- S3 Object compatibility
parent ba488d63
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
## Objective

This job uses the AWS CLI (v1 for now) in order to sync files between a directory and a target S3 bucket. See changes between the two versions [here](https://docs.aws.amazon.com/cli/latest/userguide/cliv2-migration.html){:target="_blank"}.
This job uses the AWS CLI (v1 for now) in order to sync files between a directory and a target S3 bucket. It's compatible with all s3 object storage (not only AWS).

[AWS CLI](https://aws.amazon.com/cli/){:target="_blank"} is a unified tool to manage your AWS services. With just one tool to download and configure, you can control multiple AWS services from the command line and automate them through scripts.

@@ -22,7 +22,7 @@ This job uses the AWS CLI (v1 for now) in order to sync files between a director
## Job details
* Job name: `aws_s3_sync`
* Docker image: [bitnami/aws-cli:2.2.41](https://hub.docker.com/r/bitnami/aws-cli){:target="blank"}
* Default stage: `others`
* Default stage: `deploy`

### Variables

+4 −11
Original line number Diff line number Diff line
# Job from R2Devops hub --> r2devops.io

stages:
  - others
  - deploy

aws_s3_sync:
  stage: others
  stage: deploy
  image:
    name: bitnami/aws-cli:2.2.41
    entrypoint: [""]
  variables:
    AWS_ACCESS_KEY_ID: " "
    AWS_SECRET_ACCESS_KEY: " "
    AWS_DEFAULT_REGION: "eu-west-1"
    AWS_DEFAULT_REGION: ""
    AWS_ENDPOINT: " "
    SYNC_DIR: "build"
    BUCKET_NAME: " "
    AWS_ACL: " "
    ADDITIONAL_OPTIONS: ""


  script:

@@ -33,13 +33,6 @@ aws_s3_sync:
    -   aws configure set default.s3.endpoint_url ${AWS_ENDPOINT}
    - fi

    - aws configure set default.s3.signature_version s3v4  
    - aws configure set default.s3.max_concurrent_requests 100
    - aws configure set default.s3.max_queue_size 1000
    - aws configure set default.s3.multipart_threshold 50MB
    - aws configure set default.s3.multipart_chunksize 10MB
    - aws configure set default.s3api.endpointurl https://s3.nl-ams.scw.cloud

    #update the ACL with the AWS json input
    - if [ ! -z ${AWS_ACL} ]; then
    -   aws s3api get-bucket-acl --bucket ${BUCKET_NAME} --cli-input-json ${AWS_ACL}
+3 −3
Original line number Diff line number Diff line
name: aws_s3_sync
description: A ready-to-use AWS S3 job to sync a local directory into a bucket. This Job is compatible with Scaleway's API.
default_stage: others
icon: 🅰️
description: A ready-to-use AWS S3 job to sync a local directory into a bucket. This Job is compatible with all S3 Object storage.
default_stage: deploy
icon: 🪣
maintainer: GridexX
license: MIT
images: