Skip to content

Commit

Permalink
feat: use adoptium openjdk (#6)
Browse files Browse the repository at this point in the history
* feat: use adoptium for openjdk 8

* feat: set context to pub

* feat: increase deploy timout

* feat: use adoptium

* feat: decrease deployment timeout

* feat: use adoptium api

* feat: use proxy for jdk

* feat: use tomcat 9

* feat: display java and tomcat version

* feat: use default jdk (#5)
  • Loading branch information
andrwils authored Aug 23, 2024
1 parent e3f3a3b commit a5a9c7b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,6 @@ jobs:
ARTIFACT_SHA256: ${{ needs.deploy-build.outputs.artifact_sha256 || needs.deploy-tag.outputs.artifact_sha256 }}
DOWNLOAD_URL: ${{ needs.deploy-build.outputs.download_url || needs.deploy-tag.outputs.download_url }}
# The automatically generated GitHub token will expire when the workflow ends. We need to wait so the job has time to clone the repo.
- name: Sleep for 30 seconds
run: sleep 30s
- name: Sleep
run: sleep 90s
shell: bash
11 changes: 3 additions & 8 deletions playbooks/playbook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,15 @@
# individual JDK installation
- name: jdk
vars:
jdk_version:
type: 'openjdk'
major_version: 8
url: '{{ artifactory_url }}/ext-binaries-local/openjdk/java-se-8u40-ri.tar.gz'
filename: 'java-se-8u40-ri.tar.gz'
checksum: 'sha1:606984531e3eeddba6be5ac626a229ef283c5de0'
cacerts_path: 'jre/lib/security/cacerts'
use_proxy: false
proxy_env: "{{ env_vars }}"

# create a self signed certificate to allow for HTTPS
- name: self_signed_cert

# install & configure the Tomcat container
- name: tomcat
vars:
tomcat_major_version: '9'

# deploy the webapp
- name: webapp
Expand Down
2 changes: 1 addition & 1 deletion playbooks/vars/standard/all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pd_prop_build_number: "{{ lookup('ansible.builtin.env', 'PODMAN_BUILD_NUMBER') }
pd_prop_service_install_directory: "{{ pd_prop_project_version }}-{{ pd_prop_build_number }}"

# The following properties are custom to each particular service
context: ext#oneteam-example
context: pub#oneteam-example

# By default, the Tomcat port is set dynamically by using the port_manager role
# If you need to set a static port, replace the dynamic port assignment value with your static value
Expand Down
4 changes: 4 additions & 0 deletions src/main/webapp/index.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,15 @@
e.printStackTrace();
}
String timestamp = (String) application.getAttribute("deploymentTimestamp");
String javaRuntimeVersion = System.getProperty("java.runtime.version");
String tomcatVersion = application.getServerInfo();
%>
<html>
<body>
<h2>Hello World!</h2>
<p>Version: <%= version %></p>
<p>Deployed at: <%= timestamp %></p>
<p>Java Runtime: <%= javaRuntimeVersion %></p>
<p>Tomcat Version: <%= tomcatVersion %></p>
</body>
</html>

0 comments on commit a5a9c7b

Please sign in to comment.