Reputation: 23
I have a Bitbucket Pipeline that is configured to build and then upload artifacts to the Bitbucket Download section using their official Pipe. In the deployment step i have it specfically set to not download the artifacts via the built in Pipeline but instead reach out and download it directly from Bitbucket. However, after 14 days the Deploy button becomes greyed out and the artifacts are listed as expired even though it should not be relying on the built in ones due to the download: flag being set to false. Any ideas?
image: mcr.microsoft.com/dotnet/sdk:6.0
definitions:
steps:
- step: &build-.net
name: Build .Net
script:
- apt-get update && apt-get install zip -y
- export CONFIGURATION=Release
- dotnet build -c ${CONFIGURATION}
- dotnet publish -c ${CONFIGURATION}
- cd Web/bin/Release/net6.0/publish && zip -r ../../../../../${BITBUCKET_REPO_SLUG}_${BITBUCKET_BRANCH//\//_}_${BITBUCKET_BUILD_NUMBER}.zip *
artifacts:
- app*.zip
- step: &upload-artifacts
name: Upload Release Artifacts to Bitbucket
script:
- pipe: atlassian/bitbucket-upload-file:0.3.4
variables:
BITBUCKET_USERNAME: $BITBUCKET_USERNAME
BITBUCKET_APP_PASSWORD: '$BITBUCKET_APP_PASSWORD'
FILENAME: '${BITBUCKET_REPO_SLUG}_${BITBUCKET_BRANCH//\//_}_${BITBUCKET_BUILD_NUMBER}_*.zip'
- step: &deploy
name: Deploy to Dev
deployment: Dev
runs-on:
- self.hosted
- windows
script:
- Download Artifact Script
- New-Item 'publish' -ItemType Directory
- $BUILD_DIR = (Get-Location).Path
- Get-ChildItem -Filter *_Backend.zip | Expand-Archive -DestinationPath publish -Force
- msdeploy - parameters
pipelines:
default:
- step: *build-.net
- step: *deploy
- step:
<<: *deploy
name: Deploy to QA
deployment: QA
trigger: manual
- step:
<<: *deploy
name: Deploy to Regression
deployment: Regression
trigger: manual
branches:
release/*:
- step: *build-.net
- step: *upload-artifacts
- step:
<<: *deploy
name: Deploy to Production
deployment: production
trigger: manual
artifacts:
download: false
I can see that the zip file gets successfully uploaded to Bitbucket and when running the deploy step(Pre 14 days) can see that it is also getting downloaded properly from Bitbucket.
Upvotes: 2
Views: 323