Skip to content

Commit

Permalink
Migrate teletraan to artifactory-push (#1541)
Browse files Browse the repository at this point in the history
* migrate to artifactory-push

* move plugins outside of pluginManagement

* cleanup

* remove settings.xml

* add comments

* migrate universal to artifactory-push

* migrate teletraan to artifactory-push

* fix merge conflicts

* update repo

* cleanup

---------

Co-authored-by: Jessica Chen <[email protected]>
  • Loading branch information
jjchen56 and Jessica Chen authored Mar 25, 2024
1 parent 6812e7f commit 013eddc
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 35 deletions.
58 changes: 44 additions & 14 deletions deploy-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
<junit-jupiter.version>5.10.1</junit-jupiter.version>
<googleJavaFormat.version>1.7</googleJavaFormat.version>
<spotless.version>2.30.0</spotless.version>
<source_dir>${maven.repo.local}/com/pinterest/teletraan/${project.artifactId}/${project.version}</source_dir>
</properties>

<modules>
Expand Down Expand Up @@ -95,6 +96,12 @@
<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
Expand Down Expand Up @@ -197,22 +204,45 @@
</execution>
</executions>
</plugin>
<plugin>
<!-- This is Pinterest deployment specific. -->
<!-- For non-Pinterest deployments, remove this block and use the maven-deploy-plugin instead. -->
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>artifactory-push-deploy</id>
<phase>deploy</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>artifactory-push</executable>
<arguments>
<argument>maven</argument>
<argument>--env</argument>
<argument>prod</argument>
<argument>--maven_type</argument>
<argument>${deployment.type}</argument>
<argument>--maven_group_id</argument>
<argument>${project.groupId}</argument>
<argument>--maven_artifact_id</argument>
<argument>${project.artifactId}</argument>
<argument>--maven_version</argument>
<argument>${project.version}</argument>
<argument>--maven_pom</argument>
<argument>${source_dir}/${project.build.finalName}.pom</argument>
<argument>--to_repo</argument>
<argument>maven-private-prod-sox-local</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

<distributionManagement>
<repository>
<id>central</id>
<name>maven-releases</name>
<url>https://artifacts-prod-use1.pinadmin.com/artifactory/maven-private-prod-sox-local</url>
</repository>
<snapshotRepository>
<id>snapshots</id>
<name>maven-snapshots</name>
<url>https://artifacts-prod-use1.pinadmin.com/artifactory/maven-private-prod-sox-local</url>
</snapshotRepository>
</distributionManagement>

<profiles>
<profile>
<id>coverage</id>
Expand Down Expand Up @@ -263,4 +293,4 @@
</dependencyManagement>
</profile>
</profiles>
</project>
</project>
16 changes: 0 additions & 16 deletions deploy-service/settings.xml

This file was deleted.

46 changes: 41 additions & 5 deletions deploy-service/universal/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,6 @@
<pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to
parent pom) -->
<plugins>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.1.1</version>
</plugin>
<plugin>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.5.0</version>
Expand All @@ -140,6 +136,46 @@
</execution>
</executions>
</plugin>
<plugin>
<!-- This is Pinterest deployment specific. -->
<!-- For non-Pinterest deployments, remove this block and use the maven-deploy-plugin instead. -->
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>artifactory-push-deploy</id>
<phase>deploy</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>artifactory-push</executable>
<arguments>
<argument>maven</argument>
<argument>--env</argument>
<argument>prod</argument>
<argument>--maven_type</argument>
<argument>${deployment.type}</argument>
<argument>--maven_group_id</argument>
<argument>${project.groupId}</argument>
<argument>--maven_artifact_id</argument>
<argument>${project.artifactId}</argument>
<argument>--maven_version</argument>
<argument>${project.version}</argument>
<argument>--maven_pom</argument>
<argument>${source_dir}/${project.build.finalName}.pom</argument>
<argument>--maven_jar</argument>
<argument>${source_dir}/${project.build.finalName}.jar</argument>
<argument>--maven_jar_src</argument>
<argument>${source_dir}/${project.build.finalName}-sources.jar</argument>
<argument>--to_repo</argument>
<argument>maven-private-prod-sox-local</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down Expand Up @@ -269,4 +305,4 @@
</build>
</profile>
</profiles>
</project>
</project>

0 comments on commit 013eddc

Please sign in to comment.