Skip to content

Commit

Permalink
Merge branch 'release/v3.0.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
milux committed Apr 2, 2020
2 parents a2d88f1 + 82d149d commit ff87ba9
Show file tree
Hide file tree
Showing 12 changed files with 1,384 additions and 1,056 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ licenseReport {

allprojects {
group = 'de.fhg.aisec.ids'
version = '3.0.0'
version = '3.0.1'

ext.libraryVersions = [
// Versions for modules that will be released as libraries
Expand Down
2 changes: 0 additions & 2 deletions buildx/docker-buildx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,8 @@ elif [[ ! -d "../karaf-assembly/build/assembly" ]]; then
printf "################################################################################\e[0m\n\n"
fi

echo "Fetching project version from build-container via \"./gradlew properties\"..."
# shellcheck disable=SC2155
PROJECT_VERSION=$(cat ../version.txt)

# Export var for buildx bake yaml resolution
export PROJECT_VERSION
printf "######################################################################\n"
Expand Down
2 changes: 1 addition & 1 deletion docker-build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ COPY run.sh .
RUN chmod +x run.sh

ENTRYPOINT ["/run.sh"]
CMD ["build", "check", "--no-daemon", "--parallel"]
CMD ["build", "check", "--parallel"]
2 changes: 1 addition & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
The _examples_ directory contains the examples described in https://industrial-data-space.github.io/trusted-connector-documentation/

For automated local creation of an example ZIP during build, pass the `-PdockerTag="x.x.x|develop|latest"` option to gradlew.
For automated local creation of an example ZIP during build, pass the `-PexampleTag="x.x.x|develop|latest"` option to gradlew.
35 changes: 5 additions & 30 deletions examples/build.gradle
Original file line number Diff line number Diff line change
@@ -1,28 +1,3 @@
import java.util.regex.Pattern

def getCommitRefName() {
String refName
if (System.getenv('CI_COMMIT_REF_NAME') != null) {
// try to fetch commit ref name (GitLab CI)
refName = System.getenv('CI_COMMIT_REF_NAME')
} else if (findProperty('dockerTag')) {
// Try fallback to dockerTag if ref name not available (local build)
refName = findProperty('dockerTag')
} else {
return null
}

if (refName == 'develop') {
return 'develop'
} else if (refName == 'master' || refName == 'latest') {
return 'latest'
} else if (Pattern.compile('^[0-9]+\\.[0-9]+\\.[0-9]+$').matcher(refName).matches()) {
return refName
} else {
return null
}
}

// Copy example and example-localhost to build directory
task copyExample(type: Copy) {
from (project.projectDir) {
Expand All @@ -38,21 +13,21 @@ task processTemplates(type: Copy) {
from 'templates'
include '**/*.yaml'
into project.buildDir
expand(dockerTag: getCommitRefName())
inputs.property 'dockerTag', getCommitRefName()
expand(exampleTag: findProperty('exampleTag'))
inputs.property 'exampleTag', findProperty('exampleTag')
inputs.dir('templates').withPathSensitivity(PathSensitivity.RELATIVE)
outputs.cacheIf { true }
}
processTemplates.dependsOn copyExample
processTemplates.onlyIf { getCommitRefName() != null }
processTemplates.onlyIf { findProperty('exampleTag') != null }

// Create ZIP archive with example and example-localhost, see task copyExample
task zipExample(type: Zip) {
from fileTree(dir: project.buildDir)
archiveFileName = "${projectDir}/trusted-connector-examples_${getCommitRefName()}.zip"
archiveFileName = "${projectDir}/trusted-connector-examples_${findProperty('exampleTag')}.zip"
}
zipExample.dependsOn processTemplates
zipExample.onlyIf { getCommitRefName() != null }
zipExample.onlyIf { findProperty('exampleTag') != null }
processResources.dependsOn zipExample

// Delete the redundant build directory after install or build, if executed
Expand Down
2 changes: 1 addition & 1 deletion examples/templates/example-getting-started/.env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This defines the tag used for docker-compose example YAML files in the current directory
EXAMPLE_TAG=${dockerTag}
EXAMPLE_TAG=${exampleTag}
2 changes: 1 addition & 1 deletion examples/templates/example-idscp/.env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This defines the tag used for docker-compose example YAML files in the current directory
EXAMPLE_TAG=${dockerTag}
EXAMPLE_TAG=${exampleTag}
Binary file added examples/trusted-connector-examples_3.0.1.zip
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ import java.util.stream.Collectors
import java.util.stream.Stream
import java.util.stream.StreamSupport
import javax.json.Json
import javax.json.JsonArray
import javax.json.JsonString
import javax.json.JsonValue
import kotlin.math.abs

Expand Down Expand Up @@ -178,7 +180,15 @@ class DockerCM : ContainerManager {
app.created = info.getString("Created")
app.status = ContainerStatus.valueOf(state.getString("Status").toUpperCase())
app.ports = ports.entries
.map { e: Map.Entry<String, JsonValue> -> e.key + ":" + e.value.toString() }
.map { e: Map.Entry<String, JsonValue> ->
if (e.value is JsonArray) {
e.key + " -> " + e.value.asJsonArray()[0].asJsonObject().let {
(it["HostIp"] as JsonString).string + ":" + (it["HostPort"] as JsonString).string
}
} else {
e.key
}
}
.toList()
app.names = name
if (running) {
Expand All @@ -191,7 +201,7 @@ class DockerCM : ContainerManager {
app.owner = labels.getOrDefault("ids.owner", JsonValue.NULL).toString()
app.description = labels.getOrDefault("ids.description", JsonValue.NULL).toString()
app.labels = labels.entries.stream()
.collect(Collectors.toMap({ it.key }, { it.value }))
.collect(Collectors.toMap({ it.key }, { it.value as Any }))
return@map app
} catch (e: IOException) {
LOG.error("Container iteration error occurred, skipping container with id " + c.containerId(), e)
Expand Down
24 changes: 12 additions & 12 deletions ids-webconsole/src/main/resources/www/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
},
"private": true,
"dependencies": {
"@angular/animations": "~9.0.6",
"@angular/common": "~9.0.6",
"@angular/core": "~9.0.6",
"@angular/forms": "~9.0.6",
"@angular/platform-browser": "~9.0.6",
"@angular/platform-browser-dynamic": "~9.0.6",
"@angular/platform-server": "~9.0.6",
"@angular/router": "~9.0.6",
"@angular/animations": "~9.1.0",
"@angular/common": "~9.1.0",
"@angular/core": "~9.1.0",
"@angular/forms": "~9.1.0",
"@angular/platform-browser": "~9.1.0",
"@angular/platform-browser-dynamic": "~9.1.0",
"@angular/platform-server": "~9.1.0",
"@angular/router": "~9.1.0",
"bootstrap": "^4.2.1",
"core-js": "^3.6.4",
"deep-equal": "^2.0.1",
Expand All @@ -34,10 +34,10 @@
"zone.js": "~0.10.2"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.900.6",
"@angular/cli": "~9.0.6",
"@angular/compiler": "~9.0.6",
"@angular/compiler-cli": "~9.0.6",
"@angular-devkit/build-angular": "~0.901.0",
"@angular/cli": "~9.1.0",
"@angular/compiler": "~9.1.0",
"@angular/compiler-cli": "~9.1.0",
"@saritasa/tslint-config-angular": "^2.0.0",
"@types/node": "^12.11.1",
"@types/vis": "^4.21.9",
Expand Down
Loading

0 comments on commit ff87ba9

Please sign in to comment.