CodeSign Secure Documentation
  • Overview
    • About CodeSign Secure
    • Getting Started
    • Documentation Guide
    • Portal Overview
    • Troubleshooting
      • FAQ
    • Glossary
  • Reference Guide
    • Header Bar
      • CodeSign Secure Documentation
      • Swagger API
      • Profile Section
    • Dashboard
      • Key Performance Indicators
      • Issued Certificates
      • Signatures Generated
      • HSM Health Check
    • Keys and Certificates
      • Key and Certificate Lifecycle
    • App Management
    • Signing Requests
      • Approval Workflows
    • Signing Tools
    • Reports
      • Signing Request Report
      • Audit Trail
      • Certificate Report
      • Client Report
    • Logs
    • System Setup
      • Identity Store
      • Backup
      • User
      • Roles and Permissions
      • Email
      • Signing Projects
      • SSL/TLS Management
      • Environment
      • Plugins
  • Setup & Architecture
    • Identity and Access Control
    • Architecture and Concepts
    • Installation
      • Windows
        • Installing the Server
        • Ports and Protocols
        • High Availability and Backup
        • Upgrades and Compatibility
    • Security
      • Security Hardening Checklist
      • Client Authentication
      • Designing Signing Policies
  • Release Notes
    • Releases for 2026
      • v3.2.1
    • Releases for 2025
      • v3.2.0
    • Releases for 2024
      • v3.1.0
  • API Reference
    • Getting Started
    • Authorizing Requests
    • Securing API Access
    • Request and Response Conventions
    • Endpoint Reference
      • Signing
      • Signing Requests
      • Certificates
      • Applications and Environments
      • User Management
      • Permissions
      • Email
      • System Setup
      • Reports
      • Dashboard
      • License
  • Integration Guides
    • Signing Capabilities
      • Supported Formats and Platforms
      • Timestamping
      • Windows Signing - SignTool
        • Signing
        • Macro Signing
      • Apple Signing
      • AppX & MSIX Signing
      • Visual Studio ClickOnce
      • Jar Signing
      • Sign HLK/HCK using CodeSign Secure
      • NuGet Signing
      • Mage Signing
      • Sign OVA/OVF using Encryption Consulting’s Utility Tool
      • Utility Tool for code signing
      • Container Signing
      • PKCS11 Wrapper
        • APK Signing
        • OpenSSL Signing
        • XML Signing
        • JSign Tool Signing
        • Jarsigner Signing
        • GPG2, Debian & RPM Signing
      • Reproducible Build
        • Automated Hash Validation
        • Reproducible Build Process Flow
        • Pipeline Script Components
        • Hash Validation
    • CI/CD Integration
      • GitHub Actions
      • Jenkins
      • GitLab
      • Azure DevOps
      • TeamCity
      • Bamboo
      • Securing CI/CD Credentials

TeamCity

TeamCity is a powerful CI/CD tool that automates the software development process, helping teams deliver high-quality applications faster. It provides a comprehensive platform for managing build configurations, running tests, and deploying applications to various environments.

To perform codesigning using TeamCity, go through the steps below.

  1. You can either download the free TeamCity application or a paid Enterprise version using the link. There are three OS choices for the application - Linux, Windows, and MacOS. We'll be working on the Windows executable file.

    TeamCity download page

  2. Run the application to install the TeamCity server in your environment.

    TeamCity Application Run

  3. Accept the terms and conditions and click "I Agree".

    TeamCity Application Terms & Condition

  4. Keep the default settings for easier integration and management of the server.

    TeamCity Application Default Settings 1

    TeamCity Application Default Settings 2

    TeamCity Application Default Settings 3

    Click Save and then OK to proceed to the next step of account creation.

    TeamCity Application Default Settings 4

  5. Select the option to run the TeamCity Server and TeamCity Agent under the user account and click Next. It will ask you to login as the current user of your system.

    TeamCity Application System Account-Server

    TeamCity Application System Account-Agent

  6. Select both the options to start the build agent service and the TeamCity server service. Click Next.

    TeamCity Application Service Start

  7. Click Finish. This will take you the Web UI of the TeamCity where you can create your projects and set the configurations policies.

    TeamCity Application Finish

  8. The Web UI runs on localhost on port 8111 (default). Click Proceed to set the location of data directory for TeamCity server. Access TeamCity from a browser by going to http://localhost:8111

    TeamCity Web UI Launch

  9. Select the appropriate database which will store the build history and your account related information. We will be choosing HSQLDB database for this project.

    TeamCity Database Choice

  10. Accept the license agreement and click Continue.

    TeamCity Agreement

  11. Now create a login account for your CI/CD pipeline and projects.

    TeamCity Application Run

  12. After successful login, it will take you to the TeamCity Dashboard. Now you can begin with creating your first project. Click on "Create project".

    TeamCity Application Run

  13. There are two choices when you create a project on TeamCity. It can be done either using a repository account or manually.

    Let's first see the Manual process. Enter the required details for you project.

    TeamCity Manual Project Creation 1

    Once successfully created, it will then prompt you to create a build configuration.

    TeamCity Manual Project Creation 2

  14. Here as well, you have two options - repository or manual process. We will again proceed with the manual process. Enter the required details and click Create.

    TeamCity Manual Configuration

  15. It will then ask you to enter the details for Version Control Settings. It is an optional step. We will be skipping it for this project.

    TeamCity VCS Details

  16. After setting up the general project and configuration settings, we can now add build steps to our pipeline. These are the processes that will actually execute and perform code signing operations.

    TeamCity Build Steps

    Click on the "Add Build Step" button and choose "Command Line" from the dropdown.

    TeamCity New Build Step

  17. Provide the basic details such as Step name and Step ID.

    Select the Custom script code option from the dropbox of Script field and enter the cmd script to perform the signing operation using the required details.

    A sample Command Line script is provided below for your reference:

                    
                      
                          # Execute the signtool command
                          "C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x86\signtool.exe" sign /csp "Encryption Consulting Key Storage Provider" /kc DemoCertificate /fd SHA256 /f "C:\demo files\Signing Certificates\DemoCertificate.crt" /tr http://timestamp.digicert.com /td SHA256 "C:\demo files\Test Files\TestFile1.exe"
                       
                    
                    

    The entire step should look something similar to the image below:

    TeamCity First Step View 1

  18. Now repeat the above process to create another build step for Verification of the signed file.

    A sample Command Line script is provided below for your reference:

                    
                      
                          # Execute the signtool verify command
                          "C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x86\signtool.exe" verify /pa "C:\demo files\Test Files\TestFile1.exe"
                    
                    
                

    The entire step should look something similar to the image below:

    TeamCity Second Step View 1

  19. Now to run the pipepline, click on "Run" which is on the top-right of the project view.

    After clicking "Run", you can see the live action of the pipeline by clicking "Agents"(top-left)->Select the agent name->Build History.

    TeamCity Pipeline Run

  20. A successfull execution of a pipeline will look like this. Here you can see that both the build steps - signing and verification - have been completed.

    TeamCity Successful Pipeline

On this Page:
Support Privacy Policy Terms of Service

Copyright Encryption Consulting LLC. All rights reserved.