Skip to content

Commit

Permalink
Merge pull request #4000 from reportportal/rc/5.12.0
Browse files Browse the repository at this point in the history
Release 5.12.0
  • Loading branch information
maria-hambardzumian authored Sep 19, 2024
2 parents 05bde71 + 2543d24 commit f3a0937
Show file tree
Hide file tree
Showing 651 changed files with 28,976 additions and 18,506 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @AmsterGet @Vadim73i
* @AmsterGet @BlazarQSO @maria-hambardzumian
16 changes: 16 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
## PR Checklist

* [ ] Have you verified that the PR is pointing to the correct target branch? (`develop` for features/bugfixes, other if mentioned in the task)
* [ ] Have you verified that your branch is consistent with the target branch and has no conflicts? (if not, make a rebase under the target branch)
* [ ] Have you checked that everything works within the branch according to the task description and tested it locally?
* [ ] Have you run the linter (`npm run lint`) prior to submission? Enable the git hook on commit in your IDE to run it and format the code automatically.
* [ ] Have you run the tests locally and added/updated them if needed?
* [ ] Have you checked that app can be built (`npm run build`)?
* [ ] Have you made sure that all the necessary pipelines has been successfully completed?
* [ ] If the task requires translations to be updated, have you done this by running the `manage:translations` script?

## Visuals

<!-- OPTIONAL
Provide the visual proof (screenshot/gif/video) of your work
-->
40 changes: 40 additions & 0 deletions .github/workflows/build-revision-image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build revision Docker image

on:
workflow_dispatch:
inputs:
version:
description: 'Release version'
required: true

jobs:
variables-setup:
name: Setting variables for docker build
runs-on: ubuntu-latest
environment: rc
steps:
- name: Create variables
id: vars
run: |
echo "platforms=${{ vars.BUILD_PLATFORMS }}" >> $GITHUB_OUTPUT
echo "version=${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT
echo "tag=${{ github.event.inputs.version }}" >> $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 }}
additional-tag: 'latest'
build-platforms: ${{ needs.variables-setup.outputs.platforms }}
version: ${{ needs.variables-setup.outputs.version }}
date: ${{ needs.variables-setup.outputs.date }}
secrets: inherit
12 changes: 7 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [14]
node: [20]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup NodeJS
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}

Expand All @@ -38,10 +38,12 @@ jobs:
NODE_OPTIONS: '--max_old_space_size=2048'

run: |
npm --prefix ${{ env.UI_BUILD_REACT }} ci
npm --prefix ${{ env.UI_BUILD_REACT }} ci --legacy-peer-deps
npm --prefix ${{ env.UI_BUILD_REACT }} run lint
npm --prefix ${{ env.UI_BUILD_REACT }} run test:coverage
npm --prefix ${{ env.UI_BUILD_REACT }} run build
- name: Codecov report
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
89 changes: 89 additions & 0 deletions .github/workflows/dockerhub-release-revision.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: Retag RC Docker image (revision)

on:
workflow_dispatch:

env:
AWS_REGION: ${{ vars.AWS_REGION }} # set this to your preferred AWS region, e.g. us-west-1
ECR_REPOSITORY: ${{ vars.ECR_REPOSITORY }} # set this to your Amazon ECR repository name
TARGET_REGISTRY: ${{ vars.TARGET_REGISTRY }} # set to target registry (DockerHub, GitHub & etc)
TARGET_REPOSITORY: ${{ vars.TARGET_REPOSITORY }} # set to target repository
PLATFORMS: ${{ vars.BUILD_PLATFORMS }} # set target build platforms. By default linux/amd64
RELEASE_MODE: ${{ vars.RELEASE_MODE }}

jobs:
retag-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'
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Get the latest git tag
id: get_version
uses: oprypin/find-latest-tag@v1
with:
repository: ${{ github.repository }}
releases-only: true

- name: Get next Docker version
id: next_version
run: |
DOCKER_IMAGE_NAME="${{ github.repository }}"
INPUT_VERSION=${{ steps.get_version.outputs.tag }}
TAGS_JSON=$(curl -s "https://hub.docker.com/v2/repositories/${DOCKER_IMAGE_NAME}/tags/?page_size=1000")
LATEST_REVISION_NUMBER=$(echo "$TAGS_JSON" | jq -r --arg INPUT_VERSION "$INPUT_VERSION" '.results[] | select(.name | startswith($INPUT_VERSION+"-r")) | .name' | awk -F-r '{print $2}' | sort -nr | head -n1)
if [[ -z "$LATEST_REVISION_NUMBER" ]]; then
NEXT_VERSION="$INPUT_VERSION-r1"
else
NEXT_VERSION="$INPUT_VERSION-r$(($LATEST_REVISION_NUMBER + 1))"
fi
echo $NEXT_VERSION
echo "tag=$NEXT_VERSION" >> $GITHUB_OUTPUT
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
# role-to-assume: arn:aws:iam::123456789012:role/my-github-actions-role
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ env.AWS_REGION }}

- name: Login to Amazon ECR
id: login-ecr
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: Set up QEMU
uses: docker/setup-qemu-action@v2

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

- name: Retag and Push Docker Image
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
IMAGE_TAG: ${{ steps.next_version.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 }}
IMAGE_TAG: ${{ steps.next_version.outputs.tag }}
run: |
echo "## General information about the build:" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "- :whale: Docker image: $TARGET_REGISTRY/$TARGET_REPOSITORY:$IMAGE_TAG" >> $GITHUB_STEP_SUMMARY
echo "- :octocat: The commit SHA from which the build was performed: [$GITHUB_SHA](https://github.com/$GITHUB_REPOSITORY/commit/$GITHUB_SHA)" >> $GITHUB_STEP_SUMMARY
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ jobs:
- name: Setup NodeJS
uses: actions/setup-node@v3
with:
node-version: '14.19.1'
node-version: '20.11.0'

- name: JS Build
env:
NODE_OPTIONS: '--max_old_space_size=2048'

run: |
npm --prefix ${{ env.UI_BUILD_REACT }} ci
npm --prefix ${{ env.UI_BUILD_REACT }} ci --legacy-peer-deps
npm --prefix ${{ env.UI_BUILD_REACT }} run lint
npm --prefix ${{ env.UI_BUILD_REACT }} run test:coverage
npm --prefix ${{ env.UI_BUILD_REACT }} run build
Expand All @@ -58,7 +58,7 @@ jobs:
- name: Tag release
id: tagRelease
run: |
git tag -a v${{ github.event.inputs.version }} -m 'Release ${{ github.event.inputs.version }}'
git tag -a ${{ github.event.inputs.version }} -m 'Release ${{ github.event.inputs.version }}'
git push --tags
- name: Create Release
Expand All @@ -67,7 +67,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ github.event.inputs.version }}
tag_name: ${{ github.event.inputs.version }}
release_name: Release ${{ github.event.inputs.version }}
draft: false
prerelease: false
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/sync-jira-versions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Add GitHub release version to Jira issues

on:
pull_request:
types: [opened, synchronize, reopened]

jobs:
call-jira-sync:
name: Call Jira versions update
uses: reportportal/.github/.github/workflows/update-jira-versions.yaml@main
with:
jira-server: ${{ vars.JIRA_SERVER }}
secrets: inherit
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ ARG BUILD_BRANCH
ARG BUILD_DATE
RUN echo {\"build\": { \"version\": \"${APP_VERSION}\", \"branch\": \"${BUILD_BRANCH}\", \"build_date\": \"${BUILD_DATE}\", \"name\": \"Service UI\", \"repo\": \"reportportal/service-ui\"}} > ./app/build/buildInfo.json

FROM --platform=$BUILDPLATFORM node:18.20.4-alpine3.20 AS build-frontend
FROM --platform=$BUILDPLATFORM node:20-alpine AS build-frontend
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY ./app/ /usr/src/app/
RUN export NODE_OPTIONS="--max-old-space-size=4096"
RUN npm ci && npm run build
RUN npm ci --legacy-peer-deps && npm run build

FROM --platform=$BUILDPLATFORM nginxinc/nginx-unprivileged:alpine

Expand Down
9 changes: 5 additions & 4 deletions app/.prettierrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"arrowParens": "always",
"singleQuote": true,
"trailingComma": "all",
"printWidth": 100
"arrowParens": "always",
"singleQuote": true,
"trailingComma": "all",
"printWidth": 100,
"endOfLine": "auto"
}
4 changes: 2 additions & 2 deletions app/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

## Installation

For local development, you need a [node.js](https://nodejs.org)(minimum required version 12, recommended - 14).
For local development, you need a [node.js](https://nodejs.org)(version 20 is recommended).

To launch the development environment, follow these steps:

1. open console from the project root
2. run the command `cd app`
3. run the command `npm install`
3. run the command `npm install --legacy-peer-deps`
4. to proxy requests to the server, create `.env` file in `app` folder

```
Expand Down
7 changes: 6 additions & 1 deletion app/jestsetup.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import 'raf/polyfill';
import React from 'react';
import { configure } from 'enzyme';
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
import Adapter from '@cfaester/enzyme-adapter-react-18';
import * as Utils from './src/common/utils';

configure({ adapter: new Adapter() });
Expand All @@ -28,6 +28,11 @@ global.JEST = true;
global.localStorage = (() => {
let store = {};

// eslint-disable-next-line global-require
const { TextEncoder, TextDecoder } = require('util');
global.TextEncoder = TextEncoder;
global.TextDecoder = TextDecoder;

return {
getItem(key) {
return store[key] || null;
Expand Down
2 changes: 1 addition & 1 deletion app/localization/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
export const config = {
messagesDirectory: 'localization/messages',
translationsDirectory: 'localization/translated/',
languages: ['uk', 'ru', 'be', 'zh'],
languages: ['uk', 'ru', 'be', 'zh', 'es'],
};
Loading

0 comments on commit f3a0937

Please sign in to comment.