Use Azure Secure Files to store the Talend Cloud API Tester Maven plugin configuration as a secure file and use it in your build and release pipelines.
Procedure
-
Create a file named pom.xml with the following content and
save it on your machine.
Make sure to configure this sample file according to your needs.
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.talend.apimgmt</groupId> <artifactId>api-tester-maven-plugin-launcher</artifactId> <version>1.0.0-SNAPSHOT</version> <properties> <java.version>11</java.version> </properties> <pluginRepositories> <pluginRepository> <!-- Use the repositoryId from the previous step --> <id>$repositoryId</id> <!-- Use the repositoryUrl from the previous step --> <url>$repositoryUrl</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </pluginRepository> </pluginRepositories> <build> <plugins> <plugin> <!-- The Talend Cloud API Tester Maven plugin --> <groupId>org.talend.ci</groupId> <artifactId>api-tester-maven-plugin</artifactId> <version>1.2.0</version> <executions> <execution> <phase>test</phase> <goals> <goal>test</goal> </goals> <configuration> <!-- Those variables will be defined when launching the plugin in the release pipeline --> <file>${api.test.filepath}</file> <accountId>${talend.account.id}</accountId> <instance>${talend.instance}</instance> </configuration> <!-- Use this section to set environment variables which might be defined in your API Test. If you need to set these variables at runtime, declare a variable and define it when launching the plugin in the release pipeline --> <variables> <!-- The variable port's value will be overwritten to 1337 --> <property> <name>port</name> <value>1337</value> </property> </variables> </execution> </executions> </plugin> </plugins> </build> </project>
- In your Azure DevOps project, go to Pipelines > Library.
- Click the Secure files tab and click Secure file to add a new file.
- Click Browse and select the pom.xml you created, then click OK.