You are on page 1of 11

Continuous

Integration with
TIA Portal:
Project Server Tools
Siemens
TIA Portal / Continuous Integration Industry
Online
https://support.industry.siemens.com/cs/ww/en/view/109801203 Support
Legal information

Legal information
Use of application examples
Application examples illustrate the solution of automation tasks through an interaction of several components in
the form of text, graphics and/or software modules. The application examples are a free service by Siemens AG
and/or a subsidiary of Siemens AG (“Siemens”). They are non-binding and make no claim to completeness or
functionality regarding configuration and equipment. The application examples merely offer help with typical
tasks; they do not constitute customer-specific solutions. You yourself are responsible for the proper and safe
operation of the products in accordance with applicable regulations and must also check the function of the
respective application example and customize it for your system.
Siemens grants you the non-exclusive, non-sublicensable and non-transferable right to have the application
examples used by technically trained personnel. Any change to the application examples is your responsibility.
Sharing the application examples with third parties or copying the application examples or excerpts thereof is
permitted only in combination with your own products. The application examples are not required to undergo the
customary tests and quality inspections of a chargeable product; they may have functional and performance
defects as well as errors. It is your responsibility to use them in such a manner that any malfunctions that may
occur do not result in property damage or injury to persons.

Disclaimer of liability
Siemens shall not assume any liability, for any legal reason whatsoever, including, without limitation, liability for
the usability, availability, completeness and freedom from defects of the application examples as well as for
related information, configuration and performance data and any damage caused thereby. This shall not apply in
cases of mandatory liability, for example under the German Product Liability Act, or in cases of intent, gross
negligence, or culpable loss of life, bodily injury or damage to health, non-compliance with a guarantee,
fraudulent non-disclosure of a defect, or culpable breach of material contractual obligations. Claims for damages
arising from a breach of material contractual obligations shall however be limited to the foreseeable damage
typical of the type of agreement, unless liability arises from intent or gross negligence or is based on loss of life,
bodily injury or damage to health. The foregoing provisions do not imply any change in the burden of proof to
© Siemens AG 2023 All rights reserved

your detriment. You shall indemnify Siemens against existing or future claims of third parties in this connection
except where Siemens is mandatorily liable.
By using the application examples you acknowledge that Siemens cannot be held liable for any damage beyond
the liability provisions described.

Other information
Siemens reserves the right to make changes to the application examples at any time without notice. In case of
discrepancies between the suggestions in the application examples and other Siemens publications such as
catalogs, the content of the other documentation shall have precedence.
The Siemens terms of use (https://support.industry.siemens.com) shall also apply.

Security information
Siemens provides products and solutions with industrial security functions that support the secure operation of
plants, systems, machines and networks.
In order to protect plants, systems, machines and networks against cyber threats, it is necessary to implement –
and continuously maintain – a holistic, state-of-the-art industrial security concept. Siemens’ products and
solutions constitute one element of such a concept.
Customers are responsible for preventing unauthorized access to their plants, systems, machines and networks.
Such systems, machines and components should only be connected to an enterprise network or the internet if
and to the extent such a connection is necessary and only when appropriate security measures (e.g. firewalls
and/or network segmentation) are in place.
For additional information on industrial security measures that may be implemented, please visit
https://www.siemens.com/industrialsecurity.
Siemens’ products and solutions undergo continuous development to make them more secure. Siemens strongly
recommends that product updates are applied as soon as they are available and that the latest product versions
are used. Use of product versions that are no longer supported, and failure to apply the latest updates may
increase customer’s exposure to cyber threats.
To stay informed about product updates, subscribe to the Siemens Industrial Security RSS Feed under
https://www.siemens.com/cert.

Continuous Integration - Project Server Tools


Article ID: 109801203, V1.2, 03/2023 2
Table of contents

Table of contents
Legal information ......................................................................................................................... 2
1 Introduction ........................................................................................................................ 4
1.1 Overview ............................................................................................................... 4
1.2 Components used ................................................................................................. 4
2 Description ......................................................................................................................... 5
2.1 Project Server Listen Console ................................................................................ 5
2.1.1 Principle of operation ............................................................................................. 5
2.1.2 Configure mode ..................................................................................................... 5
2.1.3 Add mode.............................................................................................................. 6
2.1.4 Exclude mode........................................................................................................ 6
2.1.5 Include mode......................................................................................................... 7
2.1.6 Listen mode........................................................................................................... 7
2.2 Project Server Export Console ............................................................................... 8
2.2.1 Principle of operation ............................................................................................. 8
2.2.2 Export mode .......................................................................................................... 8
2.3 Storing project server access credentials ............................................................... 9
3 Appendix .......................................................................................................................... 10
© Siemens AG 2023 All rights reserved

3.1 Service and support............................................................................................. 10


3.2 Industry Mall ........................................................................................................ 11
3.3 Links and literature .............................................................................................. 11
3.4 Change documentation ........................................................................................ 11

Continuous Integration - Project Server Tools


Article ID: 109801203, V1.2, 03/2023 3
1 Introduction

1 Introduction
1.1 Overview
The Project Server Tools offer two applications for interacting with the TIA Portal project server:
• Project Server Listen Console for reading out information from the project server,
checking for new revisions and starting a Jenkins build job for those revisions
• Project Server Export Console for exporting a specific project with a defined version from
the project server
The Project Server Tools use the multiuser Powertool as an interface. Using this, it is possible
to read out projects and project revisions from servers.

1.2 Components used


Table 1-1: Components
Component File name Note
Setup 109801203_Cont_Int_Setup_DOC_V13_en.pdf CI system setup
documentation
Project Server 109801203_Cont_Int_ProjektServerTools_DOC_V12_en.pdf Project Server
© Siemens AG 2023 All rights reserved

Tools Tools
documentation
Test Runner 109801203_Cont_Int_TestRunner_DOC_V11_en.pdf Test Runner
documentation
Transforming 109801203_Cont_Int_Transforming_XML_DOC_V10_en.pdf Transforming
XML XML
documentation
Jenkins 109801203_Cont_Int_Jenkins_DOC_V13_en.pdf Jenkins
documentation
BAT files for 109801203_Cont_Int_Setup_PROJ_V11.zip BAT files
setup
Project Server 109801203_Cont_Int_ProjServerTools_PROJ_V11.zip Code, DLLs,
Tools applications
Test Runner 109801203_Cont_Int_TestRunner_PROJ_V140.zip DLLs,
applications
Transforming 109801203_Cont_Int_Transforming_XML_PROJ_V10.zip Code, DLLs,
XML applications
Readme OSS 109801203_Cont_Int_ToolboxforTIAPortal__1.0.0__ Third-party
READMEOSS.html software
109801203_Cont_Int_TestRunner__1.0.0__ReadMe_OSS.html information

Continuous Integration - Project Server Tools


Article ID: 109801203, V1.2, 03/2023 4
2 Description

2 Description
2.1 Project Server Listen Console
2.1.1 Principle of operation

The Project Server Listen Console must initially be configured so that it recognizes the server
address of the project server as well the address of the Jenkins server, including its access
credentials.
The information that is read from the TIA Portal project server about the saved projects and their
revisions will be stored in an XML file after the connection is established. If the data are read out
again and changes to the stored data are detected, then a Jenkins build job will be started for
these edits and the changes will once again be saved in XML format.
The Project Server Listen Console application is configured and operated with the Windows
Command Prompt. Navigate to the application folder by first navigating to the drive (for
example, enter "d:" and then navigate to the application folder (for example "cd C:\Directory\")).
The following five modes are available, with explanations below:
• Configure: Basic configuration for the Jenkins connection and handling
• Add: Adding a TIA Portal project server configuration
• Exclude: Ability to exclude individual projects from the TIA Portal project server

© Siemens AG 2023 All rights reserved

Include: Ability to edit only dedicated projects from the TIA Portal project server
• Listen: Check the TIA Portal project server for new projects/revisions and create Jenkins
jobs if there are changes

2.1.2 Configure mode

This mode serves to configure the client and/or to create a configuration file for the first time.
The following table lists parameters which can be passed. Below the table there is an example
input.

Table 2-1: Configure parameters


Parameter Description
--config="C:\Directory\config.xml" Save location where the configuration file will be
stored
--jenkins=https://MyJenkinsServer/ Access credentials to the Jenkins installation –
--username="JenkinsUserID" see also chapter 2.2 of the document "Jenkins
--password="JenkinsApiToken" documentation".
The Jenkins User ID must be used as the
username here (see Jenkins > Users > Status).
An API token from the user is required as a
password (see Jenkins > Users > Settings > API
Token).
(optional).
--dataPath="C:\Directory\data.xml" Storage path of the date file where the projects
and revisions found on the project server will be
saved (optional).
--templateJob="template-job-name" Name of the template job from which new jobs will
be duplicated and modified in Jenkins (optional).

Continuous Integration - Project Server Tools


Article ID: 109801203, V1.2, 03/2023 5
2 Description

Parameter Description
--templateLabel="TIAP_" Prefix that should be used for the label in the build
job. When templateLabel was set, the label
"__LABEL__" of the build job was replaced by the
prefix in templateLabel + version number of the
TIA Portal project – for example: "TIAP_16.0.0.0".
(optional).

Example input:
Siemens.ProjectServerListenConsole.exe configure --
config="C:\tools\ProjectServerListenConsole\config.xml" --
jenkins=https://MyJenkinsServer/ --username="JenkinsUserID" --
password="JenkinsApiToken" --
dataPath="C:\tools\ProjectServerListenConsole\data.xml" --
templateJob="template-job-name" --templateLabel="TIAP_"

2.1.3 Add mode

This mode is used to add project servers that need to be checked for new revisions. The
following table lists parameters which can be passed. Below the table there is an example input.

Table 2-2: Add parameters


© Siemens AG 2023 All rights reserved

Parameter Description
--server="https://MyProjectServerAddress:Port/" Project server data
--config="C:\Directory\config.xml" Save location where the
configuration file is stored.

Example input:
Siemens.ProjectServerListenConsole.exe add --
server=http://myprojectserver.net:12345 --
config="C:\tools\ProjectServerListenConsole\config.xml"

2.1.4 Exclude mode

The Exclude mode is needed to exclude individual projects from automatic processing so that
no Jenkins jobs are started. Multiple projects may be excluded. The "exclude" option can be
called for any of the projects. The following table lists parameters which can be passed. Below
the table there is an example input.

Table 2-3: Exclude parameters


Parameter Description
--server="https://MyProjectServerAddress:Port/" Project server data
--project="MyProjectName" Name of the project that should be
excluded from processing
--config="C:\Directory\config.xml" Save location where the
configuration file is stored.

Continuous Integration - Project Server Tools


Article ID: 109801203, V1.2, 03/2023 6
2 Description

Example input:
Siemens.ProjectServerListenConsole.exe exclude –-
server="https://MyProjectServerAddress:Port/" --project="MyProjectName" --
config="C:\tools\ProjectServerListenConsole\config.xml "

2.1.5 Include mode

Using the Include mode, it is possible to define only the projects which will be processed. This
means that Jenkins build jobs will only be created for projects in this list. Multiple projects can
be added to the list. The "include" option can be called for any of the projects.
A project listed in both the Exclude and Include configuration at the same time will not be
processed. The following table lists parameters which can be passed. Below the table there is
an example input.

Table 2-4: Include parameters


Parameter Description
--server="https://MyProjectServerAddress:Port/" Project server data
--project="MyProjectName" Name of the project that should be
included for processing
--config="C:\Directory\config.xml" Save location where the
configuration file is stored.
© Siemens AG 2023 All rights reserved

Example input:
Siemens.ProjectServerListenConsole.exe include –-
server="https://MyProjectServerAddress:Port/" --project="MyProjectName" --
config="C:\tools\ProjectServerListenConsole\config.xml"

2.1.6 Listen mode

The Listen mode checks whether new projects and revisions have been added in the configured
project servers. For each new project found, a new Jenkins job is created; for each new
revision, a build process is triggered in the build job. The build process runs the test cases. The
projects in the Exclude or Include lists will be acted upon accordingly. The following table lists
parameters which can be passed. Below the table there is an example input.

Table 2-5: Listen parameters


Parameter Description
--config="C:\Directory\config.xml" Save location where the configuration file is
stored.
--Debug=true Optional parameter to output error messages with
Jenkins http communication. The Debug options is
not saved in the configuration.

Example input:
Siemens.ProjectServerListenConsole listen --
config="C:\tools\ProjectServerListenConsole\config.xml"

Continuous Integration - Project Server Tools


Article ID: 109801203, V1.2, 03/2023 7
2 Description

When a project is added for the first time, then only the latest revision of the project is marked
for testing. All other revisions will be given the time stamp DateTime.MinValue and will thus
be marked as tested. The reason for this is that, in the case of a new implementation, the
Note complete project server with all revisions will not be tested, as the latest revision is the most
interesting one for testing. If all versions need to be tested, a Replace operation can be done
in the data.xml file (<TestTransmitted>0001-01-01T00:00:00</TestTransmitted> ->
<TestTransmitted xsi:nil="true" />). This will mark all skipped revisions for testing.

2.2 Project Server Export Console


2.2.1 Principle of operation

The Project Server Export Console is called with the corresponding parameters and does not
need to be configured separately.
The Project Server Export Console application is controlled via the Windows Command Prompt.
You can launch it by right-clicking the application folder with the SHIFT key held down, then
selecting "Open Command Prompt here".

2.2.2 Export mode

The Export mode is necessary to export specific revisions from the project server so that tests
© Siemens AG 2023 All rights reserved

can be performed there. The following table lists parameters which can be passed. Below the
table there is an example input.

Table 2-6: Export parameters


Parameter Description
--server="https://MyProjectServerAddress:Port/" Project server data
--project="MyProjectName" Name of the project to be exported
--revisionId=N Revision number to be exported
--targetDir="C:\ExportDirectory\" Target directory for the export

Example input:
Siemens.ProjectServerExportConsole.exe export --
server="https://MyProjectServerAddress:Port/" --project="MyProjectName" --
revisionId=1 --targetDir="C:\ExportDirectory\"

Continuous Integration - Project Server Tools


Article ID: 109801203, V1.2, 03/2023 8
2 Description

2.3 Storing project server access credentials


When the project server and Project Server Tools applications are run on different systems,
reading of server data only works when the program is run by a computer that has valid access
credentials for the project server.
These are entered in the Windows Credential Manager. It is recommended to create a
functional account for the tool, as it will have to be given rights on all project servers.

Figure 2-1: Credential Manager


© Siemens AG 2023 All rights reserved

Continuous Integration - Project Server Tools


Article ID: 109801203, V1.2, 03/2023 9
3 Appendix

3 Appendix
3.1 Service and support
Industry Online Support
Do you have any questions or need assistance?
Siemens Industry Online Support offers round the clock access to our entire service and support
know-how and portfolio.
The Industry Online Support is the central address for information about our products, solutions
and services.
Product information, manuals, downloads, FAQs, application examples and videos – all
information is accessible with just a few mouse clicks:
support.industry.siemens.com

Technical Support
The Technical Support of Siemens Industry provides you fast and competent support regarding
all technical queries with numerous tailor-made offers
– ranging from basic support to individual support contracts. Please send queries to Technical
Support via Web form:
© Siemens AG 2023 All rights reserved

siemens.com/SupportRequest

SITRAIN – Digital Industry Academy


We support you with our globally available training courses for industry with practical
experience, innovative learning methods and a concept that’s tailored to the customer’s specific
needs.
For more information on our offered trainings and courses, as well as their locations and dates,
refer to our web page:
siemens.com/sitrain

Service offer
Our range of services includes the following:
• Plant data services
• Spare parts services
• Repair services
• On-site and maintenance services
• Retrofitting and modernization services
• Service programs and contracts
You can find detailed information on our range of services in the service catalog web page:
support.industry.siemens.com/cs/sc

Industry Online Support app


You will receive optimum support wherever you are with the "Siemens Industry Online Support"
app. The app is available for iOS and Android:
support.industry.siemens.com/cs/ww/en/sc/2067

Continuous Integration - Project Server Tools


Article ID: 109801203, V1.2, 03/2023 10
3 Appendix

3.2 Industry Mall

The Siemens Industry Mall is the platform on which the entire Siemens Industry product portfolio
is accessible. From the selection of products to the order and the delivery tracking, the Industry
Mall enables the complete purchasing processing – directly and independently of time and
location:
mall.industry.siemens.com

3.3 Links and literature


Table 3-1
No. Topic
© Siemens AG 2023 All rights reserved

\1\ Siemens Industry Online Support


https://support.industry.siemens.com
\2\ Link to this entry page of this application example
https://support.industry.siemens.com/cs/ww/en/view/109801203
\3\

3.4 Change documentation


Table 3-2
Version Date Modifications
V1.0 08/2021 First version
V1.1 05/2022 Modifications in the setup batch files and documentation
V1.2 03/2023 Improved description of Jenkins user/password

Continuous Integration - Project Server Tools


Article ID: 109801203, V1.2, 03/2023 11

You might also like