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

Befta-fw 9.0.2, ccd-test-definitions 7.22.2, gradle 8.7 #419

Merged
merged 11 commits into from
Jul 8, 2024
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: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ RUN apk update \
COPY --chown=hmcts:hmcts package.json yarn.lock ./

USER hmcts
COPY app.js server.js ./
COPY app ./app
COPY config ./config
COPY --chown=hmcts:hmcts app.js server.js ./
COPY --chown=hmcts:hmcts app ./app
COPY --chown=hmcts:hmcts config ./config

RUN yarn config set yarn-offline-mirror ~/npm-packages-offline-cache && \
yarn config set yarn-offline-mirror-pruning true && \
Expand Down
6 changes: 3 additions & 3 deletions aat/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ repositories {

// tag::dependencies[]
dependencies {
testImplementation group: 'com.github.hmcts', name: 'ccd-test-definitions', version: '7.0.0'
testImplementation group: 'com.github.hmcts', name: 'befta-fw', version: '8.7.11'
testImplementation 'com.github.hmcts:fortify-client:1.3.0:all'
testImplementation group: 'com.github.hmcts', name: 'ccd-test-definitions', version: '7.22.2'
testImplementation group: 'com.github.hmcts', name: 'befta-fw', version: '9.0.2'
testImplementation 'com.github.hmcts:fortify-client:1.4.2'
}
// end::dependencies[]

Expand Down
Binary file modified aat/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion aat/gradle/wrapper/gradle-wrapper.properties
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-8.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
29 changes: 17 additions & 12 deletions aat/gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,8 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -133,26 +131,29 @@ location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi

# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -197,11 +198,15 @@ if "$cygwin" || "$msys" ; then
done
fi

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.

set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import uk.gov.hmcts.befta.BeftaTestDataLoader;
import uk.gov.hmcts.befta.DefaultBeftaTestDataLoader;
import uk.gov.hmcts.befta.DefaultTestAutomationAdapter;
import uk.gov.hmcts.befta.dse.ccd.DataLoaderToDefinitionStore;
import uk.gov.hmcts.befta.dse.ccd.CcdEnvironment;

public class CaseActivityTestAutomationAdapter extends DefaultTestAutomationAdapter {
Expand Down
12 changes: 7 additions & 5 deletions app/app-insights/app-insights.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
const config = require('config');
const appInsights = require('applicationinsights');

const enabled = config.get('appInsights.enabled');

const enableAppInsights = () => {
const appInsightsKey = config.get('secrets.ccd.AppInsightsInstrumentationKey');
const appInsightsRoleName = config.get('appInsights.roleName');
appInsights.setup(appInsightsKey)
if (!enabled) {
return;
}
const appInsightsString = config.get('secrets.ccd.app-insights-connection-string');
appInsights.setup(appInsightsString)
.setAutoDependencyCorrelation(true)
.setAutoCollectConsole(true, true);
appInsights.defaultClient.context.tags[
appInsights.defaultClient.context.keys.cloudRole] = appInsightsRoleName;
appInsights.defaultClient.config.samplingPercentage = 1;
appInsights.start();
};
Expand Down
2 changes: 1 addition & 1 deletion charts/ccd-case-activity-api/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
description: Helm chart for the HMCTS CCD Case Activity
name: ccd-case-activity-api
home: https://github.com/hmcts/ccd-case-activity-api
version: 1.3.9
version: 1.3.10
maintainers:
- name: HMCTS CCD Dev Team
email: [email protected]
Expand Down
7 changes: 4 additions & 3 deletions charts/ccd-case-activity-api/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ nodejs:
CACHE_USER_INFO_ENABLED: true
CACHE_USER_INFO_TTL: 600
CACHE_USER_INFO_CHECK_PERIOD: 120
NODE_CONFIG_DIR: ./config
AUTH_WHITE_LIST: ^caseworker-.+
AUTH_BLACK_LIST: solicitor
IDAM_BASE_URL: https://idam-api.{{ .Values.global.environment }}.platform.hmcts.net
Expand All @@ -37,6 +38,6 @@ nodejs:

keyVaults:
ccd:
secrets:
- activity-redis-password
- AppInsightsInstrumentationKey
secrets:
- name: activity-redis-password
- name: app-insights-connection-string
4 changes: 1 addition & 3 deletions config/custom-environment-variables.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,8 @@ cache:
app:
requestTimeoutSec: APP_REQUEST_TIMEOUT
storeCleanupCrontab: APP_STORE_CLEANUP_CRONTAB
appInsights:
instrumentationKey: APPINSIGHTS_INSTRUMENTATIONKEY

secrets:
ccd:
activity-redis-password: REDIS_PASSWORD
AppInsightsInstrumentationKey: APPINSIGHTS_INSTRUMENTATIONKEY
app-insights-connection-string: ""
4 changes: 2 additions & 2 deletions config/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ app:
requestTimeoutSec: 5
storeCleanupCrontab: "* * * * *"
appInsights:
roleName: "ccd-case-activity-api"
enabled: true

secrets:
ccd:
activity-redis-password: testPassword
AppInsightsInstrumentationKey: "some-key"
app-insights-connection-string: ""
3 changes: 3 additions & 0 deletions config/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@ appInsights:
enabled: false
idam:
base_url: http://test-idam:1234
secrets:
ccd:
app-insights-connection-string: ""
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"@hmcts/nodejs-healthcheck": "^1.8.0",
"@hmcts/nodejs-logging": "^4.0.4",
"@hmcts/properties-volume": "^0.0.14",
"applicationinsights": "^1.0.5",
"applicationinsights": "^3.1.0",
"body-parser": "^1.20.1",
"config": "^1.26.1",
"connect-timeout": "^1.9.0",
Expand Down Expand Up @@ -89,6 +89,7 @@
"moment": "^2.29.4",
"ajv": "6.12.3",
"json5": "^2.2.2",
"js-yaml": "^3.13.1",
"minimatch": "^3.0.5",
"cookiejar": "^2.1.4",
"flat": "^5.0.1",
Expand Down
Loading