-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from iExecBlockchainComputing/release/1.1.0
Release/1.1.0
- Loading branch information
Showing
19 changed files
with
324 additions
and
170 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,13 @@ | ||
# iexec-commons-containers | ||
A Java library for handling containers | ||
|
||
A Java library for handling containers. | ||
|
||
## Overview | ||
|
||
This repository is used in the [_iExec Worker_](https://github.com/iExecBlockchainComputing/iexec-worker). | ||
It provides an API to manage Docker containers through the [_docker-java_](https://github.com/docker-java/docker-java/) | ||
Java API client. | ||
|
||
## License | ||
|
||
This repository code is released under the [Apache License 2.0](LICENSE). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
version=1.0.3 | ||
iexecCommonVersion=8.2.1 | ||
version=1.1.0 | ||
|
||
nexusUser | ||
nexusPassword |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip | ||
networkTimeout=10000 | ||
validateDistributionUrl=true | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# This file is generated by the 'io.freefair.lombok' Gradle plugin | ||
config.stopBubbling = true | ||
lombok.addLombokGeneratedAnnotation = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* | ||
* Copyright 2020-2023 IEXEC BLOCKCHAIN TECH | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.iexec.commons.containers; | ||
|
||
import lombok.AccessLevel; | ||
import lombok.NoArgsConstructor; | ||
import lombok.extern.slf4j.Slf4j; | ||
import org.apache.maven.shared.utils.cli.CommandLineException; | ||
import org.apache.maven.shared.utils.cli.CommandLineUtils; | ||
|
||
@Slf4j | ||
@NoArgsConstructor(access = AccessLevel.PRIVATE) | ||
public class ArgsUtils { | ||
/* | ||
* stringArgsToArrayArgs("1st_param 2nd_param '3rd param' \"4th param\"") gives | ||
* ["1st_param", "2nd_param", "3rd param", "4th param"] | ||
* */ | ||
public static String[] stringArgsToArrayArgs(String args) { | ||
try { | ||
return CommandLineUtils.translateCommandline(args); | ||
} catch (CommandLineException e) { | ||
log.error("Failed to translate string args to array [args:{}]", args); | ||
} | ||
return new String[0]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
src/main/java/com/iexec/commons/containers/SgxDriverMode.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* | ||
* Copyright 2022-2023 IEXEC BLOCKCHAIN TECH | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.iexec.commons.containers; | ||
|
||
import javax.annotation.Nonnull; | ||
|
||
public enum SgxDriverMode { | ||
NONE(), | ||
LEGACY("/dev/isgx"), | ||
NATIVE("/dev/sgx_enclave", "/dev/sgx_provision"); | ||
|
||
private final String[] devices; | ||
|
||
SgxDriverMode(String... driverNames) { | ||
this.devices = driverNames; | ||
} | ||
|
||
public String[] getDevices() { | ||
return devices; | ||
} | ||
|
||
/** | ||
* Returns {@literal false} if given {@link SgxDriverMode} is {@literal null} | ||
* or {@link SgxDriverMode#NONE}, {@literal true} otherwise. | ||
* | ||
* @param driverMode {@link SgxDriverMode} object to check. | ||
* @return {@literal false} if given {@link SgxDriverMode} is {@literal null} | ||
* or {@link SgxDriverMode#NONE}, {@literal true} otherwise. | ||
*/ | ||
public static boolean isDriverModeNotNone(@Nonnull SgxDriverMode driverMode) { | ||
return driverMode != NONE; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* Copyright 2021-2023 IEXEC BLOCKCHAIN TECH | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.iexec.commons.containers; | ||
|
||
import lombok.AccessLevel; | ||
import lombok.NoArgsConstructor; | ||
|
||
@NoArgsConstructor(access = AccessLevel.PRIVATE) | ||
public class SgxUtils { | ||
public static final String SGX_CGROUP_PERMISSIONS = "rwm"; | ||
public static final String LEGACY_SGX_DRIVER_PATH = "/sys/module/isgx/version"; | ||
|
||
} |
Oops, something went wrong.