How do you pass the artifact paths to a script in TeamCity. The scenario is this
Step 2 consists of a a script which
I'm struggling with step 2, I figure I need to pass the path of the build artifacts into the script but I can't see how you do it?
TeamCity is used to build and test software products in an automated manner. It provides rapid feedback on every code change, reduces code integration problems, and leads to more effective teamwork. Many popular games, websites, banking systems, and all JetBrains products are built with TeamCity.
To run a custom build with specific changes, open the build results page, go to the Changes tab, expand the required change, click the Run build with this change, and proceed with the options in the Run Custom Build dialog. Use HTTP request or REST API request to TeamCity to trigger a build.
Go to Administration | Projects and open the required project. Alternatively, open the project using the Projects pop-up menu and click Edit Project Settings. The Project Settings page will open. On the Project Settings page, click Create build configuration under the Build Configurations section.
A personal build is a build-out of the common build sequence which typically uses the changes not yet committed into the version control. Personal builds are usually initiated from one of the supported IDEs via the Remote Run procedure.
We do something like this. It is not 100% clear but it looks like you want to do the build and deployment as two separate builds in TeamCity with an artifact dependency from the deployment build on the main build which is exactly what we do. Here is how we do it.
Setup your artifacts from the main build which it sounds like you have already done.
Example: **\bin\release\*.* => bin
Set up the artifact dependency (we also do a snap shot dependency as well but you don't have to) to pull your artifacts from the main build and put them into a local folder in your deployment build.
Example: Artifacts paths: bin\**\*.* Destination path: bin\
We use a mixture of MSBuild and PowerShell for doing the actual deployment work. In each case you can reference the artifacts using a relative path.
IF the build work folder looks like this:
root |- bin (Artifacts pulled in from main build) |- src |- build (Where your build and deployment scripts live)
You would access the bin files from your deployment script located in the build folder like:
..\bin\[your files]
You can then pass the path to your build artifacts like this
%teamcity.build.checkoutDir%\bin\
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With