jenkins doesn't find path **/* when Archiving artifacts - jenkins

i want to archive the artifacts in the path '**/*' but i'm getting the error:
‘**/*’ doesn’t match anything: ‘**’ exists but not ‘**/*’
under workspace i have a folder named 'build' and that folder contains the file that should be archived
from what i understand '**' should go to the build folder and the '*' should get the file
i tried use backslash('\') instead or **/. or **//* none of these worked, also when i try build/* it says build doesn't exist
console output:
Archiving artifacts
‘**/*’ doesn’t match anything: ‘**’ exists but not ‘**/*’
No artifacts found that match the file pattern "**/*". Configuration error?
update:
i found out that the workspace that it's trying to access isn't on the Jenkins server but on another server that the test is connecting using 'SSH site'.
how do i fix this?

assuming that you said the folder name under you project called build that you want all files under it to archive it use:
build/*.*

Related

Error in configuring JUnit in Jenkins: 'Tests/tests.xml' doesn’t match anything: even 'Tests' doesn't exist

I have created a freestyle project in Jenkins and I want to publish a JUnit result report after the build. The problem is that I don't know how to fill the field Test report XMLs because everytime I type the path of an xml file a red line appears saying
'Tests/tests.xml' doesn’t match anything: even 'Tests' doesn't exist
In reality the Tests folder exists and is inside Jenkins workspace folder and also the tests.xml file exists.
I have moved the Tests folder with its content to the MyProjectName folder that has automatically been created by Jenkins in the workspace. Because apparently the path is not relative to the workspace, but to the project folder that is contained in the workspace.

TFS build error: Web deployment task failed. Package file does not have a .zip file name extension

I am getting the following error when I am queuing a build in TFS 2017.
"Microsoft.Web.Publishing.targets 3009,5): Error : Web deployment task failed. (Package file 'C:\agent_work\3\s\TestApp\TestApp\release' does not have a .zip file name extension.)"
I am not sure why I am getting this error. I have hosted agent on the TFS server. I created the build definition according to this video:
www.youtube.com/watch?v=HjD4A-yeFTE
Does somebody have any idea? Appreciate your help!
Test at my side and everything works correctly.
Please try below items to narrow down the issue:
Please check the drop folder, if the .zip file actually being in the
place that you expected.
Try to specify the output path, eg:
/p:PackageLocation="$(build.artifactstagingdirectory)\\" , then
specify the Copy Root path as $(build.artifactstagingdirectory)
in Copy and Publish Build Artifacts task.
Explicitly specifying .zip extension in MSBuild Argument in the
Build Definition.
p:PackageLocation="$(BuildConfiguration)\package.zip
Check the build log, check if MSbuild works correctly. Also you can try the Msbuild command line locally to check if the .zip package can be generated.
Deploy a new agent on your Develop machine, create a new build
definition, then build with the new agent.
If still can not resolve the issue, just share the build logs here for further troubleshoot.

jenkins - archive artifacts ‘*’ doesn’t match anything

I'm trying to set up a step to archive artifacts and I want to archive everything however specifying * does not work. Jenkins comes up with
‘*’ doesn’t match anything
if I run the job regardless the job fails and logs show:
ERROR: No artifacts found that match the file pattern "". Configuration error?
ERROR: ‘’ doesn’t match anything
I tried using ** too but that came back with the same errors
Here is what to check for:
archive artifacts will only work in the workspace and fails outside
the path should be a relative path in the workspace and doesnt start with "." :
archiveArtifacts artifacts: "build/**"
archiveArtifacts artifacts: "./build/**" // Fails
archiveArtifacts artifacts: "$workspace/build/**" // Fails
" *" matches any file in the directory, ** will match everything including dir and subdirectories, **/.log will matches all files in all subdirectories with potfix
depending on if it s a windows or linux node, you will want to express your path differently
If you run Jenkins on Windows host, you must use *.* for everything
* only matches any files in workspace, if the artifacts you want to archive is in some subdirectories, you need the pattern like **/*.sh to match all files in all subdirectories with postfix .sh.

failed archiving ipa files jenkins

I have a extrange problem,
when building the ios app with jenkins the ipa file is generated, and signed correctly but when I try to archive the ipa file it fails
the jenkins log says
Results at '/Users/Shared/Jenkins/Home/jobs/iosHelp/workspace/build/ipa/Verion.ipa'
[Debug-iphoneos] $ ditto -c -k --keepParent -rsrc /Users/Shared/Jenkins/Home/jobs/iosHelp/workspace/build/Debug-iphoneos/FormSlider.app.dSYM /Users/Shared/Jenkins/Home/jobs/iosHelp/workspace/build/ipa/Verion-dSYM.zip
Archiving artifacts
ERROR: No artifacts found that match the file pattern "/Users/Shared/Jenkins/Home/jobs/iosHelp/workspace/build/ipa/Verion.ipa". Configuration error?
ERROR: ‘/Users/Shared/Jenkins/Home/jobs/iosHelp/workspace/build/ipa/Verion.ipa’ doesn’t match anything: ‘’ exists but not ‘/Users/Shared/Jenkins/Home/jobs/iosHelp/workspace/build/ipa/Verion.ipa’
Build step 'Archive the artifacts' changed build result to FAILURE
Finished: FAILURE
clearly it states that jenkins couldn't find the ipa but in the statement before shows that the ipa was generated also using the terminal to go to the build/ipa directory I cheked that the file currently exists and is generated,
any help would be appreciated
What do you use in your "Archive Artifacts" configuration? It should be relative to $workspace, so in your case just build/ipa/Verion.ipa.
Make sure there are no extra quotes either
When you navigate to this job folder is there a file there? If you are using Ant blob syntax try adding a "*" at the end in case the file extension you wrote in is incorrect or instead of "build/ipa/Verion.ipa" use "build/ipa/Verion*" to try and locate the file, as #Slav mentioned use a path relative to the $workspace

tf.exe Unable to detrmine the workspace

I am trying to call TF get command via Team Build script. I am getting the following error
Unable to determine the workspace.
Folks over the internet tell that this error is because Team Build cannot find the workspace because it is being called from a directory which is not part of the workspace.
The solution presented is to specify the working directory. I do so. The mappings are ok in Build Definition path as well as in the workspace. But now i get the following error:
Could not find cmd.exe in the current
directory . The directory name is
invalid.
Kindly help.
Thanks
Solved the problem. I added one more binding in my build Definition Workspace Section and referenced files to get/checkin/checkout with the help of variable $(MSBuildSourceDirectory). Meanwhile I ensured that $(SourceDir) is used to specify mapping in the workspace section of my Build Definiton dialog.
(source: geekswithblogs.net)
At the same time i encountered 260-character path limit, so i modified the output directory in build path as described here
(source: geekswithblogs.net)

Resources