Pipeline deployment error

Issue #18866 new
Weimar Coro created an issue

I am receiving this error when trying to deploy to Azure production:

The environment 'production' in your bitbucket-pipelines.yml doesn’t match any environment defined in your settings. Either update your yml, or your settings, to use the same name.

I don’t understand what is wrong with my configuration file which is:

image: node:10.15.0

pipelines:
branches:
development:
- step:
name: Build
caches:
- node
script:
- cd Client
- yarn install
- yarn run build:prod
- yarn run package
artifacts:
- Client/.zip
- step:
name: Deploy to Dev
script:
- pipe: atlassian/azure-web-apps-deploy:0.2.1
variables:
APP_ID: $APP_ID
PASSWORD: $PASSWORD
TENANT_ID: $TENANT_ID
RESOURCE_GROUP: $RESOURCE_GROUP
NAME: 'PlantedRecoveryApp'
ZIP_FILE: 'Client/sources.zip'
SLOT: 'Dev'
uat:
- step:
name: Build
caches:
- node
script:
- cd Client
- yarn install
- yarn run build:prod
- yarn run package
artifacts:
- Client/
.zip
- step:
name: Deploy to QA
deployment: test
script:
- pipe: atlassian/azure-web-apps-deploy:0.2.1
variables:
APP_ID: $APP_ID
PASSWORD: $PASSWORD
TENANT_ID: $TENANT_ID
RESOURCE_GROUP: $RESOURCE_GROUP
NAME: 'PlantedRecoveryApp'
ZIP_FILE: 'Client/sources.zip'
SLOT: 'QA'
beta:
- step:
name: Build
caches:
- node
script:
- cd Client
- yarn install
- yarn run build:prod
- yarn run package
artifacts:
- Client/.zip
- step:
name: Deploy to Staging
deployment: staging
script:
- pipe: atlassian/azure-web-apps-deploy:0.2.1
variables:
APP_ID: $APP_ID
PASSWORD: $PASSWORD
TENANT_ID: $TENANT_ID
RESOURCE_GROUP: $RESOURCE_GROUP
NAME: 'PlantedRecoveryApp'
ZIP_FILE: 'Client/sources.zip'
SLOT: 'Staging'
master:
- step:
name: Build
caches:
- node
script:
- cd Client
- yarn install
- yarn run build:prod
- yarn run package
artifacts:
- Client/
.zip
- step:
name: Deploy to Production
deployment: production
script:
- pipe: atlassian/azure-web-apps-deploy:0.2.1
variables:
APP_ID: $APP_ID
PASSWORD: $PASSWORD
TENANT_ID: $TENANT_ID
RESOURCE_GROUP: $RESOURCE_GROUP
NAME: 'PlantedRecoveryApp'
ZIP_FILE: 'Client/sources.zip'

Comments (6)

  1. Michał Kaciuba

    @Weimar Coro I just got it to work. Went into repository settings → Deployments and added an environment under Production environments.

  2. Aneita Yang staff

    Thanks for reaching out and for raising this.

    Every Bitbucket repository that uses Pipelines should have 3 environments created by default: test, staging and production. It looks like this might not have been the case for your repositories. We’re currently investigating this bug and will keep you updated on our progress via this ticket.

  3. Michał Kaciuba

    @Aneita Yang I’m not sure but in my case it might have been that I removed the production environment from Pipelines in the first place. Anyway please investigate if you can.

  4. Log in to comment