diff --git a/.github/workflows/release_build.yml b/.github/workflows/release_build.yml index 8e9c92a..6c019a4 100644 --- a/.github/workflows/release_build.yml +++ b/.github/workflows/release_build.yml @@ -12,6 +12,9 @@ on: default: 'v4.0-custom2' required: true type: string +env: + GRADLE_OPTS: -Dorg.gradle.daemon=false -Xmx6g -Xms6g + CONTAINER_REGISTRY: quay.io/opsmxpublic jobs: publish-plugin: @@ -122,3 +125,64 @@ jobs: push: true tags: | "${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:${{ steps.build_variables.outputs.VERSION }}-dev" + + + + build-gate: + runs-on: ubuntu-latest + needs: [publish-plugin] + if: always() + steps: + - name: Checkout OpsMx gate repo + uses: actions/checkout@v3 + with: + repository: opsmx/gate-oes + ref: refs/heads/OES-1.30.1 + - 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 Build number is ${{ github.run_number }} + + echo git tag is ${GITHUB_REF#refs/*/} + echo ::set-output name=REPO::ubi8-gate-cve + echo ::set-output name=VERSION::"$(git rev-parse --short HEAD)-$(date --utc +'%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: ./gradlew --no-daemon -PenableCrossCompilerPlugin=true gate-web:installDist -x test + + - name: dockerBuildpush + uses: docker/build-push-action@v2 + with: + context: . + build-args: | + CUSTOMPLUGIN_RELEASEVERSION=${{ inputs.release }} + file: docker/ubi8/Dockerfile-fips + push: true + tags: | + "${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:${{ steps.build_variables.outputs.VERSION }}" + - name: dockerBuildpushdev + uses: docker/build-push-action@v2 + with: + context: . + build-args: | + CUSTOMPLUGIN_RELEASEVERSION=${{ inputs.release }} + file: docker/ubi8/Dockerfile-dev + push: true + tags: | + "${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:${{ steps.build_variables.outputs.VERSION }}-dev"