-
Notifications
You must be signed in to change notification settings - Fork 3
127 lines (121 loc) · 4.44 KB
/
gate-orca-build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
name: Branch build gate orca
on:
workflow_dispatch:
inputs:
release:
description: 'Release_name to create Tag'
default: 'v4.0-custom2'
required: true
type: string
env:
GRADLE_OPTS: -Dorg.gradle.daemon=false -Xmx6g -Xms6g
CONTAINER_REGISTRY: quay.io/opsmxpublic
jobs:
build-orca:
runs-on: ubuntu-latest
if: always()
steps:
- name: Checkout OpsMx orca repo
uses: actions/checkout@v3
with:
repository: opsmx/orca-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 ::set-output name=REPO::ubi8-orca-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 orca-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"
build-gate:
runs-on: ubuntu-latest
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"