Skip to content

Commit 70d9235

Browse files
authored
Merge pull request #605 from jmtd/ubi10-sync
sync ubi10 branch with ubi9 changes
2 parents fe299e4 + d590976 commit 70d9235

File tree

28 files changed

+174
-110
lines changed

28 files changed

+174
-110
lines changed

.github/workflows/gendocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
fetch-depth: 0 # all branches and tags
3030

3131
- name: Install CEKit
32-
uses: cekit/[email protected].5
32+
uses: cekit/[email protected].7
3333

3434
- name: Setup required packages for docs
3535
run: |

.github/workflows/jiralabels.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Ensure GH PRs have a corresponding JIRA issue
2+
3+
on:
4+
pull_request:
5+
types: [opened, edited]
6+
7+
permissions:
8+
contents: read
9+
pull-requests: write
10+
11+
env:
12+
GH_REPO: ${{ github.repository }}
13+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14+
NUM: ${{ github.event.pull_request.number }}
15+
16+
jobs:
17+
check-jira-uri:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Check for required URI pattern
21+
id: check_uri
22+
env:
23+
PR_BODY: ${{ github.event.pull_request.body }}
24+
URIPAT: "https://issues.redhat.com/browse/OPENJDK-"
25+
run: |
26+
if echo "$PR_BODY" | grep -q "$URIPAT"; then
27+
echo "missing=false" >> $GITHUB_OUTPUT
28+
else
29+
echo "missing=true" >> $GITHUB_OUTPUT
30+
fi
31+
32+
- name: Apply label if URI missing
33+
if: steps.check_uri.outputs.missing == 'true'
34+
run: |
35+
gh pr edit "$NUM" --add-label "needs-jira-issue"
36+
exit 1 # fail workflow; must be resolved to green-light PR
37+
38+
- name: Remove label if URI present
39+
if: steps.check_uri.outputs.missing == 'false'
40+
run: gh pr edit "$NUM" --remove-label "needs-jira-issue"
41+
42+
label-branch:
43+
runs-on: ubuntu-latest
44+
steps:
45+
- name: Add branch label if missing
46+
run: gh pr edit "$NUM" --add-label "$GITHUB_BASE_REF"

modules/jdk/21/configure.sh

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,7 @@ set -e
55
SCRIPT_DIR=$(dirname $0)
66
ARTIFACTS_DIR=${SCRIPT_DIR}/artifacts
77

8-
chown -R $USER:root $SCRIPT_DIR
9-
chmod -R ug+rwX $SCRIPT_DIR
10-
chmod ug+x ${ARTIFACTS_DIR}/opt/jboss/container/openjdk/jdk/*
11-
12-
pushd ${ARTIFACTS_DIR}
13-
cp -pr * /
14-
popd
8+
install -m 0644 -D {${ARTIFACTS_DIR},}/opt/jboss/container/openjdk/jdk/jvm-options
159

1610
# Update securerandom.source for quicker starts (must be done after removing jdk 8, or it will hit the wrong files)
1711
JAVA_SECURITY_FILE=/usr/lib/jvm/java/conf/security/java.security

modules/jre/21/configure.sh

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,7 @@
1-
#!/bin/sh
2-
# Configure module
3-
set -e
1+
#!/bin/bash
2+
set -euo pipefail
43

54
SCRIPT_DIR=$(dirname $0)
6-
echo $SCRIPT_DIR
75
ARTIFACTS_DIR=${SCRIPT_DIR}/artifacts
8-
echo $ARTIFACTS_DIR
96

10-
chown -R $USER:root $SCRIPT_DIR
11-
chmod -R ug+rwX $SCRIPT_DIR
12-
chmod ug+x ${ARTIFACTS_DIR}/opt/jboss/container/openjdk/jre/*
13-
14-
pushd ${ARTIFACTS_DIR}
15-
cp -pr * /
16-
popd
7+
install -m 0644 -D {${ARTIFACTS_DIR},}/opt/jboss/container/openjdk/jre/jvm-options

modules/jvm/artifacts/opt/jboss/container/java/jvm/debug-options

100644100755
File mode changed.

modules/jvm/artifacts/opt/jboss/container/java/jvm/java-default-options

100644100755
File mode changed.

modules/jvm/configure.sh

100755100644
Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,8 @@
1-
#!/bin/sh
2-
# Configure module
3-
set -e
1+
#!/bin/bash
2+
set -euo pipefail
43

54
SCRIPT_DIR=$(dirname $0)
65
ARTIFACTS_DIR=${SCRIPT_DIR}/artifacts
76

8-
chown -R $USER:root $SCRIPT_DIR
9-
chmod -R ug+rwX $SCRIPT_DIR
10-
chmod ug+x ${ARTIFACTS_DIR}/opt/jboss/container/java/jvm/*
11-
12-
pushd ${ARTIFACTS_DIR}
13-
cp -pr * /
14-
popd
7+
install -D -t /opt/jboss/container/java/jvm \
8+
${ARTIFACTS_DIR}/opt/jboss/container/java/jvm/*

modules/jvm/module.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ description: ^
88
execute:
99
- script: configure.sh
1010

11+
execute:
12+
- script: configure.sh
13+
1114
modules:
1215
install:
1316
- name: jboss.container.user
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Feature: test file properties for JVM module
2+
3+
@ubi10
4+
Scenario: Ensure image scripts are executable (OPENJDK-3935)
5+
When container is started with args
6+
| arg | value |
7+
| command | find /opt/jboss/container/java/ -type f -printf "%h/%f %M\n" |
8+
Then available container log should contain /opt/jboss/container/java/jvm/debug-options -rwxr-xr-x
9+
And available container log should contain /opt/jboss/container/java/jvm/java-default-options -rwxr-xr-x

modules/maven/default/configure.sh

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,12 @@
1-
#!/bin/sh
2-
# Configure module
3-
set -e
1+
#!/bin/bash
2+
set -euo pipefail
43

54
SCRIPT_DIR=$(dirname $0)
65
ARTIFACTS_DIR=${SCRIPT_DIR}/artifacts
76

8-
# configure artifact permissions
9-
chown -R $USER:root $ARTIFACTS_DIR
10-
chmod -R ug+rwX $ARTIFACTS_DIR
11-
chmod ug+x ${ARTIFACTS_DIR}/opt/jboss/container/maven/default/maven.sh
12-
13-
# install artifacts
14-
pushd ${ARTIFACTS_DIR}
15-
cp -pr * /
16-
popd
7+
install -m 0644 -D {${ARTIFACTS_DIR},}/opt/jboss/container/maven/default/maven.sh
8+
# 0664: OPENJDK-4024
9+
install -m 0664 -D {${ARTIFACTS_DIR},}/opt/jboss/container/maven/default/jboss-settings.xml
1710

1811
# install default settings.xml file in user home
1912
mkdir -p $HOME/.m2

0 commit comments

Comments
 (0)