Skip to content

Commit

Permalink
Merge pull request #71 from gchq/develop
Browse files Browse the repository at this point in the history
Release 0.5.0
  • Loading branch information
ac74475 authored Jul 8, 2021
2 parents 65506b3 + a071d4e commit 416123c
Show file tree
Hide file tree
Showing 177 changed files with 14,896 additions and 4,200 deletions.
10 changes: 4 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2018 Crown Copyright
# Copyright 2018-2021 Crown Copyright

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -25,33 +25,31 @@ bin/
_book
node_modules/
.extract/
.project/
.settings/
.terraform/
*.flattened-pom.xml
terraform.tfvars
terraform.tfstate
terraform.tfstate.backup
dependency-reduced-pom.xml
*.iws
*.ipr

##VSCODE default files that dont need to be tracked
eclipse-formatter.xml
.vscode/



# Created by https://www.toptal.com/developers/gitignore/api/eclipse
# Edit at https://www.toptal.com/developers/gitignore?templates=eclipse

### Eclipse ###
.metadata
bin/
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.settings/
.loadpath
.recommenders

Expand Down
153 changes: 4 additions & 149 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2019 Crown Copyright
* Copyright 2018-2021 Crown Copyright
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -13,153 +13,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
//node-affinity
//nodes 1..3 are reserved for Jenkins slave pods.
//node 0 is used for the Jenkins master
@Library('jenkinsfile-lib')_

timestamps {

podTemplate(yaml: '''
apiVersion: v1
kind: Pod
metadata:
name: dind
spec:
affinity:
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 1
preference:
matchExpressions:
- key: palisade-node-name
operator: In
values:
- node1
- node2
- node3
containers:
- name: jnlp
image: jenkins/jnlp-slave
imagePullPolicy: Always
args:
- $(JENKINS_SECRET)
- $(JENKINS_NAME)
resources:
requests:
ephemeral-storage: "4Gi"
limits:
ephemeral-storage: "8Gi"
- name: docker-cmds
image: 779921734503.dkr.ecr.eu-west-1.amazonaws.com/jnlp-did:200608
imagePullPolicy: IfNotPresent
command:
- sleep
args:
- 99d
env:
- name: DOCKER_HOST
value: tcp://localhost:2375
resources:
requests:
ephemeral-storage: "4Gi"
limits:
ephemeral-storage: "8Gi"
''') {
node(POD_LABEL) {
def GIT_BRANCH_NAME

stage('Bootstrap') {
if (env.CHANGE_BRANCH) {
GIT_BRANCH_NAME=env.CHANGE_BRANCH
} else {
GIT_BRANCH_NAME=env.BRANCH_NAME
}
echo sh(script: 'env | sort', returnStdout: true)
}

stage('Prerequisites') {
dir('Palisade-common') {
git branch: 'develop', url: 'https://github.com/gchq/Palisade-common.git'
if (sh(script: "git checkout ${GIT_BRANCH_NAME}", returnStatus: true) == 0) {
container('docker-cmds') {
configFileProvider([configFile(fileId: "${env.CONFIG_FILE}", variable: 'MAVEN_SETTINGS')]) {
sh 'mvn -s $MAVEN_SETTINGS install -P quick'
}
}
}
}
dir('Palisade-readers') {
git branch: 'develop', url: 'https://github.com/gchq/Palisade-readers.git'
if (sh(script: "git checkout ${GIT_BRANCH_NAME}", returnStatus: true) == 0) {
container('docker-cmds') {
configFileProvider([configFile(fileId: "${env.CONFIG_FILE}", variable: 'MAVEN_SETTINGS')]) {
sh 'mvn -s $MAVEN_SETTINGS install -P quick'
}
}
}
}
}

stage('Install, Unit Tests, Checkstyle') {
dir('Palisade-clients') {
git branch: GIT_BRANCH_NAME, url: 'https://github.com/gchq/Palisade-clients.git'
container('docker-cmds') {
configFileProvider([configFile(fileId: "${env.CONFIG_FILE}", variable: 'MAVEN_SETTINGS')]) {
sh 'mvn -s $MAVEN_SETTINGS install'
}
}
}
}

stage('SonarQube analysis') {
dir('Palisade-clients') {
container('docker-cmds') {
withCredentials([string(credentialsId: "${env.SQ_WEB_HOOK}", variable: 'SONARQUBE_WEBHOOK'),
string(credentialsId: "${env.SQ_KEY_STORE_PASS}", variable: 'KEYSTORE_PASS'),
file(credentialsId: "${env.SQ_KEY_STORE}", variable: 'KEYSTORE')]) {
configFileProvider([configFile(fileId: "${env.CONFIG_FILE}", variable: 'MAVEN_SETTINGS')]) {
withSonarQubeEnv(installationName: 'sonar') {
if (env.CHANGE_BRANCH) {
sh 'mvn -s $MAVEN_SETTINGS org.sonarsource.scanner.maven:sonar-maven-plugin:3.7.0.1746:sonar -Dsonar.projectKey="Palisade-Clients-${CHANGE_BRANCH}" -Dsonar.projectName="Palisade-Clients-${CHANGE_BRANCH}" -Dsonar.webhooks.project=$SONARQUBE_WEBHOOK -Djavax.net.ssl.trustStore=$KEYSTORE -Djavax.net.ssl.trustStorePassword=$KEYSTORE_PASS'
} else {
sh 'mvn -s $MAVEN_SETTINGS org.sonarsource.scanner.maven:sonar-maven-plugin:3.7.0.1746:sonar -Dsonar.projectKey="Palisade-Clients-${BRANCH_NAME}" -Dsonar.projectName="Palisade-Clients-${BRANCH_NAME}" -Dsonar.webhooks.project=$SONARQUBE_WEBHOOK -Djavax.net.ssl.trustStore=$KEYSTORE -Djavax.net.ssl.trustStorePassword=$KEYSTORE_PASS'
}
}
}
}
}
}
}

stage("SonarQube Quality Gate") {
// Wait for SonarQube to prepare the report
sleep(time: 10, unit: 'SECONDS')
// Just in case something goes wrong, pipeline will be killed after a timeout
timeout(time: 5, unit: 'MINUTES') {
// Reuse taskId previously collected by withSonarQubeEnv
def qg = waitForQualityGate()
if (qg.status != 'OK') {
error "Pipeline aborted due to SonarQube quality gate failure: ${qg.status}"
}
}
}

stage('Maven deploy') {
dir('Palisade-clients') {
container('docker-cmds') {
configFileProvider([configFile(fileId: "${env.CONFIG_FILE}", variable: 'MAVEN_SETTINGS')]) {
if (("${env.BRANCH_NAME}" == "develop") ||
("${env.BRANCH_NAME}" == "master")) {
sh 'mvn -s $MAVEN_SETTINGS deploy -P quick'
} else {
sh "echo - no deploy"
}
}
}
}
}
}
}

}
clients()
}
49 changes: 39 additions & 10 deletions NOTICES.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,46 @@
List of third-party dependencies grouped by their license type

### [Apache Software License 2.0](./licenses/apache_software_license_2.0.txt):
* Apache Commons Lang ([org.apache.commons:commons-lang3:3.8.1](http://commons.apache.org/proper/commons-lang/))
* Apache Hadoop Common ([org.apache.hadoop:hadoop-common:3.2.1](no url defined))
* Apache Hadoop MapReduce Core ([org.apache.hadoop:hadoop-mapreduce-client-core:3.2.1](no url defined))
* Spring Cloud Starter OpenFeign ([org.springframework.cloud:spring-cloud-starter-openfeign:2.2.0.RELEASE](https://projects.spring.io/spring-cloud))
* clients-common ([uk.gov.gchq.palisade:clients-common:0.4.0](https://github.com/gchq/Palisade-clients/tree/main/clients-common))
* common ([uk.gov.gchq.palisade:common:0.4.0](https://github.com/gchq/Palisade-common))
* readers-common ([uk.gov.gchq.palisade:readers-common:0.4.0](https://github.com/gchq/Palisade-readers/tree/main/readers-common))
* Jackson-annotations ([com.fasterxml.jackson.core:jackson-annotations:2.11.0](http://github.com/FasterXML/jackson))
* jackson-databind ([com.fasterxml.jackson.core:jackson-databind:2.11.0](http://github.com/FasterXML/jackson))
* Jackson-dataformat-XML ([com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.11.0](https://github.com/FasterXML/jackson-dataformat-xml))
* Jackson datatype: jdk8 ([com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.11.0](https://github.com/FasterXML/jackson-modules-java8/jackson-datatype-jdk8))
* akka-http-jackson ([com.typesafe.akka:akka-http-jackson_2.13:10.2.1](https://akka.io))
* akka-http ([com.typesafe.akka:akka-http_2.13:10.2.1](https://akka.io))
* akka-stream ([com.typesafe.akka:akka-stream_2.13:2.6.10](https://akka.io/))
* Micronaut ([io.micronaut:micronaut-http-server-netty:2.3.2](http://micronaut.io))
* Micronaut ([io.micronaut:micronaut-inject:2.3.2](http://micronaut.io))
* Micronaut ([io.micronaut:micronaut-inject-java:2.3.2](http://micronaut.io))
* Micronaut ([io.micronaut:micronaut-runtime:2.3.2](http://micronaut.io))
* Micronaut Test ([io.micronaut.test:micronaut-test-junit5:2.3.2](http://micronaut.io))
* Reactive Relational Database Connectivity - H2 ([io.r2dbc:r2dbc-h2:0.8.4.RELEASE](https://github.com/r2dbc/r2dbc-h2))
* RxJava ([io.reactivex.rxjava3:rxjava:3.0.8](https://github.com/ReactiveX/RxJava))
* AssertJ fluent assertions ([org.assertj:assertj-core:3.19.0](https://assertj.github.io/doc/assertj-core/))
* org.immutables.value ([org.immutables:value:2.8.2](http://immutables.org/value))
* spring-boot-autoconfigure ([org.springframework.boot:spring-boot-autoconfigure:2.3.1.RELEASE](https://spring.io/projects/spring-boot))
* spring-boot-starter-aop ([org.springframework.boot:spring-boot-starter-aop:2.3.1.RELEASE](https://spring.io/projects/spring-boot))
* spring-boot-starter-data-r2dbc ([org.springframework.boot:spring-boot-starter-data-r2dbc:2.3.1.RELEASE](https://spring.io/projects/spring-boot))
* spring-boot-starter-test ([org.springframework.boot:spring-boot-starter-test:2.3.1.RELEASE](https://spring.io/projects/spring-boot))
* Spring Shell Starter ([org.springframework.shell:spring-shell-starter:2.0.0.RELEASE](http://projects.spring.io/spring-boot/spring-shell-parent/spring-shell-starter/))
* GCHQ Palisade - Akka Client ([uk.gov.gchq.palisade:client-akka:0.5.0-RELEASE](https://github.com/gchq/Palisade-clients/tree/develop/client-akka))
* GCHQ Palisade - Java Client ([uk.gov.gchq.palisade:client-java:0.5.0-RELEASE](https://github.com/gchq/Palisade-clients/tree/develop/client-java))
* GCHQ Palisade Common Library ([uk.gov.gchq.palisade:common:0.5.0-RELEASE](https://github.com/gchq/Palisade-common))

### [Eclipse Public License 1.0](./licenses/eclipse_public_license_1.0.html):
* JUnit ([junit:junit:4.12](http://junit.org))
* Logback Classic Module ([ch.qos.logback:logback-classic:1.2.3](http://logback.qos.ch/logback-classic))

### [Eclipse Public License 2.0](./licenses/eclipse_public_license_2.0.html):
* JUnit Jupiter (Aggregator) ([org.junit.jupiter:junit-jupiter:5.7.0](https://junit.org/junit5/))
* JUnit Jupiter API ([org.junit.jupiter:junit-jupiter-api:5.7.0](https://junit.org/junit5/))
* JUnit Jupiter Engine ([org.junit.jupiter:junit-jupiter-engine:5.7.0](https://junit.org/junit5/))
* JUnit Platform Commons ([org.junit.platform:junit-platform-commons:1.7.0](https://junit.org/junit5/))
* JUnit Platform Engine API ([org.junit.platform:junit-platform-engine:1.7.0](https://junit.org/junit5/))

### [GNU Lesser General Public License 2.1](./licenses/gnu_lgpl_2.1.html):
* Logback Classic Module ([ch.qos.logback:logback-classic:1.2.3](http://logback.qos.ch/logback-classic))

### [MIT License](./licenses/mit_license.txt):
* Mockito ([org.mockito:mockito-all:1.10.19](http://www.mockito.org))
* SLF4J API Module ([org.slf4j:slf4j-api:1.7.25](http://www.slf4j.org))
* jnr-fuse ([com.github.serceman:jnr-fuse:0.5.5](https://github.com/SerCeMan/jnr-fuse))
* mockito-core ([org.mockito:mockito-core:3.7.7](https://github.com/mockito/mockito))
* mockito-junit-jupiter ([org.mockito:mockito-junit-jupiter:3.7.7](https://github.com/mockito/mockito))
* SLF4J API Module ([org.slf4j:slf4j-api:1.7.26](http://www.slf4j.org))
Loading

0 comments on commit 416123c

Please sign in to comment.