I'm trying to work with release in TFS, I add a task a "Copy Publish Artifact" to publish a file that will be generated in a release it gives me the error:
##[error]System.Management.Automation.ParameterBindingValidationException: Cannot bind argument to parameter 'StagingFolder' because it is null.
I test with the task "Windows machine file copy" it gives the error 53
Copy started for - '\\documents-oab.si.fr.intSraorange\alfresco\webdav\Sites\cc-dtp\documentLibrary\andbox_Auto /user:***** *****'
2018-05-07T08:43:15.7623208Z ##[error]System.Management.Automation.RuntimeException: Copying failed for resource :
2018-05-07T08:43:15.7623208Z
2018-05-07T08:43:15.7623208Z Failed to connect to the path \\documents-oab.si.fr.intSraorange\alfresco\webdav\Sites\cc-dtp\documentLibrary\andbox_Auto /user:***** ***** with the user ***** for copying.
2018-05-07T08:43:15.7623208Z System error 53 has occurred.
2018-05-07T08:43:15.7623208Z The network path was not found.
My questions is: how can i publish file generated in a release is there any method ??
You can not publish an artifact in a release using staging folder, because it really does not exist. It is a build variable only.
When you used the "Windows machine file copy", is is showing you in the log that "The network path was not found.".
Or it really does not exist or the user running the task nas no permission to access it.
To copy a file to one location to another you could:
Use a Windows Machine File Copy
Use a File copy task
Use a powershell command to copy files
Use a command line to copy files
Related
I am trying to copy a jar file in my dockerfile. whne I run build, I can see the jar under target/dockerbuild. But docker does not see the file and I am getting following error.
COPY failed: no source files were specified
My docker file has those lines for copy operation:
ENV MY_HOME=/usr/local/myhome
COPY target/dockerbuild/my.jar $MY_HOME
Why it cannot find the jar although it exists under the target.
Verify that in your .dockerignore do not have that path (target) in your exceptions
Your error looks like it could be one of the following:
The file doesn't exist in the specified path
The path doesn't exist (relative to the build context - if you use 'docker build .' then the specified path must exist relative to the current directory)
Please can you share what you run to build your docker image (so we can see the build context) and also your directory structure
That error said file target/dockerbuild/my.jar is not exist. The architecture of COPY in Dockerfile is:
COPY {file in your host} {path of target in docker image}
I had a very similar situation.
ls target/dockerbuild/my.jar
proofed that the file exists but docker build claimed that no source files were specified. However there also was a tiny hint that I did not notice for some time:
When using COPY with more than one source file, the destination must be a directory and end with a /
Though I only had one file I added the / to the copy destination and the build succeeded.
I'm creating some Windows Container images that I need but the source file I want to ADD are in a network share \\myserver\myshare\here.
I've tried in any possible way but I always get the message error The system cannot find the path specified.
Is it because I have not yet found the right way to set it or is it that it is just not possible?
From the Docker site:
Multiple resource may be specified but if they are files or directories then they must be relative to the source directory that is being built (the context of the build).
Is that why I can't accomplish what I need?
Full error message: GetFileAttributesEx \\myserver\myshare\here\: The system cannot find the path specified.
Whatever you ADD or COPY must be in the docker build context.
When you do this:
docker build .
That directory param (the . in the example) is the context that is copied and sent to the Docker daemon. Then the docker daemon use those files to COPY or ADD. It won't use any file that is not in that context.
That is the issue that you are experiencing. I'm not sure how you can solve it anything than copying the files from \\myserver to your build directory.
ADD is capable of download files by providing an URL (should investigate if it supports Windows' shares)
I am creating a docker file based on cl0sey/dotnet-mono-node-docker:latest to build my .NET Core solution. The solution folder is under a folder called src.
When I execute
dotnet restore -s https://api.nuget.org/v3/index.json
I get no exception, all seems to go well and I get the corresponding verification for all projects that the project.lock.json files have been created, like
log : Writing lock file to disk. Path:
/build/src/CoreLibrary/src/CoreWeb/project.lock.json
, but when I invoke
dotnet build ./src/**/project.json -c Release
I get the following error:
Project x does not have a lock file. Please run "dotnet restore" to
generate a new lock file.
I've checked with find . -type f and found that the lock files are indeed missing, despite the trace message stated otherwise. Interestingly if I do the very same steps on my local windows, it works like a charm.
Update: I experience the same behavior using microsoft/dotnet:latest as a base image.
I'm using this Publish over CIFS Plugin and I contiinous get an error, even though the copy succeeds. What I'm trying to do is to copy all the contents of a build results directory, all all it's assets, to the remove host. However I get an error message that I can't explain, and the on-line help is failing me.
On the Transfers Section I have only 1 block and this is the setup
Source files: build/123.456/**
Remove prefix: build/
Remote directory: builds/this_release/Latest/
Below are the error messages I get.
CIFS: Connecting from host [my-host]
CIFS: Connecting with configuration [to-host] ...
CIFS: Disconnecting configuration [to-host] ...
ERROR: Exception when publishing, exception message [A Transfer Set must contain Source files - if you really want to include everything, set Source files to **/ or **\]
Build step 'Send build artifacts to a windows share' changed build result to UNSTABLE
What I don't understand is that files under the 'build/123.456/', and sub-directories, get copied as I wanted but still I get an error. Any suggestions on how to correct that ? I've tried removing the '**' and it still works, but I still get an error.
Actually I've found the reason for my error.
I had a second (empty) Transfer Set defined on my job, with no fields filled in
This Set was the reason for the error message.
I am using ANT task Copy to copy a zip file from one share to another
<copy file="\\server_share\nightly\xyz08022012.zip" todir="Z:\output\Nightly"/>
when this gets executed, I am getting the below exception
Failed to copy \server_share\nightly\xyz08022012.zip to Z:\output\Nightly\xyz08022012.zip due to java.io.FileNotFoundException Z:\output\Nightly\xyz08022012.zip (The system cannot find the path specified.)`
When I change the Z:\output\Nightly to C:\temp, the copy works
Z:\ points to a server share which is mounted on the server with different user credentials and the drive is made persistent. This work around is because of the fact that when the build runs, the build user does not have access to the output share
Hence I mapped the server share as a network drive with different credentials (the user who has read/write permission) and made this drive persistent
This is on a Windows 7 machine where the build is running.
I tried doing a copy manually and that worked
I looked into Ant Copy Task: Failed to copy due to java.io.FileNotFoundException but doesn't help me