I'm using VSTS tasks for Exporting MS Dynamics CRM Solutions which retrieves the named solution from a CRM instance. That's running properly and afterwards I use a publish Artifact task to push the exported zip files into a folder called Solution Folder
That seems to be running and the log displays that as much:
Publish Artifact log
And exported solutions appear in the artifacts tab on the build itself but not in the folder that was specified in the repo
VSTS Published artifacts
Is this the right way to do it and should the exported files be present in the folder that I specified or would there be a way to point to the drop folder so I could use other tasks to further work with the solution files?
Related
We have a microservice project architecture where there is a single project repository with several folders. Each folder has files etc for a specific API. We would like to have that as a single repo but configure separate jobs in jenkins for each API folder. As such we would like to know how to use same repo for scm checkout in jenkins but trigger builds for commits made only to the folders where changes are made. i know it supports regex to include and exclude. But would like to know how best to use that.
So say for example i have a project sample-project with 3 folders abc, def and xyz.
we now have a job in jenkins that checkouts sample-project. Now we would like that jenkins job to be configured in a way that only when anything inside abc folder is changed or committed, it triggers that job otherwise not. How to best implement this.
I have a build set up in VSTS and at the end I want to Publish my Artifacts to VSTS for releasemanagement and I want to Publish my Artifacts to a file share for other purposes. So I have 2 Publish Artifacts tasks.
To VSTS
To FileShare
I get this error
It doesn't matter in which order I put the tasks. When I put file share first then to VSTS will fail and when I put VSTS first the publish to file share fails.
When I do a commit and a build is started automatically it sometimes works. When I manually start a second build I get the error.
Here is the complete build log: Build log
It's telling you the error: Artifact 0.1.0-unstable.18 already exists.
You can't publish two artifacts with the same name. You will have to uniquely identify each artifact.
I have a single Cloud Source Repository with multiple projects. I am able to create a cloudbuild.yaml file in the repo root that builds all projects. However, I don't want to have a build trigger that rebuilds all of the projects since most commits will be for a single project. Ideally I would like to have a cloudbuild.yaml file in each project subdirectory and a build trigger that detects changes in the project subdirectory of the repository. Is something like this possible?
As a possible workaround, I believe I may be able to keep my cloudbuild.yaml in the repository root and create a custom step that will get the commit sha (via the COMMIT_SHA substitution) and then get the list of files committed (via "git show --name-only --pretty=format: $COMMIT_SHA") to determine which project should be built and what image should be created. An alternative may be to have a tagging naming convention that will contain the project name and basing the trigger on that but I don't want to tag each commit.
Note, it seems like build triggers work very well when you have multiple repos but we made the decision to go with a mono repo and I don't want to rehash that debate in this question. I'd like to understand how to best use the Build Triggers in a mono repo.
I use VSTS to build a project once changes are checked in from a git repository. That build gets stored in vsts storage. Now is there any way to easily access any retained build and copy it out for some other purpose? that is, say i've done 5 build versions.. all retained in the history of vsts. I need a copy of the 2nd build for something. Can i get to that build folder and copy it?
currently in one of the build steps it gets copied to an area called
$(Build.ArtifactStagingDirectory)\xxxxx.zip
how can i get a copy of that? trying to avoid having to remote into the build agent and dig up the files.
Use the Publish Build Artifacts task. That will upload it as a linked artifact to the build, which you can then download either via clicking on the "Download" link or via the VSTS REST API.
I'm trying to set up a build definition in TFS 2010. The options for this seem very limited, for instance I have 5 solution files in my source control and I don't seem to be able to specifiy which one to use. I've selected a workspace from my deployment server (which does a TF get every 10 minutes so I know it's a valid workspace), but when the build runs it gives me an error complaining about the mapping - and it seems to have made it's own mapping up from somewhere.
Mapping I set: $/InteractV4/Dev/IV4ProductionSR/
Error: There is no working folder mapping for $/InteractV4/Dev/IV4Support/iv4ProductionSR.sln.
There are 2 issues with this error. 1: it's not the workspace I was trying to use. 2: It's wrong and there is a working folder mapping for this source, both on my local PC and on the deployment pc, but NOT on the build server. Do I need to set up a load of folders and mappings on the build agent server? Or on the main TFS (source) server?
Thanks.
TFS-Builds operate on private Workspaces that get generated during the build process, so using a custom-Workspace is without tweaking impossible.It's possible to keep TFS from regenerating a new Workspace with each Buid, by going to Build Definition edit "Process":"2.Basic":"Clean Workspace" and changing default value All into either Outputs or None.The mappings are set for each Build Defition where various pairs exist:
Source Control Folder | Build Agent Folder
$/foo/bar | $(SourceDir)\somewhere
The $(SourceDir) is substituted during Build and it gets its value from the Build Agent Settings. If you go to the TFS Admin Console & select "Build Configuration", you 'll be presented with a list of Build Agents running on the Server (there might be additional Agents in other Servers). Clicking on "Properties" of an Agent, pops up a Window like that: This entry "Working directory" is the one that resolves & substitutes $(SourceDir) during build.For example, an entry $(SystemDrive)\Builds\$(BuildAgentId) could resolve into something like C:\Builds\88.So, for a TFS Build running on this Agent, you should expect all Sources that stand in source control under $/foo/bar to be found under C:\Builds\88\somewhere
EDITAccording to your comments you have now a mapping like this:
$\InteractV4\Dev\IV4ProductionSR | $(SourceDir)
Your build fails, as "There is no working folder mapping for $/InteractV4/Dev/IV4Support/iv4ProductionSR.sln".
Is this source control directory $/InteractV4/Dev/IV4Support mapped in your Build Definition?