Skip to content

Commit

Permalink
Add flink-operator files download to get-operator-files profile (#6)
Browse files Browse the repository at this point in the history
* Add flink-operator files download to get-operator-files profile

Signed-off-by: Jakub Stejskal <[email protected]>

* Update readme

Signed-off-by: Jakub Stejskal <[email protected]>

---------

Signed-off-by: Jakub Stejskal <[email protected]>
  • Loading branch information
Frawless authored Jul 31, 2024
1 parent c2c2e0d commit ca7f158
Show file tree
Hide file tree
Showing 2 changed files with 102 additions and 2 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

Test suite for verify interoperability of streams components like kafka, flink, etc... managed by operators on kubernetes.

## Requirements
There is several requirements you have to have installed to properly build the project and run the tests:
- Java 17+
- Helm 3+

## Use latest released upstream operators install files
Run maven with profile `get-operator-files` to download all operators install files which will be used in test suite.

Expand Down
99 changes: 97 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,15 @@
<maven.compile.plugin.version>3.13.0</maven.compile.plugin.version>
<maven.dependency.version>3.7.0</maven.dependency.version>
<maven.download.plugin.version>1.9.0</maven.download.plugin.version>
<maven.exec.plugin.version>3.3.0</maven.exec.plugin.version>

<skipITs>true</skipITs>

<operator.files.destination>operator-install-files</operator.files.destination>
<flink.files.destination>flink</flink.files.destination>
<!-- Operators versions -->
<strimzi.version>0.42.0</strimzi.version>
<flink.version>1.9.0</flink.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -284,6 +291,7 @@
</activation>
<build>
<plugins>
<!-- Strimzi Operator -->
<plugin>
<groupId>com.googlecode.maven-download-plugin</groupId>
<artifactId>download-maven-plugin</artifactId>
Expand All @@ -296,8 +304,8 @@
<goal>wget</goal>
</goals>
<configuration>
<url>https://github.com/strimzi/strimzi-kafka-operator/releases/download/0.42.0/strimzi-0.42.0.tar.gz</url>
<outputDirectory>${basedir}/operator-install-files/</outputDirectory>
<url>https://github.com/strimzi/strimzi-kafka-operator/releases/download/${strimzi.version}/strimzi-${strimzi.version}.tar.gz</url>
<outputDirectory>${basedir}/${operator.files.destination}/</outputDirectory>
<outputFileName>strimzi.tar.gz</outputFileName>
<unpack>true</unpack>
<fileMappers>
Expand All @@ -316,6 +324,93 @@
<retries>2</retries>
</configuration>
</plugin>
<!-- Flink Operator -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>${maven.exec.plugin.version}</version>
<executions>
<execution>
<id>create-dir</id>
<phase>generate-sources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>sh</executable>
<arguments>
<argument>-c</argument>
<argument>mkdir -p ${basedir}/${operator.files.destination}/${flink.files.destination}</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>flink-repo-add</id>
<phase>generate-sources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>sh</executable>
<arguments>
<argument>-c</argument>
<argument>helm repo add --force-update flink-operator-repo https://downloads.apache.org/flink/flink-kubernetes-operator-${flink.version}/</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>flink-deployment-generate</id>
<phase>generate-sources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>sh</executable>
<arguments>
<argument>-c</argument>
<argument>helm template flink-kubernetes-operator flink-operator-repo/flink-kubernetes-operator > ${basedir}/${operator.files.destination}/flink/deploy.yaml</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.googlecode.maven-download-plugin</groupId>
<artifactId>download-maven-plugin</artifactId>
<version>${maven.download.plugin.version}</version>
<executions>
<execution>
<id>get-flink-deployment-crd</id>
<phase>generate-sources</phase>
<goals>
<goal>wget</goal>
</goals>
<configuration>
<url>https://raw.githubusercontent.com/apache/flink-kubernetes-operator/release-${flink.version}/helm/flink-kubernetes-operator/crds/flinkdeployments.flink.apache.org-v1.yml</url>
<outputDirectory>${basedir}/${operator.files.destination}/${flink.files.destination}/</outputDirectory>
<outputFileName>flinkdeployments.flink.apache.org-v1.yml</outputFileName>
</configuration>
</execution>
<execution>
<id>get-flink-sessionjob-crd</id>
<phase>generate-sources</phase>
<goals>
<goal>wget</goal>
</goals>
<configuration>
<url>https://raw.githubusercontent.com/apache/flink-kubernetes-operator/release-${flink.version}/helm/flink-kubernetes-operator/crds/flinksessionjobs.flink.apache.org-v1.yml</url>
<outputDirectory>${basedir}/${operator.files.destination}/${flink.files.destination}/</outputDirectory>
<outputFileName>flinksessionjobs.flink.apache.org-v1.yml</outputFileName>
</configuration>
</execution>
</executions>
<configuration>
<overwrite>true</overwrite>
<failOnError>false</failOnError>
<skipCache>true</skipCache>
<retries>2</retries>
</configuration>
</plugin>
</plugins>
</build>
</profile>
Expand Down

0 comments on commit ca7f158

Please sign in to comment.