diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 557c03d7..bd0fa428 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -72,6 +72,23 @@ jobs: run: | git fetch --tags echo "tag=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV + - name: Import BOT GPG key + run: echo $BOT_GPG_KEY | base64 --decode | gpg --batch --import + env: + BOT_GPG_KEY: ${{ secrets.BOT_GPG_KEY }} + - name: Prepare gpg CLI signing step + run: | + rm -rf /tmp/gpg.sh + echo '#!/bin/bash' >> /tmp/gpg.sh + echo 'gpg --batch --pinentry-mode=loopback --passphrase $BOT_GPG_KEY_PASSPHRASE $@' >> /tmp/gpg.sh + chmod +x /tmp/gpg.sh + - name: Setup git + run: | + git config commit.gpgsign true + git config user.signingkey "${{ secrets.BOT_GPG_KEY_ID }}" + git config gpg.program /tmp/gpg.sh + git config user.name "${{ secrets.BOT_USERNAME }}" + git config user.email "${{ secrets.BOT_EMAIL }}" - name: update versions if: github.ref != 'refs/heads/main' env: diff --git a/Makefile b/Makefile index 6e17ebaf..23a54a39 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ build-kubernetes: docker build -f _infra/docker/Dockerfile . lint: - pipenv check ./application ./tests -i 51457 + pipenv check ./application ./tests -i 70612 -i 70624 pipenv run isort . pipenv run black --line-length 120 . pipenv run flake8 ./application ./tests diff --git a/Pipfile.lock b/Pipfile.lock index aa0a22e0..61441002 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -27,11 +27,11 @@ }, "blinker": { "hashes": [ - "sha256:c3f865d4d54db7abc53758a01601cf343fe55b84c1de4e3fa910e420b438d5b9", - "sha256:e6820ff6fa4e4d1d8e2747c2283749c3f547e4fee112b98555cdcdae32996182" + "sha256:1779309f71bf239144b9399d06ae925637cf6634cf6bd131104184531bf67c01", + "sha256:8f77b09d3bf7c795e969e9486f39c2c5e9c39d4ee07424be2bc594ece9642d83" ], "markers": "python_version >= '3.8'", - "version": "==1.7.0" + "version": "==1.8.2" }, "cachetools": { "hashes": [ @@ -164,11 +164,11 @@ }, "flask-cors": { "hashes": [ - "sha256:bc3492bfd6368d27cfe79c7821df5a8a319e1a6d5eab277a3794be19bdc51783", - "sha256:f268522fcb2f73e2ecdde1ef45e2fd5c71cc48fe03cffb4b441c6d1b40684eb0" + "sha256:eeb69b342142fdbf4766ad99357a7f3876a2ceb77689dc10ff912aac06c389e4", + "sha256:f2a704e4458665580c074b714c4627dd5a306b333deb9074d0b1794dfa2fb677" ], "index": "pypi", - "version": "==4.0.0" + "version": "==4.0.1" }, "flask-httpauth": { "hashes": [ @@ -515,24 +515,22 @@ "sha256:028ff3aadf0609c1fd278d8ea3089299412a7a8b9bd005dd08b9f8285bcb5cfc", "sha256:82fee1fc78add43492d3a1898bfa6d8a904cc97d8427f683ed8e798d07761aa0" ], - "index": "pypi", "markers": "python_version >= '3.5'", "version": "==3.7" }, "itsdangerous": { "hashes": [ - "sha256:2c2349112351b88699d8d4b6b075022c0808887cb7ad10069318a8b0bc88db44", - "sha256:5dbbc68b317e5e42f327f9021763545dc3fc3bfe22e6deb96aaf1fc38874156a" + "sha256:c6242fc49e35958c8b15141343aa660db5fc54d4f13a1db01a3f5891b98700ef", + "sha256:e0050c0b7da1eea53ffaf149c0cfbb5c6e2e2b69c4bef22c81fa6eb73e5f6173" ], - "markers": "python_version >= '3.7'", - "version": "==2.1.2" + "markers": "python_version >= '3.8'", + "version": "==2.2.0" }, "jinja2": { "hashes": [ "sha256:4a3aee7acbbe7303aede8e9648d13b8bf88a429282aa6122a993f0ac800cb369", "sha256:bc5dd2abb727a5319567b7a813e6a2e7318c39f4f487cfe6c89c6f9c7d25197d" ], - "index": "pypi", "markers": "python_version >= '3.7'", "version": "==3.1.4" }, @@ -779,12 +777,12 @@ }, "requests": { "hashes": [ - "sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f", - "sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1" + "sha256:55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760", + "sha256:70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6" ], "index": "pypi", - "markers": "python_version >= '3.7'", - "version": "==2.31.0" + "markers": "python_version >= '3.8'", + "version": "==2.32.3" }, "requestsdefaulter": { "hashes": [ @@ -811,11 +809,11 @@ }, "setuptools": { "hashes": [ - "sha256:1e8fdff6797d3865f37397be788a4e3cba233608e9b509382a2777d25ebde7f2", - "sha256:735896e78a4742605974de002ac60562d286fa8051a7e2299445e8e8fbb01aa6" + "sha256:5a03e1860cf56bb6ef48ce186b0e557fdba433237481a9a625176c2831be15d1", + "sha256:8d243eff56d095e5817f796ede6ae32941278f542e0f941867cc05ae52b162ec" ], "markers": "python_version >= '3.8'", - "version": "==69.0.2" + "version": "==72.1.0" }, "six": { "hashes": [ @@ -901,11 +899,11 @@ }, "urllib3": { "hashes": [ - "sha256:55901e917a5896a349ff771be919f8bd99aff50b79fe58fec595eb37bbc56bb3", - "sha256:df7aa8afb0148fa78488e7899b2c59b5f4ffcfa82e6c54ccb9dd37c1d7b52d54" + "sha256:a448b2f64d686155468037e1ace9f2d2199776e17f0a46610480d311f73e3472", + "sha256:dd505485549a7a552833da5e6063639d0d177c04f23bc3864e41e5dc5f612168" ], "markers": "python_version >= '3.8'", - "version": "==2.1.0" + "version": "==2.2.2" }, "werkzeug": { "hashes": [ @@ -1024,11 +1022,11 @@ }, "certifi": { "hashes": [ - "sha256:0569859f95fc761b18b45ef421b1290a0f65f147e92a1e5eb3e635f9a5e4e66f", - "sha256:dc383c07b76109f368f6106eee2b593b04a011ea4d55f652c6ca24a754d1cdd1" + "sha256:5a1e7645bc0ec61a09e26c36f6106dd4cf40c6db3a1fb6352b0244e7fb057c7b", + "sha256:c198e21b1289c2ab85ee4e67bb4b4ef3ead0892059901a8d5b622f24a1101e90" ], "markers": "python_version >= '3.6'", - "version": "==2024.2.2" + "version": "==2024.7.4" }, "chardet": { "hashes": [ @@ -1550,11 +1548,11 @@ }, "urllib3": { "hashes": [ - "sha256:450b20ec296a467077128bff42b73080516e71b56ff59a60a02bef2232c4fa9d", - "sha256:d0570876c61ab9e520d776c38acbbb5b05a776d3f9ff98a5c8fd5162a444cf19" + "sha256:a448b2f64d686155468037e1ace9f2d2199776e17f0a46610480d311f73e3472", + "sha256:dd505485549a7a552833da5e6063639d0d177c04f23bc3864e41e5dc5f612168" ], "markers": "python_version >= '3.8'", - "version": "==2.2.1" + "version": "==2.2.2" }, "virtualenv": { "hashes": [ @@ -1573,4 +1571,4 @@ "version": "==3.0.2" } } -} +} \ No newline at end of file diff --git a/README.md b/README.md index 273b72be..c2c9d965 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ pipenv run tox To run the service with the required dependencies: ```bash -docker-compose up -d db +docker compose up -d db pipenv run python run.py ``` @@ -57,7 +57,7 @@ The database will automatically be created when starting the application. To run the service in a Docker container a Compose script is included: ```bash -docker-compose up -d +docker compose up -d ``` ## Configuration diff --git a/_infra/helm/collection-instrument/Chart.yaml b/_infra/helm/collection-instrument/Chart.yaml index bd1c0a0e..a9d62a54 100644 --- a/_infra/helm/collection-instrument/Chart.yaml +++ b/_infra/helm/collection-instrument/Chart.yaml @@ -14,9 +14,9 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. -version: 3.0.32 +version: 3.0.33 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. -appVersion: 3.0.32 +appVersion: 3.0.33 diff --git a/docker-compose.yml b/docker-compose.yml index 9cea192d..868157f9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,3 @@ -version: '2' - services: db: container_name: postgres_collection_instrument diff --git a/tox.ini b/tox.ini index 0e8a83fc..ea60423d 100644 --- a/tox.ini +++ b/tox.ini @@ -5,7 +5,7 @@ envlist = py311 passenv=HOME allowlist_externals=flake8 black - docker-compose + docker isort py.test setenv=APP_SETTINGS=TestingConfig @@ -14,9 +14,9 @@ commands= black --line-length 120 --check . isort . --check-only flake8 . - docker-compose up -d db + docker compose up -d db py.test --cov=application --cov-report html --cov-report term-missing [] - docker-compose down + docker compose down [flake8] max-line-length = 120