Skip to content

feat: first deployment on k8s cluster #30

feat: first deployment on k8s cluster

feat: first deployment on k8s cluster #30

Workflow file for this run

name: Test
on:
push:
pull_request:
jobs:
build:
name: Build the image
runs-on: ubuntu-latest
services:
registry:
image: registry:2
ports:
- 5000:5000
mariadb:
image: mariadb:"10.10.2"
ports:
- 3306
env:
MYSQL_USER: trikorasolns_glpi
MYSQL_PASSWORD: trikorasolns_glpi
MYSQL_DATABASE: trikorasolns_glpi
MYSQL_ROOT_PASSWORD: trikorasolns_glpi
strategy:
matrix:
python-version: ["3.11"]
# mariadb-version: ["10.10.2"]
steps:
# Important: This sets up your GITHUB_WORKSPACE environment variable
- uses: actions/checkout@v3
with:
fetch-depth: 0 # needed for progressive mode to work
- name: Build core Image
id: build-core-image
uses: redhat-actions/buildah-build@v2
with:
image: trikorasolns_glpi_core
containerfiles: |
src/main/core/Dockerfile
- name: Build init Image
id: build-init-image
uses: redhat-actions/buildah-build@v2
with:
image: trikorasolns_glpi_init
containerfiles: |
src/main/init/Dockerfile
- name: Build web Image
uses: redhat-actions/buildah-build@v2
with:
image: trikorasolns_glpi_web
containerfiles: |
src/main/web/Dockerfile
- name: Build cron Image
uses: redhat-actions/buildah-build@v2
with:
image: trikorasolns_glpi_cron
containerfiles: |
src/main/cron/Dockerfile
- name: Add
run: |
cat > /etc/containers/registries.conf.d/localhost.conf <<EOF
[[registry]]
location = "localhost:5000"
insecure = true
EOF
cat /etc/containers/registries.conf.d/localhost.conf
- name: Push to local registry
id: push-to-quay
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build-init-image.outputs.image }}
tags: ${{ steps.build-init-image.outputs.tags }}
registry: localhost:5000/glpi-container
# # registry: localhost:5000/name/app:latest
# # username: quay-user
# # password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
- name: Install dependencies
run: |
python -m pip install --upgrade pip
# pip install ruff pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
# - name: Create k8s Kind Cluster
# uses: helm/[email protected]
# - uses: shogo82148/actions-setup-mysql@v1
# with:
# distribution: "mariadb"
# mysql-version: "${{ matrix.mariadb-version }}"
# user: trikorasolns_glpi
# password: trikorasolns_glpi
# - name: Run ansible-lint
# # replace `main` with any valid ref, or tags like `v6`
# uses: ansible/ansible-lint-action@main
# # optional:
# # with:
# # path: "playbooks/" # <-- only one value is allowed
# uses: dawidd6/action-ansible-playbook@v2