Deployment failed in bluemix. "Unable to get organization from Cloud Foundry" - deployment

I am having problems with deploying an app on Bluemix.
The following error is showing up in the pipeline in the deploy stage:
Unable to get organization from Cloud Foundry
It was working correctly before and now seems to be looking for organization. However, it can't find one.
The configuration for the deployment stage can be edited. However, I can only change the "Deployer Type" and "Target" but I cannot edit the "organization" or "space" field.
Anyone have the idea how this issue can be fixed?

Related

Azure Devops App Service Deploy Task Not Work Suddenly

I use [Azure App Service deploy] task in Azure Devops pipeline to deploy the artifact to an Azure App service.
Everything worked well before but today it not work suddenly. It failed when i tried to deploy the artifact to the production slot (the slot marked production). But when i tested to deploy to deployment slots, it worked well.
I just got an error message that has no much detail in the log
Cleaning up temp folders from previous zip deployments and extracting pushed zip file C:\local\Temp\zipdeploy\534hsvxr.zip (80.94 MB) to C:\local\Temp\zipdeploy\extracted
[error]Failed to deploy web package to App Service.
[error]Error: Package deployment using ZIP Deploy failed. Refer logs for more details.
Anyone got the same issue before?
Thanks
It seems to be a source control issue. Just try going to the App Service Deployment Center blade and click "Disconnect" to disconnect your deployment. And then try to deploy it again.

Deployment failed using Azure Devops

I'm trying to deploy from acceptance to production but I'm getting this error:
##[error]NotFound: Error retrieving function keys.
##[error]Check out the troubleshooting guide to see if your issue is addressed: https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/deploy/azure-resource-group-deployment?view=azure-devops#troubleshooting
##[error]Task failed while creating or updating the template deployment.
Finishing: Azure Resource Group Deployment
This is the link to the full image since I can't post images:
Mentioned error
I don't know what can be wrong, all the deployments from dev are working good until I find the main and last branch.
Thanks for your help.

"Resource not accessible by integration" when trying to create trigger

This is a very simple question, but after trying to find an answer for 3 hours I am asking, so I apologize if it is a duplicate.
I am trying to add a "Continuous deployment trigger" to my Azure DevOps Pipeline:
But after configuring the Branch Filters and trying to save, I get the following error message:
"GitHub Could not create service hooks subscription Unable to
configure a service on the selected GitHub repository. GitHub returned
the error 'Resource not accessible by integration'. "
My repository is hosted on GitHub and it is private, and so is my project on Azure DevOps
I would expect this to "just work", so I really don't see which other information would be relevant on this question, so apologies in advance in case I forgot to mention something
Through testing, I can reproduce this issue:
The cause of this error could be the selected service connection, when the service connection is to a GitHub-InstallationToken, I got the same error, as shown below:
When I choose the service connection as shown below, everything is normal:
You can check the service connections in the project settings.

Azure Function deployed successfully, but not working

I am facing a weird problem. I deployed my code using Azure DevOps Pipeline Release - it ran successfully, however, the code is not reflecting in Azure Function App.
Here is what I am doing:
Created a Release pipeline with a "Deploy Azure App Service" task. It picks up artifacts from a build pipeline and is configured to deploy to a Function App using Service Connection
When the Release pipeline is triggered it runs through all its steps, and I get a success (see logs below)
However, when I open up Azure portal and navigate to the Function App, it continues to say "Now it is time to add your code" on the Overview tab, and I am not able to hit my API on that Function App
Surprisingly, On the Deployment Center tab of the Function App, it does show the details of the deployment (See details below)
I can also find the deployed zip file under D:\home\site\wwwroot when I log on to the Kudu console
Deployment logs:
Got service connection details for Azure App Service:'myFuncApp'
Updating App Service Application settings. Data: {"WEBSITE_RUN_FROM_PACKAGE":"1"}
Updated App Service Application settings and Kudu Application settings.
Package deployment using ZIP Deploy initiated.
Successfully deployed web package to App Service.
App Service Application URL: http://myFuncApp.azurewebsites.net
View on Function App Deployment Center Tab:
Deployed Successfully to production
Source Version 6d9c8340ba Build 20190411.1 Release: 3
The Function App endpoint is working, (throwing a generic welcome page) confirming the Function App itself is healthy, but I am not able to access my API.
Additional updates
Here is the structure of the .zip file that is being uploaded to d:\home\data\SitePackages as a part of the zip deploy from Azure Pipelines:
/host.json
/package.json
/proxies.json
/package-lock.json
/func_name/index.js
/func_name/function.json
/node_modules/**
The same code is working locally.
Note: When I go to the Deployment Center tab, I do see this error message, but I think this is related to Continuous deployment through Function App
We were unable to connect to the Azure Pipeline that is connected to this Web App. This could mean it has been removed from the Azure Dev Ops Portal. If this has happened, you can disconnect this pipeline and set up a new deployment pipeline.
Please help me. What can be going wrong?
I was finally able to troubleshoot. #4c74356b41 pointed me in the right direction as the key issue was the package.
Below was the issue:
I had added an archive step in the build pipeline. This was causing the artifact to be zipped before publish
In the release pipeline I was using Azure App Service Deploy task. This internally uses Zip Deploy where App type is set to Azure Functions. Thus, it was zipping my zipped file.
When I remove the archive step, the double zipping was avoided, and it started working.

Deploy to bluemix failed with "Failed to query status of cloning repository operation."

I'm trying to setup a deploy to Bluemix button for a demo project.
The project has been deploying successfully today, but has now stopped deploying with the error:
"Failed to query status of cloning repository operation.".
See below for a screenshot.
How can I debug this? No other information is provided in the output about the error.
This problems appears to have just been a temporary glitch that has now rectified itself. I'll leave the question and answer on stackoverflow in case this is useful for other users.