Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
ics-ans-role-java
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Luis Contreras
ics-ans-role-java
Commits
972ce0a9
Commit
972ce0a9
authored
5 years ago
by
Benjamin Bertrand
Browse files
Options
Downloads
Patches
Plain Diff
Set JAVA_HOME to the default java installation
Some roles depend on JAVA_HOME set in java_env.sh. JIRA INFRA-1405
parent
29578af2
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
molecule/default/tests/test_default.py
+5
-4
5 additions, 4 deletions
molecule/default/tests/test_default.py
templates/java_env.sh.j2
+4
-3
4 additions, 3 deletions
templates/java_env.sh.j2
with
9 additions
and
7 deletions
molecule/default/tests/test_default.py
+
5
−
4
View file @
972ce0a9
...
...
@@ -24,11 +24,12 @@ def test_java_version(host):
def
test_java_home
(
host
):
cmd
=
host
.
run
(
r
'
su -l -c
"
echo \$JAVA_HOME
"'
)
assert
cmd
.
stdout
.
strip
()
==
JAVA_HOME
assert
host
.
file
(
JAVA_HOME
).
exists
java_home
=
cmd
.
stdout
.
strip
()
assert
host
.
file
(
java_home
).
exists
if
host
.
ansible
.
get_variables
()[
"
inventory_hostname
"
]
==
"
ics-ans-role-java-and-oracle-jdk8
"
:
cmd
=
host
.
run
(
r
'
su -l -c
"
echo \$JAVA8_HOME
"'
)
assert
cmd
.
stdout
.
strip
()
==
JAVA8_HOME
assert
java_home
==
JAVA8_HOME
else
:
assert
java_home
==
JAVA_HOME
def
test_javafx_home
(
host
):
...
...
This diff is collapsed.
Click to expand it.
templates/java_env.sh.j2
+
4
−
3
View file @
972ce0a9
export JAVA_HOME="{{ java_openjdk_home }}"
export PATH_TO_FX="{{ java_openjfx_home }}/lib"
{% if java_install_oracle_jdk8 %}
export JAVA8_HOME="{{ java_oracle_jdk8_home }}"
export JAVA_HOME="{{ java_oracle_jdk8_home }}"
{% else %}
export JAVA_HOME="{{ java_openjdk_home }}"
{% endif %}
export PATH_TO_FX="{{ java_openjfx_home }}/lib"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment