(Beginner) Getting Started with Preview Environments on AWS | Qovery

Hello team, I have tried following the below steps point to point to deploy a preview environment from bitbucket, however the environments do not spawn for a pull request, I have followed each step thoroughly so not to miss anything, but I would like to know if there is any additional change that is required for it to work with bitbucket.

I can answer any queries if required. Also a side note, a comment is not added with the PR as suggested in the videos.

Hello @Sushant_Adhikari ,

By looking at your environments, it seems that the preview environment feature is disabled for all your env. By default, the feature is disabled at environment creation.

You can enable the preview environment feature in your desired environment settings, e.g:

Hello @Melvin_Zottola , thank you for the response, I’m aware of this feature, I tested it with the flag as on and since it didn’t work, I disabled it and pushed my env manually following → Jenkins | Docs | Qovery.
Also to note, I used a blueprint env with the containers stopped, when I faced the issue following this → (Beginner) Getting Started with Preview Environments on AWS | Qovery.

Hey @Sushant_Adhikari,

From what I see, we received some pull requests events from your master branch.
Do you remember which environment you enabled the preview environment feature ?

Otherwise, can you re-try to:

  • enable the preview environment feature on one of your env
  • open a PR with a branch that is based on the target branch of your app (e.g main in the following screenshot)

This should create a preview environment

Hello @Melvin_Zottola , the environment was blueprint, its a clone of master, with the branch set up as master as well.
Just to confirm, if I have followed the right steps, let me put it here.

  1. Clone master and create blueprint →
  2. enable preview →
  3. disable autodeloy →
  4. deploy manually to test if it works →
  5. stop the environment →
  6. create a PR in bitbucket against master.
    At this point there was no new environment created/deployed.

I have unfortunately exhausted my free deployment, so will not be able to test it right now, this was the initial POC to decide if we would be availing the service itself, but sadly, it didn’t work for me as expected. Can you please tell me if we need to stop/delete the master environment as well and if the PR requests received were for blueprint - environment?

It seems we didn’t receive the Create PR" event from bitbucket, we have received only what Bitbucket calls “Update PR”
Could you check if the webhook registered on your repository is well triggered for the “Pull Request Created” case ?
In your repository settings > webhooks > then edit the “qovery” webhook
(see screenshot below)

No need to stop or delete your master to trigger the preview environments.

About the PR requests received, we don’t have the information directly about the target environment. We find the target environment(s) to create preview environment(s) by using the git repository information in the webhook request.

@Sushant_Adhikari We will give you some additional deployments in a few hours

Thank you once again for the quick response, this is the current bitbucket-webhook setting

Hello @Sushant_Adhikari,

We found out an issue, it was related to a misconfigured mapping json property when we get the webhook event from bitbucket (the event that indicates a new PR has been open).

It has been fixed on our side so this should work next time you create a PR.

Wonderful news, thank you very much @Melvin_Zottola , hopefully I should be able to try it soon. :slightly_smiling_face:

Hi @Sushant_Adhikari , your account has been upgraded up to 200 deployments for this month.

Thank you very much @rophilogene , I tested and its now working for me :slight_smile: .