Giter Club home page Giter Club logo

Comments (7)

iynere avatar iynere commented on July 22, 2024 1

awesome ! will merge this to master πŸ™‚ thank you !! @jams2

from circleci-orbs.

iynere avatar iynere commented on July 22, 2024

looks like there's some kind of yaml parsing issue where a newline is being inserted where it shouldn't be.... i wonder if we can just make arguments the last portion of the command & that would take care of it...

from circleci-orbs.

jams2 avatar jams2 commented on July 22, 2024

You're right (source)

aws s3 sync \
      <<parameters.from>> <<parameters.to>> \
      <<#parameters.arguments>><<parameters.arguments>><</parameters.arguments>><<#parameters.overwrite>> \
      --delete<</parameters.overwrite>>

A newline is being inserted after <<parameters.arguments>>, and it looks like the cause of that, taking my config above:

arguments: |
    --acl public-read \
    --cache-control "max-age=86400"

is the expansion including the unescaped newline after --cache-control. Moving arguments to the end is probably the simplest solution. I can test and throw a PR together some time this week if you like.

from circleci-orbs.

iynere avatar iynere commented on July 22, 2024

it's such a small change, i can take care of it right now @jams2

i'll merge this change to staging, which will publish a dev version w/ the change, & then, since we're not currently doing any extensive integration or usage testing for orbs in this repo (hard to do in the monorepoβ€”our single-repo orbs are tested much more extensively), can you give your job a shot again with the new dev version ?

from circleci-orbs.

iynere avatar iynere commented on July 22, 2024

ok, please give this a shot with circleci/aws-s3@dev:staging-71c6a65 @jams2

if that fixes your issue, i'll merge into master, which will trigger the release of a new semantic / production orb version

from circleci-orbs.

jams2 avatar jams2 commented on July 22, 2024

That fixes it.

Using config:

version: 2.1
orbs:
  aws-s3: circleci/aws-s3@dev:staging-71c6a65
jobs:
  deploy-staging:
    docker:
      - image: circleci/python:2.7
    working_directory: ~/repo
    steps:
      - run: mkdir syncdir && echo "test" >> syncdir/test.txt
      - aws-s3/sync:
          from: syncdir
          to: 's3://thebloggerprogramme-staging/test2'
          arguments: |
            --acl public-read \
            --cache-control "max-age=86400"
          overwrite: true

workflows:
  version: 2.1
  test_build:
    jobs:
      - deploy-staging

command is expanded as:

    - deploy:
        name: Deploy to S3
        command: |+
          aws s3 sync \
            syncdir s3://thebloggerprogramme-staging/test2 --delete \
            --acl public-read \
          --cache-control "max-age=86400"

and still fine without the overwrite parameter:

    - deploy:
        name: Deploy to S3
        command: |+
          aws s3 sync \
            syncdir s3://thebloggerprogramme-staging/test2 \
            --acl public-read \
          --cache-control "max-age=86400"

Job is here

Thanks!

from circleci-orbs.

iynere avatar iynere commented on July 22, 2024

fixed in circleci/[email protected] πŸŽ‰

from circleci-orbs.

Related Issues (20)

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.