Skip to content

Update orca-oes.yml #187

Update orca-oes.yml

Update orca-oes.yml #187

Workflow file for this run

name: Branch Build orca
on:
workflow_call:
workflow_dispatch:
inputs:
CUSTOMPLUGIN_NAME:
# Friendly description to be shown in the UI instead of 'name'
description: 'CUSTOMPLUGIN_RELEASE NAME'
# Default value if no value is explicitly provided
#default: 'v4.isd-spin.2024.06.00'
default: '4.0-OPA-failOpen-changes-Nov13New'
# Input has to be provided for the workflow to run
required: false
# The data type of the input
type: string
push:
branches:
- OES-1.33.x
env:
GRADLE_OPTS: -Dorg.gradle.daemon=false -Xmx6g -Xms6g
CONTAINER_REGISTRY: quay.io/opsmxpublic
jobs:
branch-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- uses: actions/setup-java@v2
with:
java-version: 17
distribution: 'temurin'
- name: Prepare build variables
id: build_variables
run: |
echo ::set-output name=REPO::ubi8-orca-cve
#echo ::set-output name=VERSION::"1.33.x$(date --utc +'%Y%m%d')"
#echo ::set-output name=VERSION::"1.33.x$(date --utc +'%-m%d')"
echo ::set-output name=VERSION::"1.33.3"
echo "::set-output name=GITHASH::$(git rev-parse --short HEAD)"
echo "::set-output name=BUILDDATE::$(date -u +"%Y%m%d%H%M")"
- name: Login to Quay
uses: docker/login-action@v1
# use service account flow defined at: https://github.com/docker/login-action#service-account-based-authentication-1
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_KEY }}
- name: Build
env:
ORG_GRADLE_PROJECT_version: ${{ steps.build_variables.outputs.VERSION }}
run: |
sed -e 's|NEXUS_USERNAME|${{ secrets.NEXUS_USERNAME }}|' -i settings.gradle
sed -e 's|NEXUS_PASSWORD|${{ secrets.NEXUS_PASSWORD }}|' -i settings.gradle
sed -e 's|NEXUS_USERNAME|${{ secrets.NEXUS_USERNAME }}|' -i build.gradle
sed -e 's|NEXUS_PASSWORD|${{ secrets.NEXUS_PASSWORD }}|' -i build.gradle
sed -e 's|NEXUS_URL|${{ secrets.NEXUS_URL }}|' -i settings.gradle
sed -e 's|NEXUS_URL|${{ secrets.NEXUS_URL }}|' -i build.gradle
./gradlew --no-daemon -PenableCrossCompilerPlugin=true orca-web:installDist -x test
- name: dockerBuildpush
uses: docker/build-push-action@v2
with:
context: .
build-args: |
CUSTOMPLUGIN_RELEASEVERSION=4.0-OPA-failOpen-changes-Nov13New
CUSTOMPLUGIN_RELEASEORG=opsmx
CUSTOMPLUGIN_RELEASEREPO=armory-observability-plugin
CUSTOMPLUGIN_RELEASE_VERSION=1.0.1
file: docker/ubi8/Dockerfile-fips
push: true
tags: |
"${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:${{ steps.build_variables.outputs.VERSION }}-${{ steps.build_variables.outputs.GITHASH }}-${{ steps.build_variables.outputs.BUILDDATE }}"
- name: dockerBuildpushdev
uses: docker/build-push-action@v2
with:
context: .
build-args: |
echo ${{ github.event.inputs.CUSTOMPLUGIN_NAME }}
CUSTOMPLUGIN_RELEASEVERSION=${{ github.event.inputs.CUSTOMPLUGIN_NAME }}
CUSTOMPLUGIN_RELEASEORG=opsmx
CUSTOMPLUGIN_RELEASEREPO=armory-observability-plugin
CUSTOMPLUGIN_RELEASE_VERSION=1.0.1
file: docker/ubi8/Dockerfile-dev
push: true
tags: |
"${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:${{ steps.build_variables.outputs.VERSION }}-${{ steps.build_variables.outputs.GITHASH }}-${{ steps.build_variables.outputs.BUILDDATE }}-dev"