Environment Preview Cloning Error

INFORMATION

Relevant information to this issue:

ISSUE

When cloning an environment for a preview I get the following error:

However when running it locally I can see an error, but it does clone the environment

My cloning script looks like this

#!/bin/sh

set -e

# Clone blueprint environment
qovery environment clone \
	--organization $QOVERY_ORGANIZATION \
	--project $QOVERY_PROJECT \
	--environment $QOVERY_ENVIRONMENT \
	--new-environment-name preview-$BITBUCKET_BRANCH

# Change application branch to the Pull-Request branch
qovery application update \
	--organization $QOVERY_ORGANIZATION \
	--project $QOVERY_PROJECT \
	--environment preview-$BITBUCKET_BRANCH \
	--application $QOVERY_APPLICATION \
	--branch $BITBUCKET_BRANCH

# Deploy preview environment
qovery environment deploy \
	--organization $QOVERY_ORGANIZATION \
	--project $QOVERY_PROJECT \
	--environment preview-$BITBUCKET_BRANCH \
	--watch

HOW TO REPRODUCE

Run it in a Bitbucket pipeline

- step:
    name: Create Preview Environment
    services:
      - docker
    trigger: manual
    script:
      # Enable BUILDKIT
      - export DOCKER_BUILDKIT=1
      # Initialize and update the submodule
      - git submodule update --init --recursive
      # Create Preview
      - docker build -t qovery-preview .
      - docker run -e QOVERY_CLI_ACCESS_TOKEN=$QOVERY_CLI_ACCESS_TOKEN -e QOVERY_ORGANIZATION=$QOVERY_ORGANIZATION -e QOVERY_PROJECT=$QOVERY_PROJECT -e QOVERY_ENVIRONMENT=$QOVERY_ENVIRONMENT -e QOVERY_APPLICATION=$QOVERY_APPLICATION -e BITBUCKET_BRANCH=$BITBUCKET_BRANCH qovery-preview qovery.sh

Hello @moisesrodriguez ,

I’m taking a look.

By curiosity, you experienced issues on automatic preview envs ?
Just wondering why you built this Bitbucket pipeline instead of using our builtin feature

Hi @Melvin_Zottola ,

Thanks for looking into it.

I did try at first using the builtin feature, but got stuck as mentioned here: How can I pass the PR_ID to a lifecycle job?. So pivoted to doing it in Bitbucket where I can easily get the Pull Request branch.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.