Is it possible to output and rename build artifacts from the TeamCity checkout directory (that are not archives)?

Shogan

I have gone through the documentation for TeamCity on build artifact outputs

(https://confluence.jetbrains.com/display/TCD8/Configuring+General+Settings#ConfiguringGeneralSettings-ArtifactPaths)

However, it doesn't seem clear to me as to how I can output a standard file from the build checkout directory, AND rename it when placing it into the build's artifacts.

I can do this pretty easily using archive file designations. For example:

%system.teamcity.build.checkoutDir%\TestProject.Installer\DiskImages\*.exe => setup-1.0.%build.counter%.zip

However, this would just simply zip up the executable installer file as a zip file with my renamed specification, where I actually just want it to stay as an .exe file. The problem I can see is that this rename convention only works on archive file types according to the above TeamCity linked documentation.

So is it possible to rename an executable file that is fetched from the build checkout directory and place it into the build artifacts?

Tomas Kubes
  1. Add command line step which will rename the artifact
ren Release\oldname.exe newname_%build.number%.exe
  1. Define artifact as path to the renamed file.
newname_%build.number%.exe

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

CMake output/build directory

Is it possible to checkout only the directory structure in cvsclient in Java?

Maven: How to unpack precise files from artifacts in the same output directory?

How to get the checkout directory of project dependencies in TeamCity?

How to store jenkins build output with artifacts?

Start vNext build from Powershell and get artifacts

TFS 2015 Publish Build Artifacts in one directory

Rename a TeamCity Build Agent

TFS - Is it possible to rename a build definition?

Is it possible to "group" build configurations in TeamCity to share dependencies?

Assemble all gradle build artifacts into a single directory

Include directory itself in TeamCity build artifact

How to delete all build artifacts in TeamCity?

TeamCity guest access without artifacts / build logs?

Remove Catkin artifacts from CPack build

gitignore for jenkins backup, including build artifacts, excluding build directory

Pipelines: cannot publish a file from artifacts directory

Git checkout from a specific directory

Copy artifacts from specific promoted build

What exactly are teamcity artifacts?

How to publish custom artifacts to Artifactory from TeamCity?

Accessing hidden teamcity artifacts

Bash script: rename output directory

TeamCity Build Artifacts - Prevent overwriting of identically named files

azure devops: copy and publish build artifacts - rename artifact by buildnumber

TeamCity Agent artifacts cache issue: agent accumulates artifacts from all prev builds

Checkout a file from a remote branch and rename it

Is it possible to rename cmake's build directory?

Upload Build artifacts from Jenkins Pipeline to Sharepoint