Skip to content

<bot> update dependencies*.log files(s) #853

<bot> update dependencies*.log files(s)

<bot> update dependencies*.log files(s) #853

Workflow file for this run

name: wipac ci/cd
on:
push:
branches:
- '**'
tags-ignore:
- '**'
jobs:
keycloak-image-build:
runs-on: ubuntu-latest
outputs:
keycloak-tag: ${{ steps.docker_meta.outputs.tags }}
steps:
- uses: actions/checkout@v3
- name: Docker meta
id: docker_meta
uses: docker/metadata-action@v4
with:
images: |
ghcr.io/WIPACRepo/keycloak-rest-services
tags: |
type=ref,prefix=test-keycloak-,event=branch
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push Docker Image
uses: docker/build-push-action@v4
with:
context: .
file: resources/keycloak-image/Dockerfile
push: true
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
ldap-image-build:
runs-on: ubuntu-latest
outputs:
ldap-tag: ${{ steps.docker_meta.outputs.tags }}
steps:
- uses: actions/checkout@v3
- name: Docker meta
id: docker_meta
uses: docker/metadata-action@v4
with:
images: |
ghcr.io/WIPACRepo/keycloak-rest-services
tags: |
type=ref,prefix=test-ldap-,event=branch
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push Docker Image
uses: docker/build-push-action@v4
with:
context: .
file: resources/ldap-image/Dockerfile
push: true
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
flake8:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- uses: WIPACrepo/[email protected]
py-setup:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
with:
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
- uses: WIPACrepo/[email protected]
py-dependencies:
runs-on: ubuntu-latest
needs: [py-setup]
steps:
- name: checkout
uses: actions/checkout@v3
with:
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
- uses: WIPACrepo/[email protected]
py-versions:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.versions.outputs.matrix }}
steps:
- uses: actions/checkout@v3
- id: versions
uses: WIPACrepo/[email protected]
pip-install:
needs: [py-versions]
runs-on: ubuntu-latest
strategy:
max-parallel: 4
fail-fast: false
matrix:
version: ${{ fromJSON(needs.py-versions.outputs.matrix) }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.version }}
- run: |
pip install --upgrade pip wheel setuptools
pip install .[actions]
py-tests:
needs: [keycloak-image-build, ldap-image-build, py-versions]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
test: ["actions", "krs"]
services:
rabbitmq:
image: bitnami/rabbitmq:3.8
env:
RABBITMQ_USERNAME: admin
RABBITMQ_PASSWORD: admin
RABBITMQ_VHOST: keycloak
RABBITMQ_NODE_NAME: rabbit@rabbitmq
options: --health-cmd "rabbitmqctl node_health_check" --health-interval 10s --health-timeout 5s --health-retries 5
ports:
- 5672:5672
- 15672:15672
ldap:
image: ${{ needs.ldap-image-build.outputs.ldap-tag }}
ports:
- 1389:1389
keycloak:
image: ${{ needs.keycloak-image-build.outputs.keycloak-tag }}
env:
KEYCLOAK_ADMIN: admin
KEYCLOAK_ADMIN_PASSWORD: admin
KK_TO_RMQ_URL: rabbitmq
CMD: start-dev
ports:
- 8080:8080
container:
image: python:${{ fromJSON(needs.py-versions.outputs.matrix)[0] }}
env:
KEYCLOAK_URL: http://keycloak:8080
KEYCLOAK_USERNAME: admin
KEYCLOAK_PASSWORD: admin
LDAP_URL: ldap://ldap:1389
LDAP_ADMIN_USER: "cn=admin,dc=icecube,dc=wisc,dc=edu"
LDAP_ADMIN_PASSWORD: admin
RABBITMQ_MGMT_URL: http://rabbitmq:15672
RABBITMQ_URL: amqp://admin:admin@rabbitmq/keycloak
steps:
- uses: actions/checkout@v3
- run: |
pip install --upgrade pip wheel setuptools
pip install .[tests,actions]
- run: |
python -m pytest tests/${{ matrix.test }} --tb=short --log-level=DEBUG
release:
if: ${{ github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' }}
needs: [py-setup, pip-install, py-tests]
runs-on: ubuntu-latest
concurrency: release
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
- name: Python Semantic Release
uses: relekang/[email protected]
with:
github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
repository_username: __token__
repository_password: ${{ secrets.PYPI_TOKEN }}
docker:
name: "Docker Image"
needs: [py-setup, pip-install, py-tests]
runs-on: ubuntu-latest
steps:
- name: Checkout Project
uses: actions/checkout@v3
- name: Docker meta
id: docker_meta
uses: docker/metadata-action@v4
with:
# list of Docker images to use as base name for tags
images: |
wipac/keycloak-rest-services
ghcr.io/WIPACRepo/keycloak-rest-services
tags: |
type=ref,event=branch
type=semver,pattern={{major}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}.{{minor}}.{{patch}}
- name: Login to DockerHub
uses: docker/login-action@v2
if: ${{ github.event_name != 'pull_request' }}
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
if: ${{ github.event_name != 'pull_request' }}
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push Docker Image
uses: docker/build-push-action@v4
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}