Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

File/Directory is not readable.

CDR123
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 5, 2023

hi everyone. I've tried a few things, but I am not sure why this deploy pipeline is giving the following error:

aws s3 sync /opt/atlassian/pipelines/agent/build/build s3://randomproject1234-media/repos/
warning: Skipping file /opt/atlassian/pipelines/agent/build/build/files.tar.gz. File/Directory is not readable.

 My pipeline:

  custom:

    items:

      - step:

          name: items

          image:

            name: <account#here>.dkr.ecr.us-east-1.amazonaws.com/<imageimusing>:latest

            aws:

              access-key: $AWS_ACCESS_KEY_ID

              secret-key: $AWS_SECRET_ACCESS_KEY

          script:

            - yum install -y tar gzip

            - export PROJECT_NAME=project

            - export ARCHIVE_NAME=${BITBUCKET_REPO_SLUG}-${BITBUCKET_TAG:-v0.0.0-unknown}.tar.gz

            - mkdir /tmp/artifacts

            - mkdir build

            - cp -R folder /tmp/artifacts

            - touch /tmp/artifacts/${PROJECT_NAME}-${ARCHIVE_NAME}

            - tar --exclude=/tmp/artifacts/${PROJECT_NAME}-${ARCHIVE_NAME} -cvzf /tmp/artifacts/${PROJECT_NAME}-${ARCHIVE_NAME} /tmp/artifacts

            # I know this works great, but I want to understand why the the aws-s3-deploy:1.2.0 isn't working

#- aws s3 cp /tmp/artifacts/*.tar.gz s3://${S3_EXPORT_BUCKET}/repos/

# steps below don't work. for some reason the *.tar.gz in the build folder is not read?

#warning: Skipping file /opt/atlassian/pipelines/agent/build/build/project-myreponame-v0.0.0-unknown.tar.gz. File/Directory is not readable.

            - mv /tmp/artifacts/*.tar.gz build

            - ls -la build

          artifacts:

            - build/*

      - step:

          name: Upload to S3

          script:

            - pipe: atlassian/aws-s3-deploy:1.2.0

              variables:

                AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID

                AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY

                AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION

                S3_BUCKET: $S3_EXPORT_BUCKET/repos

                LOCAL_PATH: ${BITBUCKET_CLONE_DIR}/build

                #DEBUG: 'true'

 

1 answer

0 votes
Igor Stoyanov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 6, 2023

@CDR123  hi. Seems like you have problems with your files permissions. Try this solution.

 

Regards, Igor

CDR123
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 30, 2023

@Igor Stoyanov  sorry I didn't see your reply earlier. yes I ended up running something like that to fix it. I just forgot to follow up with you all here. thnx for the help.

Like Igor Stoyanov likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events