So i will just give a brief overview of the pipeline file, as somehow in following step, artifact can be found:
image: maven:3-jdk-8-slim
definitions:
- step: &dockerize
name: Build
steps:
- some steps
- mvn clean package
- cd target/azure-functions/name-of-function && zip -r $BITBUCKET_CLONE_DIR/name-of-function.zip .
artifacts:
- $BITBUCKET_CLONE_DIR/name-of-function.zip
- step: &deploy_zip
name: Deploy zip to function
script:
- pipe: microsoft/azure-functions-deploy:1.0.1
variables:
AZURE_APP_ID: $SERVICE_PRINCIPAL_ID
AZURE_PASSWORD: $SERVICE_PRINCIPAL_PASSWORD
AZURE_TENANT_ID: $TENANT_ID
ZIP_FILE: '$BITBUCKET_CLONE_DIR/name-of-function.zip'
FUNCTION_APP_NAME: 'name-of-function'
DEBUG: 'true'
pipelines:
default:
- step: *dockerize
- step: *deploy_zip
So in second step i get error:
FileNotFoundError: [Errno 2] No such file or directory: '/opt/atlassian/pipelines/agent/build/name-of-function.zip'
What am i missing here? So i am doing mvn package of the azure function, and want to zip the content of my function so i can use pipe to deploy them to my function app.
Its strange that even in the artifact section of my build, there is nothing, empty screen.
Regards,
I think i found it. As path for artifact is relative to the bitbucket_clone_dir, when i only put
artifacts:
- name-of-function.zip
and then later:
ZIP_FILE: 'name-of-function.zip'
It worked. I can see artifact in artifacts section of the build as well.
Hi Uros,
and what is the value of the bitbucket_clone_dir ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Simon,
From the docs it says:
BITBUCKET_CLONE_DIR
The absolute path of the directory that the repository is cloned into within the Docker container.
You can run a test with some script and just have the:
- echo $BITBUCKET_CLONE_DIR
I think the path is:
/opt/atlassian/pipelines/agent/build
But you can check using the echo command.
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.