Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pchinthapenta nr 233117 #1060

Merged
merged 2 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions test/deploy/linux/java/javaApp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependency>
<!--Add-the-newrelic-java-dependency-plugin-->
</dependencies>
<build>
<finalName>javaApp</finalName>
<plugins>
<!-- Add the exec-maven-plugin below -->
<!--Add-the-exec-maven-plugin-below-->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
Expand Down
12 changes: 7 additions & 5 deletions test/deploy/linux/java/redhat/roles/configure/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@
shell: chmod -R 777 /opt/tomcat/latest/bin
become: true

- name: Change the permissions and ownership of javaApp & tomcat directories
shell: chown -R ec2-user:ec2-user /home/ec2-user/javaApp/ &&
chmod -R 755 /home/ec2-user/javaApp &&
chown -R ec2-user:ec2-user /opt/tomcat/ &&
chmod -R 755 /opt/tomcat/
become: true

- name: Build Java App with Maven
ansible.builtin.command:
cmd: mvn clean package -f /home/ec2-user/javaApp/pom.xml
Expand All @@ -25,11 +32,6 @@
PATH: "{{ ansible_env.PATH }}:/opt/jdk-14.0.1/bin:/opt/apache-maven/bin"
JRE_HOME: "/opt/jdk-14.0.1"
become: true

- name: Change the permissions and ownership of javaApp directory
shell: chown -R ec2-user:ec2-user /home/ec2-user/javaApp/ &&
chmod -R 755 /home/ec2-user/javaApp
become: true

- name: Move the package
shell: mv /home/ec2-user/javaApp/target/javaApp.war /opt/tomcat/latest/webapps
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"resources": [
{
"id": "dummyApp",
"id": "java-mav-tom-testapp",
"provider": "aws",
"type": "ec2",
"size": "t3.small",
Expand All @@ -20,14 +20,14 @@
"source_repository": "https://github.com/newrelic/open-install-library.git",
"deploy_script_path": "test/deploy/linux/tomcat/systemd/shScript/catalina/install/linux/roles",
"port": 6001,
"destinations": ["dummyApp"]
"destinations": ["java-mav-tom-testapp"]
},
{
"id": "javaApp",
"source_repository": "https://github.com/newrelic/open-install-library.git",
"deploy_script_path": "test/deploy/linux/java/redhat/roles",
"port": 80,
"destinations": ["dummyApp"]
"destinations": ["java-mav-tom-testapp"]
}
]
}
Loading