I have some problem: Have a build with n steps. Last step is a custom c# notifier, that sends emails about build state. Now I need to receive artifacts and attach them to my email. The problem is that at last step we don't have already zipped artifacts, that's why we need to find them ourselves and zip. In some configurations I don't have any property "checkout directory". So, how I can get root checkout folder and artifact path?
Teamcity REST API: get an artifact path
1k Views Asked by ArgorAvest At
1
There are 1 best solutions below
Related Questions in C#
- How to call a C language function from x86 assembly code?
- What does: "char *argv[]" mean?
- User input sanitization program, which takes a specific amount of arguments and passes the execution to a bash script
- How to crop a BMP image in half using C
- How can I get the difference in minutes between two dates and hours?
- Why will this code compile although it defines two variables with the same name?
- Compiling eBPF program in Docker fails due to missing '__u64' type
- Why can't I use the file pointer after the first read attempt fails?
- #include Header files in C with definition too
- OpenCV2 on CLion
- What is causing the store latency in this program?
- How to refer to the filepath of test data in test sourcecode?
- 9 Digit Addresses in Hexadecimal System in MacOS
- My server TCP doesn't receive messages from the client in C
- Printing the characters obtained from the array s using printf?
Related Questions in TEAMCITY
- How do I delete unused VCS roots with REST API?
- Why is "Extract template" not showing on a TeamCity 11 build configuration?
- Restore Teamcity
- Team City Build configurations/ Build Steps using vscode
- How to resolve a "Kotlin: Unresolved reference. None of the following candidates is applicable because of receiver type mismatch:" error?
- Error in while performing Angular tests on TeamCity
- Unable to complete new 'Cloud Profile' setup in TeamCity using Azure Resource Manager Cloud Support plugin
- JetBrains TeamCity: Agent Executor Mode
- email notification templates changes reverting after the upgrade of Teamcity server
- Why does the TeamCity agent initially perform 1 build
- Errors when launching a build on TeamCity
- How to integrate multiple jacocoReport in teamcity?
- Custom parameter with file browser in TeamCity runner
- Upload fails with no description
- Gitversion "could not load ssl libraries" error on TeamCity with normalization enabled
Related Questions in ARTIFACTS
- GitLab release-job creates a release where asset is artifacts.zip instead of concrete file
- Having issues while building the jfrog artifacts. What type of changes I have to do in settings.xml or any permissions?
- Gitlab Release job using link from artifacts
- Can images be blocked from being pushed to Harbor based on the number of artifacts for that image?
- Challenging while upgrading jfrog artifactory from 6.9 to 7.71 and mounting the local existing stored artifactories into gcs bucket
- Nginx cache and nextjs manifest in responses produces 404 after release
- Azure DevOps Artifacts feed does not contain a package description
- download the artifacts of a gitlab build job to a remote server
- Push large artifacts though API gitlab
- Republishing artifacts / JAR with version update
- Support for images in Microsoft Artifact Registry
- How to connect in a spring boot project, an artifact developed in python in azure devops
- How can I download/get artifacts using GItLabs Artifact API from a specific environment into a separate pipeline?
- What are gitlab uploads and what should they be used for?
- Jenkins ArtifactDeployer plugin How to ignore the source directory
Related Questions in TEAMCITY-REST-API
- Update Teamcity parameter using powershell
- 401 client error with Python Requests delete() method
- How to properly trigger build from the REST API in teamcity with a specific vcs number?
- REST API Posting two request simultaneously with different properties fails with 403 status code due to CSRF check
- Team City 9.1 Rest API: How to run build with custom config setting (settings from VCS / not current ones) through Rest API
- Create user from teamcity rest API
- Trigger TeamCity build on a specific BitBucket repo branch
- Search for build number on TeamCity via REST API
- Add build artifact to TeamCity asynchronously
- Teamcity REST API: get an artifact path
- How to get builds by specifying multiple tags by TeamCity REST API?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
In order to attach files to your email I don't think you need to be using the REST API, but inbuilt parameters to find out various paths and locations. Without fully understanding your build pipeline I can only have a guess that this is what you need to know.
In built parameters
TeamCity offers a number of parameters that will help you with various paths
%teamcity.agent.work.dir%- This is the working directory of the agent%teamcity.build.checkoutDir%- This is the checkout directory of the agent%system.teamcity.build.tempDir%- This is the temporary build directoryOutputting these as part of a simple build, mine are:
Looking in the build log will help you work out where various bits are going. Again without fully appreciating your build setup I can only generalise, but here we can see that a
.nupkgis being produced in the checkout directory.TeamCity won't publish artifacts until after the last build step has executed in a build configuration, unless you want to force this using
##teamcity[publishArtifacts '<path>'], but I don't think that will help you unless you are trying to then call the REST API to get to the artifacts.Hope this helps.