Hi community,
I have build a deployment pipeline consisting of 2 steps. The first step builds the project and the second deploys it to SAP Cloud Platform.
My problem is, in the second step the zip file from the first step is not existent.
image: ppiper/mta-archive-builder:latest
pipelines:
default:
- step:
name: "MTA build"
caches:
- node
- maven
script:
- mtaBuild --mtar dist/build-$BITBUCKET_BUILD_NUMBER.zip --build-target CF build
- mv bitbucket-pipelines.yml dist/
artifacts:
- dist/**
- step:
name: "Deploy to Staging"
image: ppiper/cf-cli
deployment: staging
script:
- cf login -a "$CF_ENDPOINT" -u "$CF_USER" -p "$CF_PASSWORD" -o "$CF_ORG" -s "$CF_SPACE"
- ls dist/
- cf deploy "dist/build-$BITBUCKET_BUILD_NUMBER.zip"Output from step 1:
<span>You already have a 'maven' cache so we won't create it again<br></span><span>Searching for files matching artifact pattern dist/**</span><span><br>Artifact pattern dist/** matched 2 files with a total size of 93.7 MiB<br></span><span>Compressed files matching artifact pattern dist/** to 93.7 MiB in 3 seconds<br></span><span>Uploading artifact of 93.7 MiB<br></span><span>Successfully uploaded artifact in 6 seconds</span><span><br>Searching for test report files in directories named [test-results, failsafe-reports, test-reports, surefire-reports] down to a depth of 4</span>
<span>Finished scanning for test reports. Found 0 test report files.<br></span><span>Merged test suites, total number tests is 0, with 0 failures and 0 errors.</span><span>You already have a 'node' cache so we won't create it again<br></span>
According to the logs 2 files were uploaded, which is the correct number. I also downloaded the artifact and validated that build-$BITBUCKET_BUILD_NUMBER.zip and bitbucket-pipelines.yml (just to see if anything is copied over) are exported.
Build setup step 2:
<span>Artifact "dist/**": Downloading<br>Artifact "dist/**": Downloaded 93.7 MiB in 2 seconds<br>Artifact "dist/**": Extracting<br>Artifact "dist/**": Extracted in 0 seconds</span>
So downloaded size and uploaded size from build setup matches. But ls lists only one file.
<span>+ ls dist/<br>bitbucket-pipelines.yml</span>
What happened with my second file? In the logs there are no error messages from bitbucket. Only my deploy step fails as there is no zip file.
Any ideas what I can do to debug the issue?
Kind regards