Skip to content

Commit

Permalink
Merge pull request #124 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 3, 2024
2 parents cfb5de8 + 319e8a0 commit e8c0a06
Show file tree
Hide file tree
Showing 57 changed files with 1,564 additions and 1,094 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.

13 changes: 7 additions & 6 deletions .github/workflows/dockerhub-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Retag RC Docker image
on:
pull_request_review:
types: [submitted]
workflow_dispatch:

env:
AWS_REGION: ${{ vars.AWS_REGION }} # set this to your preferred AWS region, e.g. us-west-1
Expand All @@ -14,7 +15,7 @@ env:

jobs:
retag-image:
name: Retag and push image
name: Retag and push image
runs-on: ubuntu-latest
environment: rc
if: github.event.pull_request.base.ref == 'master' || github.event.pull_request.base.ref == 'main'
Expand All @@ -35,21 +36,21 @@ jobs:
uses: aws-actions/amazon-ecr-login@v1
with:
mask-password: 'true'

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.REGESTRY_USERNAME }}
password: ${{ secrets.REGESTRY_PASSWORD }}

- name: Create variables
id: vars
run: |
echo "tag=$(echo '${{ github.event.pull_request.title }}' | sed -nE 's/.*([0-9]+\.[0-9]+\.[0-9]+).*/\1/p')" >> $GITHUB_OUTPUT
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

Expand All @@ -59,7 +60,7 @@ jobs:
IMAGE_TAG: ${{ steps.vars.outputs.tag }}
run: |
docker buildx imagetools create $ECR_REGISTRY/$ECR_REPOSITORY:latest --tag $TARGET_REGISTRY/$TARGET_REPOSITORY:$IMAGE_TAG --tag $TARGET_REGISTRY/$TARGET_REPOSITORY:latest
- name: Summarize
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/java-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
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
with:
java-version: '21'
4 changes: 2 additions & 2 deletions .github/workflows/manually-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up JDK 11
- name: Set up JDK 21
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '11'
java-version: '21'

- name: Grant execute permission for gradlew
run: chmod +x gradlew
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up JDK 11
- name: Set up JDK 21
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '11'
java-version: '21'

- name: Grant execute permission for gradlew
run: chmod +x gradlew
Expand Down
8 changes: 2 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
FROM gradle:6.8.3-jdk11 AS build
FROM --platform=$BUILDPLATFORM gradle:8.4.0-jdk21 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

# For ARM build use flag: `--platform linux/arm64`
FROM --platform=$BUILDPLATFORM amazoncorretto:11.0.20
FROM --platform=$BUILDPLATFORM amazoncorretto:21.0.1
LABEL version=${APP_VERSION} description="EPAM Report portal. Jobs Service" maintainer="Andrei Varabyeu <[email protected]>, Hleb Kanonik <[email protected]>"
ARG APP_VERSION=${APP_VERSION}
ENV APP_DIR=/usr/app
Expand Down
26 changes: 13 additions & 13 deletions Jenkinsfile-candidate
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
#!groovy
properties([
parameters ([
string(
name: "VERSION",
defaultValue: "",
description: "Release candidate version tag"
),
string(
name: "BRANCH",
defaultValue: "",
description: "Specify the GitHub branch from which the image will be built"
)
])
properties([
parameters([
string(
name: "VERSION",
defaultValue: "",
description: "Release candidate version tag"
),
string(
name: "BRANCH",
defaultValue: "",
description: "Specify the GitHub branch from which the image will be built"
)
])
])

node {
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# service-jobs

ReportPortal cron jobs
Loading

0 comments on commit e8c0a06

Please sign in to comment.