azure pipeline with .sln file - azure

I am trying to build a relase pipeline in dev.azure.com with a .sln file but it is keep failing and I am getting message "'.sln' is not recognized as an internal or external command". I have tried with full file name "ThursdayPorject.sln" and as well with "*" but everytime I am getting the same error. I am using "Command line script" to copy file from my "agent" folder on "C" drive to my "Tomcat" folder that is also on "C" driver. I am using the following command;
cd c:\agent_work\r\a_Thursdayprojet
copy ThursdayProject.sln C:\apache-tomcat-9.0.37\webapps\webapp

Related

Missing copied file in destination folder using exec node in node-red flow

I'm trying to copy a file from one folder to another folder using node-red but flow execute fine and throwing an error and also showing syntax error in the console
My flow:
Node Configuration:
exec command used
copy C:\Users\Karthikeyan.Anbalaga\Downloads\ID_NewOnePulse_results.csv C:\Users\Karthikeyan.Anbalaga\Downloads\Documents\
At the same time if I execute the file copy command in the terminal working well
>copy C:\Users\Karthikeyan.Anbalaga\Downloads\ID_NewOnePulse_results.csv C:\Users\Karthikeyan.Anbalaga\Downloads\Documents\
1 file(s) copied.
I did a mistake on the configuration, after removing the msg.payload works fine and also files I can see in the destination folder.

Unable to copy warfile from agent folder to Tomcat folder in AzureDevops using command line script

I am trying to copy a war file from my localhost to a Tomcat web apps folder using command line script in Azure DevOps. My release is getting success but the war file is not getting copying to the destination folder. How to fix this issue?
Path folder mentioned below
The script you shared echo cd E:\apache-tomcat-9.0.41\webapps just print cd E:\apache-tomcat-9.0.41\webapps, check the pic below. We could refer to this doc for more details.
We could copy the file via below cmd. Add task Command line and enter below script
cd {file path}
copy {file name} {target path}
According to the screenshot you shared, you could try below script
cd C:\agent\_work\r1\a\_nitesh482.Devops\warfile\webapp\target
copy webapp.war E:\apache-tomcat-9.0.41\webapps
Result:
Update1
If the file does not exist, we will get the message: The system cannot find the file specified. and error message: [error]Cmd.exe exited with code '1'
Update2
Please ensure that you are using self-hosted agent instead of hosted agent. If you are using hosted agent, we will get the error message, check the pic below.
Self-hosted agent:
Hosted agent:

How to open D:\a\r1\a\ on Azure?

I'm running Cypress in one of my release stages and it gives me this output:
Finished processing: D:\a\r1\a\_ClientWeb-Build-CI\ShellArtifact\tests\integration\cypress\videos\onboarding.spec.js.mp4 (0 seconds)
I have 2 questions:
Is the path name relative to the app service? If I have a app service called randomname and run the Cypress Stage on that randomname app service should I be able to find tCypresshe output in randomname.scm.azurewebsites.net.
If I go into the scm debug console and I do cd D:\a\ I get:
cd : Cannot find path 'D:\a\' because it does not exist.
So how do I actually access my Cypress test results?
I've also tried archiving the files into a zip file:
In the output of the task step I see:
Creating archive: d:\home\testing\somefile.zip
But when I try to access the D:/home/testing folder on my appname.scm.azurewebsites.net I get:
cd : Cannot find path 'D:\home\testing' because it does not exist.
The path D:\a\r1\a is inside the hosted agent that run the release pipeline, is not in your application.
The same thing is for the zip file, when you specify d:/home/... is in the agent.
After the release is finish all the files are deleted, so you need to save the file in another place (maybe in azure?) during the pipeline, for example, with "Azure File Copy" task.

Publish build artifacts step fails, when using fileshare (TFS 2015)

TFS Version: 14.102.25423.0 (Tfs2015.Update3)
In my build definition when I set the Path argument of the
Publish Build Artifacts step
with
Artifact type: File share
to
\VSALM\share
Behind the scene this build step executes a node.js script function which is called recursively, but there is a bug and the function repeats itself over and over again while trying to create the drop folder**.
The failing node.js script is
mkdir.js
and resides below the build agent folder:
agent\tasks\PublishBuildArtifacts\1.0.28\node_modules\shelljs\src\mkdir.js
Name of the failing function is:
mkdirSyncRecursive
The error msg:
016-07-23T21:22:02.3703397Z shell.js: internal error
2016-07-23T21:22:02.3703397Z RangeError: Maximum call stack size
exceeded
--> Stackoverflow
When I enter an absolut path like
c:\workspaces\share
I get this error:
2016-07-23T21:03:07.5727256Z shell.js: internal error
2016-07-23T21:03:07.5727256Z Error: EEXIST: file already exists, mkdir
'C:\workspaces\share'
Workaround
When I set the drop folder to (escaped network share path):
\\\\VSALM\\share\\$(Build.DefinitionName)\\$(Build.BuildNumber)
Then the build step succeeds but the files are not dropped under the path of the share.
They are dropped here in my case:
C:\VSALM\share\MyBuildDefinition\20160723.7\drop
I don't know why it doesn't work with my share set to:
C:\workspaces\share
but it works when I create a network share in
C:\drop\share
and set the drop folder path in my build definition to:
\\\\drop\\share\\$(Build.DefinitionName)\\$(Build.BuildNumber)
Question:
Someone knows how to fix this script?
"Publish Build Artifacts" task publishes the build output to a shared network path when you select "File Share" type. The "Maximum call stack size exceeded" error usually occurs when the shared network path cannot be found. Please check if the "Path" you entered is correct and can be accessed from the build agent. The format is usually like following:
\\hostnameoripaddress\sharedfolder
When you enter a path with "\\\\" prefix, the task will copy the output to the root of the drive where the build agent located. For example, your build agent work folder is placed in C drive, when you specify "\\\\VSALM\share" as the path, it will copy files to "C:\VSALM\Share" folder(It will create the folder if the path does not exist).

Is that the 'path to war' which I am giving wrong? If yes,how do I do a rollback?

I have been trying to use the command to rollback the last process of deploying the website which was interrupted due to a network failure.
The generic command that I am using while inside the bin directory of server's SDK (On Linux) is :
./appcfg.sh rollback /path_to_the_war_directory_that_has_appengine-web.xml
Is this the way we do a rollback ? If not please tell me the method.
_(I was asked to make a directory war in the project directory and place the WEB-INF folder in that with appengine-web.xml inside it. It may be wrong)_
I am fully convinced that I am making a mistake while giving the path to my app .
Shot where my .war file is there :
Now the command that I am using is (while inside the bin directory of the server's SDK) :
./appcfg.sh rollback /home/non-admin/NetbeansProjects/'Personal Site'/web/war
The following is the representation of the path to war directory :
Where am I wrong ? How should I run this command so that I am able to deploy my project once again ?
On running the above command I get this message :
Unable to find the webapp directory /home/non-admin/NetbeansProjects/Personal Site/web/war
usage: AppCfg [options] <action> [<app-dir>] [<argument>]
NOTE : I have duplicated the folder WEB-INF. There is still a folder named WEB-INF inside the web directory that contains all other xml files.
The error tells you that the folder /home/non-admin/NetbeansProjects/Personal Site/web/war does not exist. If you look carefully the name of the folder is NetBeansProjects (the filesystem in Linux is case-sensitive).
So, you should run instead the command:
./appcfg.sh rollback /home/non-admin/NetBeansProjects/'Personal Site'/web/war
and just to make sure that the directory exists run first
ls /home/non-admin/NetBeansProjects/'Personal Site'/web/war

Resources