Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
dbfb301
add dependabot for gatewayApi
rustyjux Feb 12, 2025
ed4e7d2
chore(deps): add renovate.json
renovate[bot] Feb 12, 2025
bbf70ba
remove dependabot
rustyjux Feb 13, 2025
465700c
add compatibilityApi
rustyjux Feb 15, 2025
cbf531e
mock deck for tests
rustyjux Feb 15, 2025
f8081f3
fix routes tests to use mock
rustyjux Feb 15, 2025
c2219aa
patch at higher level to avoid calling deck
rustyjux Feb 15, 2025
5439a71
bump python version in docker
rustyjux Feb 18, 2025
d709e56
update sonarqube action
rustyjux Feb 18, 2025
dbd2bce
tweak dockerfile
rustyjux Feb 18, 2025
4753b03
make .env optional
rustyjux Feb 18, 2025
58e3735
check gwa / compatibility communication
rustyjux Feb 18, 2025
aa27f77
fix gwa gateway tests, add kong2 backwards support to compatibility api
rustyjux Feb 19, 2025
011bfcd
add missing comma
rustyjux Feb 19, 2025
1218fad
replace config w/ kong2 config
rustyjux Feb 19, 2025
a016fa5
note re: temp downgrade to k2
rustyjux Feb 19, 2025
3ed3865
add route tagging logic to compatibilityApi
rustyjux Feb 20, 2025
131d15c
Update gatewayApi for different response + error messaging
rustyjux Feb 20, 2025
b5576d6
Update compatibility error message
rustyjux Feb 20, 2025
1724641
add compatibility check to gatewayApi v1
rustyjux Feb 20, 2025
23bf977
only save warning to warning_message
rustyjux Feb 21, 2025
10cf41b
match warning format to existing version warning
rustyjux Feb 21, 2025
7e3777c
only scan gatewayApi
rustyjux Feb 24, 2025
7479e7c
add GHAs to scan
rustyjux Feb 24, 2025
b219d9d
fix path for gatewayApi
rustyjux Feb 24, 2025
bd07588
Merge pull request #152 from bcgov/renovate/configure
rustyjux Feb 24, 2025
fbf69e8
run tests on renovate branches
rustyjux Feb 24, 2025
33e17a1
create renovate update PRs against feature/renovate branch
rustyjux Feb 24, 2025
2e141db
attempt to persist feature/renovate
rustyjux Feb 24, 2025
8fb1628
remove made up parameter
rustyjux Feb 24, 2025
5ebda1b
avoid pruning feature/renovate
rustyjux Feb 24, 2025
249967a
only build each image when there are changes to that image
rustyjux Feb 24, 2025
64f34a1
label renovate PRs
rustyjux Feb 25, 2025
3488f2a
bump actions/checkout to v4
rustyjux Feb 25, 2025
350e7ce
simplify diff check
rustyjux Feb 25, 2025
d76a4a1
add fetch-depth 2 to checkout parent commit
rustyjux Feb 25, 2025
a0e1302
confirm build is selective
rustyjux Feb 25, 2025
5cd4cb9
Merge pull request #157 from bcgov/feature/kong3-compatibility
rustyjux Feb 26, 2025
d464c0e
Feature/service status kubeapi (#155)
Elson9 Feb 26, 2025
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
84 changes: 76 additions & 8 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ name: Build
# events but only for the master branch
on:
push:
branches: [dev, feature/*, fix/*]
branches: [dev, feature/*, fix/*, renovate/*]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
Expand All @@ -18,10 +18,9 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
# Disabling shallow clone is recommended for improving relevancy of reporting
fetch-depth: 0
fetch-depth: 2
- uses: actions/setup-python@v5
with:
python-version: "3.11"
Expand Down Expand Up @@ -61,8 +60,16 @@ jobs:
poetry run coverage run --branch -m pytest -s -v
poetry run coverage xml

- name: Test coverage for Compatibility API
run: |
export PATH=/root/.local/bin:$PATH
cd microservices/compatibilityApi
poetry install --no-root
poetry run coverage run --branch -m pytest -s -v
poetry run coverage xml

- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
uses: sonarsource/sonarqube-scan-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
Expand All @@ -72,8 +79,22 @@ jobs:
name: Docker Image for gwa-api
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Check if build needed
id: check
run: |
if git diff --name-only HEAD^ HEAD | grep -q "^microservices/gatewayApi/\|^.github/workflows/dev.yml"; then
echo "build_needed=true" >> $GITHUB_OUTPUT
else
echo "build_needed=false" >> $GITHUB_OUTPUT
fi
- name: Skip message
if: steps.check.outputs.build_needed == 'false'
run: echo "No changes in gatewayApi, skipping build"
- uses: docker/build-push-action@v1
if: steps.check.outputs.build_needed == 'true'
with:
registry: docker.pkg.github.com
username: $GITHUB_ACTOR
Expand All @@ -91,8 +112,22 @@ jobs:
name: Docker Image for gwa-scheduler
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Check if build needed
id: check
run: |
if git diff --name-only HEAD^ HEAD | grep -q "^microservices/gatewayJobScheduler/\|^.github/workflows/dev.yml"; then
echo "build_needed=true" >> $GITHUB_OUTPUT
else
echo "build_needed=false" >> $GITHUB_OUTPUT
fi
- name: Skip message
if: steps.check.outputs.build_needed == 'false'
run: echo "No changes in gatewayJobScheduler, skipping build"
- uses: docker/build-push-action@v1
if: steps.check.outputs.build_needed == 'true'
with:
registry: docker.pkg.github.com
username: $GITHUB_ACTOR
Expand All @@ -110,8 +145,22 @@ jobs:
name: Docker Image for gwa-kube-api
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Check if build needed
id: check
run: |
if git diff --name-only HEAD^ HEAD | grep -q "^microservices/kubeApi/\|^.github/workflows/dev.yml"; then
echo "build_needed=true" >> $GITHUB_OUTPUT
else
echo "build_needed=false" >> $GITHUB_OUTPUT
fi
- name: Skip message
if: steps.check.outputs.build_needed == 'false'
run: echo "No changes in kubeApi, skipping build"
- uses: docker/build-push-action@v1
if: steps.check.outputs.build_needed == 'true'
with:
registry: docker.pkg.github.com
username: $GITHUB_ACTOR
Expand All @@ -123,3 +172,22 @@ jobs:
tag_with_sha: false
add_git_labels: true
push: true

gwa-compatibility-api:
needs: sonar-scan
name: Docker Image for gwa-compatibility-api
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: docker/build-push-action@v1
with:
registry: docker.pkg.github.com
username: $GITHUB_ACTOR
password: ${{ secrets.GITHUB_TOKEN }}
repository: bcgov/gwa-api/gwa-compatibility-api
path: microservices/compatibilityApi
dockerfile: microservices/compatibilityApi/Dockerfile
tag_with_ref: true
tag_with_sha: false
add_git_labels: true
push: true
209 changes: 209 additions & 0 deletions microservices/compatibilityApi/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,209 @@
# General Ignore
#bin/
.idea
.DS_Store

# Golang Ignore

# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib

# Test binary, build with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out


# Node Ignore

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# parcel-bundler cache (https://parceljs.org/)
.cache

# next.js build output
.next

# nuxt.js build output
.nuxt

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless


# Python Ignore

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/

config/default.json

LOCAL.md
_tmp
34 changes: 34 additions & 0 deletions microservices/compatibilityApi/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
FROM python:3.12.9-alpine3.21

WORKDIR /app

RUN apk add build-base libffi-dev openssl curl

# Install deck
RUN curl -sL https://github.com/kong/deck/releases/download/v1.35.0/deck_1.35.0_linux_amd64.tar.gz -o deck.tar.gz && \
tar -xf deck.tar.gz -C /tmp && \
mv /tmp/deck /usr/local/bin/ && \
rm deck.tar.gz

RUN python -m pip install --upgrade pip

RUN cd /tmp && \
curl -sSL https://install.python-poetry.org > get-poetry.py && \
POETRY_HOME=/opt/poetry python get-poetry.py --version 1.8.2 && \
cd /usr/local/bin && \
ln -s /opt/poetry/bin/poetry && \
poetry config virtualenvs.create false

COPY pyproject.toml /tmp/

COPY poetry.lock /tmp/

RUN cd /tmp && poetry install --no-root --no-dev

COPY . /app

RUN chmod +x /app/entrypoint.sh

EXPOSE 8080

ENTRYPOINT ["./entrypoint.sh"]
Loading
Loading