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

Use Java17 to build and run Web3Signer #870

Merged
merged 5 commits into from
Aug 4, 2023
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
23 changes: 17 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ orbs:
executors:
executor_med: # 2cpu, 4G ram
docker:
- image: cimg/openjdk:11.0
- image: cimg/openjdk:17.0
auth: &docker-auth
# Don't panic, throw away account to avoid Docker rate limits when downloading.
# Second reason we're doing this is so that forked PRs from external contributors works ie env vars aren't visible to forked PRs from within contexts
Expand All @@ -21,7 +21,7 @@ executors:

executor_large: # 4cpu, 8G ram
docker:
- image: cimg/openjdk:11.0
- image: cimg/openjdk:17.0
auth:
<<: *docker-auth
resource_class: large
Expand All @@ -33,7 +33,7 @@ executors:
executor_large_with_fc_devnet: # 4cpu, 8G ram
docker:
# Primary container
- image: cimg/openjdk:11.0
- image: cimg/openjdk:17.0
auth:
<<: *docker-auth
# Secondary container running lotus as devnet on port 7777
Expand All @@ -55,15 +55,15 @@ executors:

machine_executor_arm64:
machine:
image: ubuntu-2004:202201-02 # Ubuntu 20.04, Docker v20.10.12, Docker Compose v1.29.2
image: ubuntu-2204:current # https://circleci.com/developer/machine/image/ubuntu-2204
resource_class: arm.medium
environment:
architecture: "arm64"
platform: "linux/arm64"

machine_executor_amd64:
machine:
image: ubuntu-2004:202201-02 # Ubuntu 20.04, Docker v20.10.12, Docker Compose v1.29.2
image: ubuntu-2204:current # https://circleci.com/developer/machine/image/ubuntu-2204
docker_layer_caching: true
working_directory: ~/project
environment:
Expand All @@ -89,7 +89,15 @@ commands:
- deps-{{ checksum "build.gradle" }}-{{ .Branch }}-{{ .Revision }}
- deps-{{ checksum "build.gradle" }}
- deps-

machine_java_17:
description: "Install Java 17 on machine executors"
steps:
- run:
name: Java 17
command: |
sudo apt update
sudo apt install -q --assume-yes openjdk-17-jre-headless openjdk-17-jdk-headless
sudo update-java-alternatives -a
capture_test_results:
description: "Capture test results"
steps:
Expand Down Expand Up @@ -261,6 +269,7 @@ jobs:
- prepare
- attach_workspace:
at: ~/project
- machine_java_17
- run:
name: build and test Docker image
command: |
Expand All @@ -273,6 +282,7 @@ jobs:
- prepare
- attach_workspace:
at: ~/project
- machine_java_17
- docker_trust_sign
- docker_publish_images
- notify
Expand All @@ -283,6 +293,7 @@ jobs:
- prepare
- attach_workspace:
at: ~/project
- machine_java_17
- docker_trust_sign
- docker_publish_images
- notify
Expand Down
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Next release

### Breaking Changes
- Use Java 17 for build and runtime. Remove Java 11 variant of docker image. zip/tar.gz distributions will require Java 17 or above to run Web3Signer.
- Eth2 Azure command line option --azure-secrets-tags is now deprecated and is replaced with --azure-tags. The --azure-secrets-tags option will be removed in a future release.

### Features Added
Expand All @@ -14,7 +15,8 @@
- Add eth_sendTransaction RPC method under the eth1 subcommand [#835](https://github.com/Consensys/web3signer/pull/835)
- Add EIP-1559 support for eth1 public transactions for eth_sendTransaction and eth_signTransaction [#836](https://github.com/Consensys/web3signer/pull/836)
- Add Azure bulk loading for secp256k1 keys in eth1 mode [#850](https://github.com/Consensys/web3signer/pull/850)
- Added Gnosis configuration for the 🦉 CAPELLA 🦉 network fork due at epoch 648704, UTC Tue 01/08/2023, 11:34:20
- Added Gnosis configuration for the 🦉 CAPELLA 🦉 network fork due at epoch 648704, UTC Tue 01/08/2023, 11:34:20 [#865](https://github.com/Consensys/web3signer/pull/865)
- Java 17 for build and runtime. [#870](https://github.com/Consensys/web3signer/pull/870)

### Bugs fixed
- Support long name aliases in environment variables and YAML configuration [#825](https://github.com/Consensys/web3signer/pull/825)
Expand Down
3 changes: 1 addition & 2 deletions acceptance-tests/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import groovy.text.SimpleTemplateEngine

/*
* Copyright 2019 ConsenSys AG.
*
Expand All @@ -16,7 +15,7 @@ import groovy.text.SimpleTemplateEngine
plugins {
id "de.undercouch.download" version "4.1.0"
id "com.google.osdetector" version "1.7.3"
id "io.gatling.gradle" version "3.7.0-M1"
id "io.gatling.gradle" version "3.9.3.1"
}

dependencies {
Expand Down
10 changes: 5 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ plugins {
id 'org.ajoberstar.grgit' version '4.1.1'
}

if (!JavaVersion.current().java11Compatible) {
throw new GradleException("Java 11 or later is required to build Web3Signer.\n" +
if (!JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_17)) {
throw new GradleException("Java 17 or later is required to build Web3Signer.\n" +
" Detected version ${JavaVersion.current()}")
}

Expand Down Expand Up @@ -109,8 +109,8 @@ allprojects {
from javadoc.destinationDir
}

sourceCompatibility = 11
targetCompatibility = 11
sourceCompatibility = 17
targetCompatibility = 17

repositories {
// mavenLocal() //for local testing only, uncomment while testing locally build signers.
Expand Down Expand Up @@ -462,7 +462,7 @@ tasks.register("dockerDistUntar") {
}

def dockerImage = "consensys/web3signer"
def dockerJdkVariants = ["jdk17", "jdk11",]
def dockerJdkVariants = ["jdk17",]
def dockerBuildDir = "build/docker-web3signer/"

task distDocker {
Expand Down
50 changes: 0 additions & 50 deletions docker/jdk11/Dockerfile

This file was deleted.

1 change: 1 addition & 0 deletions gradle/license-report-config/license-normalizer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
],
"transformationRules" : [
{ "bundleName" : "MIT", "licenseNamePattern" : "\"MIT\\sLicense\"" },
{ "bundleName" : "MIT", "licenseNamePattern" : "(.*)SPDX-License-Identifier: MIT(.*)" },
{ "bundleName" : "BSD", "licenseNamePattern" : "BSD licence" },
{ "bundleName" : "CDDL-1.1", "licenseNamePattern" : "(.*)Dual license consisting of the CDDL v1.1 and GPL v2(.*)" },
{ "bundleName" : "Apache-2.0", "licenseNamePattern" : "(.*)Apache-2.0(.*)" }
Expand Down
2 changes: 1 addition & 1 deletion gradle/versions.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ dependencyManagement {
entry 'junit-jupiter-params'
}

dependency 'org.mock-server:mockserver-netty:5.11.2'
dependency 'org.mock-server:mockserver-netty:5.15.0'

dependencySet(group: 'org.mockito', version: '4.2.0') {
entry 'mockito-core'
Expand Down