Skip to content

Commit

Permalink
Enable default splunk and confluent dependencies
Browse files Browse the repository at this point in the history
Signed-off-by: Jeffrey Kinard <[email protected]>
  • Loading branch information
Polber committed Aug 13, 2024
1 parent ffdb13c commit e3ace6f
Show file tree
Hide file tree
Showing 8 changed files with 57 additions and 34 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ jobs:
if: always()
- name: Create artifacts and push
run: |
mvn verify -PtemplatesRelease,splunkDeps,missing-artifact-repos \
mvn verify -PtemplatesRelease \
-DprojectId="dataflow-templates" \
-DbucketName="dataflow-templates-staging" \
-DlibrariesBucketName="dataflow-templates-libraries" \
Expand Down
6 changes: 3 additions & 3 deletions cicd/internal/workflows/maven-workflows.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,15 @@ func (*mvnFlags) FailAtTheEnd() string {
}

func (*mvnFlags) RunIntegrationTests() string {
return "-PtemplatesIntegrationTests,splunkDeps,missing-artifact-repos"
return "-PtemplatesIntegrationTests"
}

func (*mvnFlags) RunIntegrationSmokeTests() string {
return "-PtemplatesIntegrationSmokeTests,splunkDeps,missing-artifact-repos"
return "-PtemplatesIntegrationSmokeTests"
}

func (*mvnFlags) RunLoadTests() string {
return "-PtemplatesLoadTests,splunkDeps,missing-artifact-repos"
return "-PtemplatesLoadTests"
}

// The number of modules Maven is going to build in parallel in a multi-module project.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ private String[] buildMavenStageCommand(
"-pl",
moduleBuild,
"-am",
"-PtemplatesStage,pluginOutputDir,splunkDeps,missing-artifact-repos",
"-PtemplatesStage,pluginOutputDir",
"-DpluginRunId=" + RandomStringUtils.randomAlphanumeric(16),
// Skip shading for now due to flakiness / slowness in the process.
"-DskipShade=" + skipShade,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ String[] buildMavenStageCommand(
"-pl",
moduleBuild,
"-am",
"-PtemplatesStage,pluginOutputDir,splunkDeps,missing-artifact-repos",
"-PtemplatesStage,pluginOutputDir",
// Skip shading for now due to flakiness / slowness in the process.
"-DskipShade=" + true,
"-DskipTests",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public void testBuildMavenStageCommand() {
assertThat(String.join(" ", Arrays.copyOfRange(actual, 0, 5)))
.isEqualTo("mvn compile package -q -f");
String expected =
"-pl metadata,v2/common,v2/spanner-change-streams-to-sharded-file-sink -am -PtemplatesStage,pluginOutputDir,splunkDeps,missing-artifact-repos -DskipShade=true -DskipTests -Dmaven.test.skip -Dcheckstyle.skip -Dmdep.analyze.skip -Dspotless.check.skip -Denforcer.skip -DprojectId=testProject -Dregion=us-central1 -DbucketName=TestBucketName -DgcpTempLocation=TestBucketName -DstagePrefix=TestClassName -DtemplateName=Spanner_Change_Streams_to_Sharded_File_Sink -DunifiedWorker=true -e";
"-pl metadata,v2/common,v2/spanner-change-streams-to-sharded-file-sink -am -PtemplatesStage,pluginOutputDir -DskipShade=true -DskipTests -Dmaven.test.skip -Dcheckstyle.skip -Dmdep.analyze.skip -Dspotless.check.skip -Denforcer.skip -DprojectId=testProject -Dregion=us-central1 -DbucketName=TestBucketName -DgcpTempLocation=TestBucketName -DstagePrefix=TestClassName -DtemplateName=Spanner_Change_Streams_to_Sharded_File_Sink -DunifiedWorker=true -e";
assertThat(String.join(" ", Arrays.copyOfRange(actual, 6, 25))).isEqualTo(expected);
assertThat(actual[5]).endsWith("pom.xml");
assertThat(actual[25]).isNotEmpty();
Expand Down
51 changes: 50 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,13 @@
</executions>
</plugin>
</plugins>
<extensions>
<extension>
<groupId>com.google.cloud.artifactregistry</groupId>
<artifactId>artifactregistry-maven-wagon</artifactId>
<version>2.2.0</version>
</extension>
</extensions>
</build>

<profiles>
Expand Down Expand Up @@ -600,10 +607,37 @@
</repository>
</repositories>
</profile>
<profile>
<id>internalMaven</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<repositories>
<repository>
<id>central</id>
<name>Maven Central remote repository</name>
<url>artifactregistry://us-maven.pkg.dev/artifact-foundry-prod/maven-3p</url>
<layout>default</layout>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>internal-maven</id>
<name>Internal Maven Release</name>
<url>file://${rootDir}/../../../maven/repository/central/</url>
</repository>
</repositories>
</profile>
<profile>
<id>splunkDeps</id>
<activation>
<activeByDefault>true</activeByDefault>
<property>
<name>!skipSplunkDeps</name>
</property>
</activation>
<repositories>
<repository>
Expand All @@ -623,6 +657,21 @@
</pluginRepository>
</pluginRepositories>
</profile>
<profile>
<id>confluentDeps</id>
<activation>
<property>
<name>!skipConfluentDeps</name>
</property>
</activation>
<repositories>
<repository>
<!-- Required for io.confluent:kafka-avro-serializer artifact -->
<id>confluent</id>
<url>https://packages.confluent.io/maven/</url>
</repository>
</repositories>
</profile>
<profile>
<!-- mvn clean deploy -Prelease -pl plugins/templates-maven-plugin -pl v2/common -am -->
<id>release</id>
Expand Down
13 changes: 0 additions & 13 deletions v1/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -948,19 +948,6 @@
</build>

<profiles>
<profile>
<id>missing-artifact-repos</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<!-- Required for io.confluent:kafka-avro-serializer artifact -->
<id>confluent</id>
<url>https://packages.confluent.io/maven/</url>
</repository>
</repositories>
</profile>
<profile>
<id>shade</id>
<activation>
Expand Down
13 changes: 0 additions & 13 deletions v2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -467,19 +467,6 @@
</build>

<profiles>
<profile>
<id>missing-artifact-repos</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<!-- Required for io.confluent:kafka-avro-serializer artifact -->
<id>confluent</id>
<url>https://packages.confluent.io/maven/</url>
</repository>
</repositories>
</profile>
<profile>
<id>shade</id>
<activation>
Expand Down

0 comments on commit e3ace6f

Please sign in to comment.