Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Delete old files from the bucket

Ionut Ticu
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!
August 13, 2024

I have this pipelines for a VueJs project and I want to add a new step to delete the existing files from the Google Cloud Bucket before I move the new files(between step 1 an step 2). Any ideea how i can do that?

Thank you 



pipelines:
branches:
develop:
- step:
name: Generate Static Files
image: node:12.22.9
caches:
- node
script:
- cd admin
- npm install --omit=dev
- npm run build
artifacts:
- admin/dist/*
- admin/dist/**/*
- admin/dist/**/**
- step:
name: Deploy to GCP Bucket
image: atlassian/default-image:latest
script:
- pipe: atlassian/google-cloud-storage-deploy:2.1.0
variables:
KEY_FILE: $KEY_FILE
BUCKET: 'develop'
SOURCE: 'admin/dist/'

1 answer

1 vote
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 14, 2024

Hi Ionut,

You would need to access that location and perform deletion commands from there - the google-cloud-storage-deploy pipe only handles deployment. You would need to execute a script for that.

Cheers!

- Ben (Bitbucket Cloud Support)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events