Reputation: 21
I'm running into an issue with Azure App Service using deployment slots. I have two slots: one for staging and one for production.
Here's the problem: It seems like the GitHub deployment key/connection is tied to the actual instance and not the deployment slot. This means when I deploy to staging and then swap with production, I'm unable to redeploy to staging.
I've already tried a few things to remedy this, including checking the deployment settings and app configurations, but there does not seem to be anything about tying github credentials to slot vs instance. The issue persists, and I still cannot deploy to the staging instance (previous prod) after swapping.
I can disconnect and connect again, but that would work once, and break again after swapping.
The strange part? If I swap back, it works fine again. It's as though the GitHub connection is swapping along with the underlying instances.
Is there a way to tie the deployment key to the slot, and not the instance?
Anyone else encountered this or have a solution? Thanks in advance!
Upvotes: 0
Views: 197
Reputation: 21
At the end, I found a workaround by creating an additional 'temp' slot. Interestingly, the staging slot would always show a connection to GitHub even when it lacked the necessary credentials. Here's the step-by-step process I undertook:
This process resulted in two visible deploy keys in my GitHub repository, corresponding to the production and staging slots. While this approach is essentially a workaround, it successfully addressed the issue, and both slots retained their deploy keys after the swap. Also, I'm not sure why this is even an issue in the first place.
Upvotes: 0