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

Downgrading docker image to eclipse java temurin 17 #2940

Merged
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
6 changes: 0 additions & 6 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,3 @@ updates:
directory: /
schedule:
interval: daily

# Maintain dependencies for Docker
- package-ecosystem: docker
directory: /
schedule:
interval: daily
25 changes: 0 additions & 25 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -262,31 +262,6 @@ jobs:
path: |
rskj-core/build/reports/

unit-tests-java21:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 #v4.2.1

- name: Setup Java & Gradle
uses: actions/setup-java@b36c23c0d998641eff861008f374ee103c25ac73 #v4.4.0
with:
java-version: '21'
distribution: 'temurin'
cache: 'gradle'

- uses: actions/cache/restore@3624ceb22c1c5a301c8db4169662070a689d9ea8 #v4.1.1
name: Restore Gradle Wrapper
with:
path: |
gradle/wrapper/gradle-wrapper.jar
key: gradle-wrapper-v1
fail-on-cache-miss: true

- name: Run tests
run: |
./gradlew --no-daemon --stacktrace test

integration-tests:
needs: build
runs-on: ubuntu-latest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Docker image
name: Docker image release

on:
on:
push:
branches:
- master
Expand Down Expand Up @@ -36,10 +36,10 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
- name: Build and push to registry
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 #v6.9.0
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
labels: ${{ steps.meta.outputs.labels }}
36 changes: 36 additions & 0 deletions .github/workflows/docker-verification.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Docker image validation

on:
pull_request:
paths:
- 'Dockerfile'
- '.github/workflows/docker-verification.yml'
types: [opened, synchronize, reopened]

# Declare default permissions as read only.
permissions: read-all

jobs:
docker:
runs-on: ubuntu-20.04

steps:
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 #v4.2.1

- name: Build Docker image for validation
run: |
docker build -t rsksmart/rskj:latest .

- name: Run Docker container
run: |
docker run -d --name rskj-container rsksmart/rskj:latest --regtest

- name: Check Docker container built
run: |
if [ $(docker inspect -f '{{.State.Running}}' rskj-container) = "true" ]; then
echo "Container is running properly"
else
echo "Container failed to start"
exit 1
fi
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM eclipse-temurin:21-jdk@sha256:5ad4efff3364b06c61578b267138359bcba92acc20dfd533f35b75c709a6f10b AS build
FROM eclipse-temurin:17-jdk@sha256:0613a19436dc8f745914b25235d43f3b0eddb8d432d19edce30ffaf2d2f95403 AS build

RUN apt-get update -y && \
apt-get install -y git curl gnupg
Expand All @@ -19,7 +19,7 @@ RUN gpg --keyserver https://secchannel.rsk.co/SUPPORT.asc --recv-keys 1DC9157991
modifier=$(sed -n 's/^modifier=//p' "$file" | tr -d "\"'") && \
cp "rskj-core/build/libs/rskj-core-$version_number-$modifier-all.jar" rsk.jar

FROM eclipse-temurin:21-jre@sha256:4c1ec9743c333c9d47f55d883c4e317d117e198899e7edf1d9cf4c89253b1b9d
FROM eclipse-temurin:17-jre@sha256:38e0afc86a10bf4cadbf1586fb617b3a9a4d09c9a0be882e29ada4ed0895fc84
LABEL org.opencontainers.image.authors="ops@rootstocklabs.com"

RUN useradd -ms /sbin/nologin -d /var/lib/rsk rsk
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class PreflightChecksUtils {
private static final Logger logger = LoggerFactory.getLogger(PreflightChecksUtils.class);

public static final Set<Integer> SUPPORTED_JAVA_VERSIONS = Collections.unmodifiableSet(
new TreeSet<>(Arrays.asList(17, 21))
new TreeSet<>(Arrays.asList(17))
);

private final RskContext rskContext;
Expand Down
2 changes: 1 addition & 1 deletion rskj-core/src/main/resources/version.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
versionNumber='6.5.0'
versionNumber='6.5.1'
modifier="ARROWHEAD"
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ void runChecks_invalidJavaVersion_exceptionIsThrown() {

@Test
void runChecks_runAllChecks_OK() throws Exception {
for (String ver : Arrays.asList("17.0.3", "21.0.1")) {
for (String ver : Arrays.asList("17.0.3")) {
try (RskContext rskContext = new RskTestContext(tempDir)) {
PreflightChecksUtils preflightChecksUtilsSpy = spy(new PreflightChecksUtils(rskContext));

Expand Down
Loading