Skip to content

ENG-5451: Integration of new version of Keycloak (Quarkus based) #95

ENG-5451: Integration of new version of Keycloak (Quarkus based)

ENG-5451: Integration of new version of Keycloak (Quarkus based) #95

Workflow file for this run

name: PR-CYCLE
on:
pull_request:
types:
- opened
- synchronize
- reopened
branches:
- develop
- epic/*
- release/*
env:
ENTANDO_OPT_USE_PPL_TAG: "v1.4.1"
ENTANDO_OPT_DATA_REPO: "${{ secrets.ENTANDO_OPT_DATA_REPO }}"
ENTANDO_OPT_DATA_REPO_TOKEN: "${{ secrets.ENTANDO_OPT_DATA_REPO_TOKEN }}"
ENTANDO_OPT_ENVIRONMENT_NAMES: "${{ secrets.ENTANDO_OPT_ENVIRONMENT_NAMES }}"
ENTANDO_OPT_FEATURES: "${{ secrets.ENTANDO_OPT_FEATURES }}"
ENTANDO_OPT_GLOBAL_FEATURES: "${{ secrets.ENTANDO_OPT_GLOBAL_FEATURES }}"
ENTANDO_OPT_LOG_LEVEL: "${{ secrets.ENTANDO_OPT_LOG_LEVEL }}"
ENTANDO_OPT_CUSTOM_ENV: "${{ secrets.ENTANDO_OPT_CUSTOM_ENV }}"
PPL_CONTEXT: ${{ toJson(github) }}
LOCAL_CLONE_DIR: "local-checkout"
jobs:
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# PREPARE
prepare:
runs-on: ubuntu-latest
outputs:
SCAN_MATRIX: ${{ steps.START.outputs.SCAN_MATRIX }}
steps:
#~
- name: "PR PIPELINE START"
id: START
run: |
${{ secrets.ENTANDO_OPT_PPL_INSTALL_CMD }}
~/ppl-run \
.. @checkout-branch --lcd "$LOCAL_CLONE_DIR" \
.. status-report \
.. @setup-feature-flags "PR_PREFLIGHT_CHECKS" "BOM_CHECK" "BOM" \
.. @setup-features-list "SCAN_MATRIX" --prefix "MTX-ENP-,MTX-SCAN-" \
;
- name: "PR preflight checks"
if: steps.START.outputs.PR_PREFLIGHT_CHECKS != 'false'
id: pr-preflight-checks
run: |
~/ppl-run pr-preflight-checks --lcd "$LOCAL_CLONE_DIR"
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# FULL-BUILD
full-build:
needs: [ 'prepare' ]
runs-on: ubuntu-latest
env:
ENTANDO_BOT_TOKEN: "${{ secrets.ENTANDO_BOT_TOKEN }}"
ENTANDO_OPT_OKD_LOGIN_TOKEN: "${{ secrets.ENTANDO_OPT_OKD_LOGIN_TOKEN }}"
ENTANDO_RHT_DOCKER_USERNAME: "${{ secrets.ENTANDO_RHT_DOCKER_USERNAME }}"
ENTANDO_RHT_DOCKER_PASSWORD: "${{ secrets.ENTANDO_RHT_DOCKER_PASSWORD }}"
ENTANDO_RHT_DOCKER_REGISTRY: "${{ secrets.ENTANDO_RHT_DOCKER_REGISTRY }}"
steps:
#~ CHECKOUT
- name: "CHECKOUT"
id: CHECKOUT
run: |
${{ secrets.ENTANDO_OPT_PPL_INSTALL_CMD }}
~/ppl-run checkout-branch \
--lcd "$LOCAL_CLONE_DIR" \
--token "$ENTANDO_BOT_TOKEN" \
;
~/ppl-run generic GENERATE-BUILD-CACHE-KEY "BUILD_CACHE_KEY" --lcd "$LOCAL_CLONE_DIR" >> $GITHUB_ENV
~/ppl-run generic GENERATE-BUILD-TARGET-DIR "BUILD_TARGET_DIR" --lcd "$LOCAL_CLONE_DIR" >> $GITHUB_ENV
#~ BUILD CACHE
- name: "Cache Build Dir"
id: build-cache
uses: actions/cache@v2
with:
path: "${{ env.LOCAL_CLONE_DIR}}/${{ env.BUILD_TARGET_DIR }}/"
key: "${{ runner.os }}-enp-build-${{ env.BUILD_CACHE_KEY }}"
#~ BUILD
- name: "FULL BUILD"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
run: |
~/ppl-run generic FULL-BUILD --lcd "$LOCAL_CLONE_DIR"
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# SCANS
# scans:
# needs: [ 'prepare', 'full-build' ]
# runs-on: ubuntu-latest
# if: ${{ needs.prepare.outputs.SCAN_MATRIX != '' }}
# strategy:
# max-parallel: 5
# fail-fast: false
# matrix:
# mtx-step: ${{fromJson(needs.prepare.outputs.SCAN_MATRIX)}}
#
# steps:
# #~ CHECKOUT
# - name: "CHECKOUT"
# run: |
# ${{ secrets.ENTANDO_OPT_PPL_INSTALL_CMD }}
# ~/ppl-run checkout-branch pr --lcd "$LOCAL_CLONE_DIR"
# #~ SCAN
# - name: "Run the matrix step ${{ matrix.mtx-step }}"
# run: |
# MTX_STEP="${{ matrix.mtx-step }}"
#
# ~/ppl-run generic GENERATE-REQUIREMENT-SPEC "MTX_REQUIREMENT" "$MTX_STEP" >> $GITHUB_ENV
# for spec in (("${{ env.MTX_REQUIREMENT }}")); do
# case "${{ env.MTX_REQUIREMENT }}" in
# ENTANDO-REQ-GITHUB-SPECIAL)
# export GITHUB_TOKEN="${{ secrets.GITHUB_TOKEN }}"
# ;;
# ENTANDO-REQ-SNYK)
# export SNYK_TOKEN="${{ secrets.SNYK_TOKEN }}"
# ;;
# ENTANDO-REQ-POST-DEP)
# export ENTANDO_OPT_OKD_LOGIN_TOKEN="${{ secrets.ENTANDO_OPT_OKD_LOGIN_TOKEN }}"
# export ENTANDO_OPT_IMAGE_REGISTRY_CREDENTIALS="${{ secrets.ENTANDO_OPT_IMAGE_REGISTRY_CREDENTIALS }}"
# export ENTANDO_OPT_DOCKER_USERNAME="${{ secrets.ENTANDO_OPT_DOCKER_USERNAME }}"
# export ENTANDO_OPT_DOCKER_PASSWORD="${{ secrets.ENTANDO_OPT_DOCKER_PASSWORD }}"
# export ENTANDO_OPT_TEST_TLS_CRT="${{ secrets.ENTANDO_OPT_TEST_TLS_CRT }}"
# export ENTANDO_OPT_TEST_TLS_KEY="${{ secrets.ENTANDO_OPT_TEST_TLS_KEY }}"
# ;;
# esac
# done
#
# ~/ppl-run generic "$MTX_STEP" --id "$MTX_STEP" --lcd "$LOCAL_CLONE_DIR"