Skip to content

Commit

Permalink
Merge pull request #297 from reportportal/rc/5.11.0
Browse files Browse the repository at this point in the history
Release 5.11.0
  • Loading branch information
pbortnik authored Mar 1, 2024
2 parents 9df3dcb + cd578ae commit 659f08e
Show file tree
Hide file tree
Showing 25 changed files with 251 additions and 499 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/build-dev-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build develop Docker image

on:
push:
branches:
- develop
paths-ignore:
- '.github/**'
- README.md

jobs:
variables-setup:
name: Setting variables for docker build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Create variables
id: vars
run: |
echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
outputs:
date: ${{ steps.vars.outputs.date }}

call-docker-build:
name: Call develop Docker build
needs: variables-setup
uses: reportportal/.github/.github/workflows/build-docker-image.yaml@main
with:
aws-region: ${{ vars.AWS_REGION }}
image-tag: 'develop-${{ github.run_number }}'
version: 'develop-${{ github.run_number }}'
date: ${{ needs.variables-setup.outputs.date }}
secrets: inherit
37 changes: 37 additions & 0 deletions .github/workflows/build-feature-image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Build feature Docker image

on:
pull_request:
types: [opened, synchronize, reopened]
branches:
- 'develop'

jobs:
variables-setup:
name: Setting variables for docker build
runs-on: ubuntu-latest
if: (!startsWith(github.head_ref, 'rc/') || !startsWith(github.head_ref, 'hotfix/') || !startsWith(github.head_ref, 'master') || !startsWith(github.head_ref, 'main'))
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Create variables
id: vars
run: |
echo "tag=$(echo ${{ github.head_ref }}-${{ github.run_number }} | tr '/' '-')" >> $GITHUB_OUTPUT
echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
outputs:
tag: ${{ steps.vars.outputs.tag }}
date: ${{ steps.vars.outputs.date }}

call-docker-build:
name: Call feature Docker build
needs: variables-setup
uses: reportportal/.github/.github/workflows/build-docker-image.yaml@main
with:
aws-region: ${{ vars.AWS_REGION }}
image-tag: ${{ needs.variables-setup.outputs.tag }}
version: ${{ needs.variables-setup.outputs.tag }}
branch: ${{ github.head_ref }}
date: ${{ needs.variables-setup.outputs.date }}
secrets: inherit
43 changes: 43 additions & 0 deletions .github/workflows/build-rc-image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Build RC Docker image

on:
push:
branches:
- "rc/*"
- "hotfix/*"

jobs:
variables-setup:
name: Setting variables for docker build
runs-on: ubuntu-latest
environment: rc
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Create variables
id: vars
run: |
echo "platforms=${{ vars.BUILD_PLATFORMS }}" >> $GITHUB_OUTPUT
echo "version=$(echo '${{ github.ref_name }}' | sed -nE 's/.*([0-9]+\.[0-9]+\.[0-9]+).*/\1/p')" >> $GITHUB_OUTPUT
echo "tag=$(echo ${{ github.ref_name }}-${{ github.run_number }} | tr '/' '-')" >> $GITHUB_OUTPUT
echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
outputs:
platforms: ${{ steps.vars.outputs.platforms }}
version: ${{ steps.vars.outputs.version }}
tag: ${{ steps.vars.outputs.tag }}
date: ${{ steps.vars.outputs.date }}

call-docker-build:
name: Call release candidate Docker build
needs: variables-setup
uses: reportportal/.github/.github/workflows/build-docker-image.yaml@main
with:
aws-region: ${{ vars.AWS_REGION }}
image-tag: ${{ needs.variables-setup.outputs.tag }}
release-mode: true
additional-tag: 'latest'
build-platforms: ${{ needs.variables-setup.outputs.platforms }}
version: ${{ needs.variables-setup.outputs.version }}
date: ${{ needs.variables-setup.outputs.date }}
secrets: inherit
40 changes: 0 additions & 40 deletions .github/workflows/build.yml

This file was deleted.

22 changes: 22 additions & 0 deletions .github/workflows/java-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Java checks

on:
pull_request:
types: [opened, synchronize, reopened]
paths-ignore:
- '.github/**'
- README.md
- gradle.properties
push:
branches:
- master
- develop
paths-ignore:
- '.github/**'
- README.md
- gradle.properties

jobs:
call-java-cheks:
name: Call Java checks
uses: reportportal/.github/.github/workflows/java-checks.yaml@main
93 changes: 0 additions & 93 deletions .github/workflows/rc.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:

env:
GH_USER_NAME: github.actor
RELEASE_VERSION: 5.10.0
RELEASE_VERSION: 5.11.0

jobs:
release:
Expand Down
6 changes: 1 addition & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
FROM gradle:6.8.3-jdk11 AS build
FROM --platform=$BUILDPLATFORM gradle:6.8.3-jdk11 AS build
ARG RELEASE_MODE
ARG APP_VERSION
ARG GITHUB_USER
ARG GITHUB_TOKEN
WORKDIR /usr/app
COPY . /usr/app
RUN if [ "${RELEASE_MODE}" = true ]; then \
gradle build --exclude-task test \
-PreleaseMode=true \
-PgithubUserName=${GITHUB_USER} \
-PgithubToken=${GITHUB_TOKEN} \
-Dorg.gradle.project.version=${APP_VERSION}; \
else gradle build --exclude-task test -Dorg.gradle.project.version=${APP_VERSION}; fi

Expand Down
Loading

0 comments on commit 659f08e

Please sign in to comment.