Test org.codehaus.cargo plugin as a replacement (#1965)

* Move from tomcat7-maven-plugin to cargo-maven3-plugin, add a test for api-explorer deployment
This commit is contained in:
Marcin Strankowski
2023-07-03 11:07:29 +02:00
committed by GitHub
parent 4e9fb76404
commit 18dadfe110
3 changed files with 63 additions and 18 deletions

View File

@@ -561,3 +561,27 @@ jobs:
aws s3 cp --acl private ./amps/ags/rm-automation/rm-automation-community-rest-api/target/reports/rm-automation-community-rest-api.log s3://ags-travis-artifacts/community/${{ github.run_number }}/AGS-Community-Rest-API-Tests/rm-automation-community-rest-api.log aws s3 cp --acl private ./amps/ags/rm-automation/rm-automation-community-rest-api/target/reports/rm-automation-community-rest-api.log s3://ags-travis-artifacts/community/${{ github.run_number }}/AGS-Community-Rest-API-Tests/rm-automation-community-rest-api.log
- name: "Clean Maven cache" - name: "Clean Maven cache"
run: bash ./scripts/ci/cleanup_cache.sh run: bash ./scripts/ci/cleanup_cache.sh
ags_start_api_explorer:
name: "Test Tomcat deployment of api explorer"
runs-on: ubuntu-latest
needs: [ prepare ]
if: >
(((github.ref_name == 'master' || startsWith(github.ref_name, 'release/') || github.event_name == 'pull_request' ) &&
!contains(github.event.head_commit.message, '[skip ags]')) ||
contains(github.event.head_commit.message, '[ags]')) &&
!contains(github.event.head_commit.message, '[skip tests]') &&
!contains(github.event.head_commit.message, '[force]')
steps:
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.33.0
- name: "Build"
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
run: |
bash ./scripts/ci/init.sh
bash ./scripts/ci/build.sh
- name: "Test Tomcat deployment"
run: |
mvn verify -Pags,start-api-explorer -DskipTests &
${{ env.TAS_SCRIPTS }}/wait-for-alfresco-start.sh "http://localhost:8085/api-explorer"

View File

@@ -36,24 +36,40 @@
<id>start-api-explorer</id> <id>start-api-explorer</id>
<build> <build>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.apache.tomcat.maven</groupId> <groupId>org.codehaus.cargo</groupId>
<artifactId>tomcat7-maven-plugin</artifactId> <artifactId>cargo-maven3-plugin</artifactId>
<executions> <executions>
<execution> <execution>
<id>run-war</id> <id>run-war</id>
<goals> <phase>verify</phase>
<goal>run-war</goal> <goals>
</goals> <goal>run</goal>
<phase>verify</phase> </goals>
</execution> </execution>
</executions> </executions>
<configuration> <configuration>
<useSeparateTomcatClassLoader>true</useSeparateTomcatClassLoader> <container>
<path>/api-explorer</path> <containerId>tomcat9x</containerId>
<port>8085</port> <type>embedded</type>
</configuration> <log>target/cargo.log</log>
</plugin> </container>
<configuration>
<properties>
<cargo.servlet.port>8085</cargo.servlet.port>
</properties>
</configuration>
<deployables>
<deployable>
<type>war</type>
<properties>
<context>/api-explorer</context>
</properties>
<pingURL>http://localhost:8085/api-explorer</pingURL>
</deployable>
</deployables>
</configuration>
</plugin>
</plugins> </plugins>
</build> </build>
</profile> </profile>

View File

@@ -1003,6 +1003,11 @@
<skipDeploy>true</skipDeploy> <skipDeploy>true</skipDeploy>
</configuration> </configuration>
</plugin> </plugin>
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven3-plugin</artifactId>
<version>1.10.7</version>
</plugin>
</plugins> </plugins>
</pluginManagement> </pluginManagement>
<plugins> <plugins>