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.
Related
I am using Jenkins to run build which is integrated to Azure Devops.
My Azure Pipeline build fails with the error:
Job creation failed.
HttpResponse.statusCode=500
HttpResponse.statusMessage=Server Error
hudson.security.AccessDeniedException3: *** is missing the Job/Build permission
Where can I start looking to troubleshoot this error, please?
Regards and Thanks for the help
This has been resolved. The issue was there was no permission from my jenkins build user. I just gave the build attribute permission to the user from within the Jenkins platform
I am following the example from the microsoft website:
https://learn.microsoft.com/en-us/azure/devops/pipelines/ecosystems/containers/build-image?view=azure-devops
But I get the following issue
Starting: Build an image
==============================================================================
Task : Docker
Description : Build or push Docker images, login or logout, start or stop containers, or run a Docker command
Version : 2.192.0
Author : Microsoft Corporation
Help : https://aka.ms/azpipes-docker-tsg
==============================================================================
##[error]Unhandled: No Dockerfile matching /home/vsts/work/1/s/app/Dockerfile was found
Why is it trying to find the file in a '/home/vsts/work/1/s/' directory when the parameter states 'app/Dockerfile'?
The build task is trying to find your Dockerfile at the agent build directory under app/Dockerfile.
You will need to check make sure your devops pipeline is properly connected to the repo you are referencing, and is structured accordingly.
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.
I have a .NET Core repo in VSTS. I'm trying to create a Build pipeline that builds a Docker image and adds it to my Azure Container Registry. My Build pipeline has a Docker task. This task has the "Build an image" action selected. This action relies on my Dockerfile, which looks like this:
FROM microsoft/dotnet:2.1.2-runtime-nanoserver-1803
# Install .NET Core
ENV DOTNET_VERSION 2.1.2
When my Build pipeline runs, I get an error that says:
failed to register layer: re-exec error: exit status 1: output: ProcessUtilityVMImage \\?\C:\ProgramData\docker\windowsfilter\82aba535faccd8bf0e5ce3c122247672fa671214000a12c5481972212c5e2ca0\UtilityVM: The system cannot find the path specified.
##[error]C:\Program Files\Docker\docker.exe failed with return code: 1
Why am I getting this error? How do I fix it?
It should be the same issue with this one : https://github.com/Microsoft/vsts-tasks/issues/6510
Seems it still have some issues with nanoserver-1803
Just try to setup and host a custom agent on Azure VM, then check it again.
https://github.com/Microsoft/vsts-tasks/issues/6510#issuecomment-370152300
I found maybe an explication about this error: VSTS agents seem not
support nanoserver-1709 actually. Maybe this will change with the next
version 1803.
See details here: Microsoft/vsts-agent#1393
When I setup and host a custom agent on a machine on Azure, it's
working. So it's not a bug with this task. I close this issue. Thanks!