I am using CloudShell to publish AzureFunction. I was able to publish the AzureFunction previously but today I am getting this Error while executing the publish command func azure functionapp publish <APP_NAME>
Getting site publishing info...
Creating archive for current directory...
Performing remote build for functions project. Deleting the old .python_packages directory Uploading 15.91 KB [##############################################################################]
Remote build in progress, please wait...
Unexpected character encountered while parsing value: {. Path '[0].build_summary', line 1, position 630.
I'm looking to build Release pipeline to create a immutable ubuntu machine for my VMss.
I have deployment.sh with all required application for Vmss.
I'm trying to build Image for a Jar based application.
I have my artifacts structure as per below
I'm trying to build immutable image using build image task from azure DevOps
as given below.
On running task i'm getting a error with the following log.
2021-07-22T10:34:13.5841600Z ==> azure-arm: chmod: cannot access '/deployTemp/app.jar/../../deployment.sh': Not a directory
2021-07-22T10:34:13.5842952Z
2021-07-22T10:34:13.5862730Z ==> azure-arm: /tmp/script_5507.sh: 5: /tmp/script_5507.sh: /deployTemp/app.jar/../../deployment.sh: not found
Any Help ?
Thanks in Advance.
I was following this article from Microsoft to use Azure pipeline for build and release. Reached upto this section and confused about the following code:
az batch application package create --application-id $(batchApplicationId)
--name $(batchAccountName)
--resource-group $(resourceGroupName)
--version $(batchApplicationVersion)
--package-file=$(System.DefaultWorkingDirectory)/$(Release.Artifacts.{YourBuildArtifactSourceAlias}.BuildId).zip
I have configured the following in pipeline variables:
batchApplicationId
batchAccountName
resourceGroupName
batchApplicationVersion
The only thing remaning is configuring the package-file
As far as I understand, I just have to replace YourBuildArtifactSourceAlias with my artifact source alias, and I have done that. But when deploying the release pipeline, I get the following error:
.zip was unexpected at this time.
##[error]Script failed with exit code: 255
As we can see in this screenshot, the only failing part of this whole process is when uploading the package to the application created, which is the final step.
Can someone help me with this?
Below is Azure error log from the Azure release pipeline.
2020-07-24T05:17:13.7712974Z ##[section]Starting: Deploy Azure App Service
2020-07-24T05:17:14.0464143Z ==============================================================================
2020-07-24T05:17:14.0465719Z Task : Azure App Service deploy
2020-07-24T05:17:14.0469391Z Description : Deploy to Azure App Service a web, mobile, or API app using Docker, Java, .NET, .NET Core, Node.js, PHP, Python, or Ruby
2020-07-24T05:17:14.0469849Z Version : 3.163.5
2020-07-24T05:17:14.0470410Z Author : Microsoft Corporation
2020-07-24T05:17:14.0470921Z Help : https://aka.ms/azureappservicetroubleshooting
2020-07-24T05:17:14.0471274Z =============================================================================
2020-07-24T05:17:16.0650643Z Got connection details for Azure App Service:'XXXXX'
2020-07-24T05:17:17.6576087Z (node:764) Warning: Use Cipheriv for counter mode of aes-256-ctr
**2020-07-24T05:17:17.6627737Z ##[error]Error: No package found with specified pattern: D:\a\r1\a\Drop<br/>Check if the package mentioned in the task is published as an artifact in the build or a previous stage and downloaded in the current job.**
2020-07-24T05:17:22.9168975Z Successfully added release annotation to the Application Insight : XXXXX
2020-07-24T05:17:24.8686063Z Successfully updated deployment History at https://XXXXX.scm.azurewebsites.net/api/deployments/231595567842919
2020-07-24T05:17:24.8933576Z ##[section]Finishing: Deploy Azure App Service
P.S. I have checked build pipeline, I can download build Artificats, but it displays below warning.
[warning]Directory 'D:\a\1\a' is empty. Nothing will be added to build artifact 'drop'.
Assuming you meant you have solved the build artifact empty issue, but the release pipeline still had issue in Azure App Service deploy task.
As the error mentioned, there is "No package found with specified pattern: D:\a\r1\a\Drop", you need to check how you define the package, try format $(System.DefaultWorkingDirectory)/**/*.zip instead of $(System.DefaultWorkingDirectory)\Drop.
As task "Publish Build Artifact" publish artifact from $(build.artifactstagingdirectory), so we need add a task "Copy files" to copy your files ** from $(system.defaultworkingdirectory) to $(build.artifactstagingdirectory) **. which copied my build to stagingdirectory.
Created a simple Azure devops release pipeline to provision a resource group. Tested terraform script with remote state file locally and checked in the code to git. This is how the code is organized:
IAC (root folder)
/bin/terraform.exe
main.tf (this has terraform configuration with remote state)
Created a release pipeline pointing to this repository as code. Pipleline gives the alias _IAC to the artifact
in the pipeline I have powershell activities to login to azure using a service principal
then the following line:
$(System.DefaultWorkingDirectory)/_IAC/bin/terraform init
This command executes but says there is no terraform configuration file.
2020-03-05T02:23:04.4536130Z [0m[1mTerraform initialized in an empty directory![0m
2020-03-05T02:23:04.4536786Z
2020-03-05T02:23:04.4556953Z The directory has no Terraform configuration files. You may begin working
2020-03-05T02:23:04.4559693Z with Terraform immediately by creating Terraform configuration files.[0m
the working directory where azure release pipeline agent is running did not have the configuration file.
I had to use a copy operation to copy the main.tf file to the $(AgentWorkingDirectory)