My pipeline deploys my symfony app to an Azure app service after generating build assets in two steps through composer and yarn.
However, the server doesn't have the vendor folder generate by composer and webpack files generated in the node step are also missing.
Here is the pipeline file
pipelines:
branches:
main:
- step:
name: Build
image: composer:2.6
script:
- composer install --no-interaction --prefer-dist --optimize-autoloader --no-scripts --no-dev
- ls -l $BITBUCKET_CLONE_DIR
- echo "Installing composer dependencies complete"
caches:
- composer
artifacts: # defining the artifacts to be passed to each future step.
- vendor/**
- public/**
- step:
name: Frontend assets
image: node:20.9.0
caches:
- node
script:
- yarn add --dev @symfony/webpack-encore
- yarn run encore production
- ls -l $BITBUCKET_CLONE_DIR
- echo "Installing yarn dependencies complete"
artifacts:
- public/**
- step: &deploy-production
name: Deployment
deployment: Production
script:
- ls -l $BITBUCKET_CLONE_DIR
- sudo apt-get update
- sudo apt-get install zip
- zip -r bundle.zip . -x *.git* *.yml *.env
- pipe: atlassian/azure-web-apps-deploy:1.1.0
variables:
AZURE_APP_ID: $AZURE_APP_ID
AZURE_PASSWORD: $AZURE_PASSWORD
AZURE_TENANT_ID: $AZURE_TENANT_ID
AZURE_RESOURCE_GROUP: $AZURE_RESOURCE_GROUP
AZURE_APP_NAME: 'my-app'
ZIP_FILE: 'bundle.zip'
Any kind of pointers will be highly appreciated.