Hi guys!
I built a simple pipeline to copy files from a folder and upload them to a GCS bucket using the google-cloud-storage-deploy
pipe, as shown below:
# Copy dags files to GCS bucket
pipelines:
default:
- step:
name: 'Pushing files to GCS bucket'
script:
- pipe: atlassian/google-cloud-storage-deploy:2.0.0
variables:
KEY_FILE: $GOOGLE_SERVICE_ACCOUNT_KEY
BUCKET: 'bucket-test'
SOURCE: 'files/'
However, I don't want these files to be stored in the root of bucket-test
, I want them in a subdirectory called folder
.
Is it possible to do that using the google-cloud-storage-deploy
pipe? I couldn't find an example and got errors when trying to do that by passing bucket-test/folder
as a value for the BUCKET variable.
So in summary, right now this pipeline is doing this:
.
├── folder/
├── file1
├── file2
└── file3
and I want it to do this:
.
└── folder/
├── file1
├── file2
└── file3
Thanks for your help!
Hi @André Rugere . We released new version 2.1.0 of the pipe, which allows you to upload to custom blob:
script: - pipe: atlassian/google-cloud-storage-deploy:2.1.0 variables: KEY_FILE: $KEY_FILE BUCKET: 'my-bucket' SOURCE: 'myFile.txt' BLOB_NAME_PREFIX: 'my-folder/'
Regards, Igor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@André Rugere hi. Try to rename your files to `folderName/fileName` inside your `files/` folder.
Additional details: Google Cloud Storage simulated folders .
Regards, Igor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
gcloud storage cp your-file gs : //your-bucket/abc/
BUCKET: 'bucket-test/folder'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@André Rugere , This feature is not supported in current implementation of the pipe.
We will investigate it and notify you when new pipe version with this feature will become available.
Regards, Igor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Igor Stoyanov oh I see, no worries.
Are these pipes open to external contributors? I could try implementing this feature if you think it's reasonable. Let me know how I can help :)
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@André Rugere , pipes are open-sourced, you could suggest feature and follow release process: How to contribute .
Or you could wait until our team will implement this feature.
Regards, Igor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.