Skip to content

Commit ba9d4a6

Browse files
authored
Merge branch 'main' into PRM-667
2 parents 0c4cab3 + 11888a6 commit ba9d4a6

File tree

3 files changed

+24
-86
lines changed

3 files changed

+24
-86
lines changed

services/mesh-forwarder/Pipfile

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,27 @@ name = "pypi"
77
mesh-inbox-s3-forwarder = {editable = true, path = "."}
88

99
[dev-packages]
10-
werkzeug = "~=2.1.0"
11-
moto = {version = "~=2.2", extras = ["server"]}
12-
pytest-cov = "~=2.12"
13-
pytest = "~=6.2"
14-
pyfakefs = "~=4.5"
15-
fake-mesh = "~=0.3"
16-
flake8 = "~=3.9"
17-
flake8-bugbear="~=21.9"
18-
flake8-comprehensions="~=3.6"
19-
mccabe="~=0.6"
20-
flake8-builtins="~=1.5"
21-
flake8-print="~=4.0"
22-
bandit = "~=1.7"
23-
isort = "~=5.9"
24-
black = "==21.9b0"
25-
mypy = "~=0.9"
26-
types-requests = "2.25"
27-
click = "~=8.0.4"
10+
werkzeug = "~=3.1.5"
11+
moto = {version = "~=5.1.21", extras = ["server"]}
12+
pytest-cov = "~=7.0.0"
13+
pytest = "~=9.0.2"
14+
pyfakefs = "~=6.1.0"
15+
fake-mesh = "~=0.4.0"
16+
flake8 = "~=7.3.0"
17+
flake8-bugbear="~=25.11.29"
18+
flake8-comprehensions="~=3.17.0"
19+
mccabe="~=0.7.0"
20+
flake8-builtins="~=3.1.0"
21+
flake8-print="~=5.0.0"
22+
bandit = "~=1.9.3"
23+
isort = "~=7.0.0"
24+
black = "==26.1.0"
25+
mypy = "~=1.19.1"
26+
types-requests = "~=2.32.4"
27+
click = "~=8.3.1"
2828

2929
[requires]
30-
python_version = "3.9"
30+
python_version = "3.14.3"
3131

3232
[scripts]
3333
test = "python -m pytest --cov=awsmesh --cov-report=term-missing tests/unit tests/e2e"

services/mesh-forwarder/Pipfile.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

services/mesh-forwarder/tasks

Lines changed: 3 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -10,38 +10,6 @@ AWS_DEFAULT_REGION=eu-west-2
1010
IMAGE_REPO_NAME=deductions/mesh-forwarder
1111
export NHS_SERVICE=mesh-forwarder
1212

13-
AWS_HELPERS_VERSION=0.2.27
14-
echo "AWS helper scripts version: $AWS_HELPERS_VERSION"
15-
16-
17-
###########################
18-
# Shared utils #
19-
###########################
20-
21-
function download_util() {
22-
local UTIL_VERSION=$1
23-
local UTIL_FILENAME=$2
24-
25-
local UTIL_FILEPATH="utils/$UTIL_VERSION/$UTIL_FILENAME"
26-
27-
mkdir -p "utils/$UTIL_VERSION"
28-
if [[ ! -f $UTIL_FILEPATH ]];then
29-
wget --quiet -O $UTIL_FILEPATH https://github.com/nhsconnect/prm-deductions-support-infra/releases/download/${UTIL_VERSION}/${UTIL_FILENAME}
30-
fi
31-
chmod +x $UTIL_FILEPATH
32-
33-
echo "$UTIL_FILEPATH"
34-
}
35-
36-
function fetch_redaction_utils() {
37-
download_util $AWS_HELPERS_VERSION run-with-redaction.sh
38-
download_util $AWS_HELPERS_VERSION redactor
39-
}
40-
41-
AWS_HELPERS_FILE=$(download_util $AWS_HELPERS_VERSION aws-helpers)
42-
source $AWS_HELPERS_FILE
43-
44-
4513
####################################
4614
# Instance (Environment) Variables #
4715
####################################
@@ -137,14 +105,9 @@ function set_cert_issuer() {
137105
}
138106

139107
function setup_venv {
140-
venv_directory=venv
141-
echo "Using this directory for venv: ${venv_directory}"
142-
python3 -m venv "${venv_directory}"
143-
source "${venv_directory}"/bin/activate
144-
}
145-
146-
function get_aws_account_id() {
147-
AWS_ACCOUNT_ID=$(aws sts get-caller-identity | jq -r .Account)
108+
echo "Creating Dev Virtual Environment"
109+
pip3 install pipenv
110+
pipenv shell
148111
}
149112

150113
function generate_mesh_fqdn() {
@@ -159,19 +122,6 @@ function generate_mesh_fqdn() {
159122
fi
160123
}
161124

162-
function build_forwarder_image() {
163-
fetch_redaction_utils
164-
docker build --build-arg SOURCE_IMAGE_TAG=$SOURCE_IMAGE_TAG \
165-
--build-arg UTILS_VERSION=$AWS_HELPERS_VERSION \
166-
-t "$IMAGE_REPO_NAME:${IMAGE_TAG}" .
167-
}
168-
169-
function push_forwarder_image_to_repo_ecr() {
170-
IMAGE_FULL_URL="${REPOSITORY_URI}:${IMAGE_TAG}"
171-
docker tag "$IMAGE_REPO_NAME:${IMAGE_TAG}" "$IMAGE_FULL_URL"
172-
docker push "$IMAGE_FULL_URL"
173-
}
174-
175125
function generate_csr {
176126
keys_file_name="$1"
177127
# If you intend to secure the URL https://www.yourdomain.com, then your CSR’s common name must be www.yourdomain.com
@@ -300,11 +250,6 @@ case "${command}" in
300250
set_nems_env
301251
python3 print_delete_subscription.py
302252
;;
303-
promote_docker_image)
304-
check_env
305-
set_image_tag
306-
promote_docker_image "$IMAGE_REPO_NAME:$IMAGE_TAG" "$NHS_ENVIRONMENT"
307-
;;
308253
venv)
309254
setup_venv
310255
;;
@@ -316,13 +261,6 @@ case "${command}" in
316261
--cluster $NHS_ENVIRONMENT-${NHS_SERVICE}-ecs-cluster \
317262
--services $NHS_ENVIRONMENT-mesh-forwarder-service
318263
;;
319-
fetch_utils)
320-
fetch_redaction_utils
321-
;;
322-
build_docker)
323-
set_image_tag
324-
build_forwarder_image
325-
;;
326264
push_forwarder_image_to_repo_ecr)
327265
if [ -z $SOURCE_IMAGE_TAG ]; then
328266
echo "Please set SOURCE_IMAGE_TAG environment variable"

0 commit comments

Comments
 (0)