Skip to content

Commit

Permalink
Merge pull request #3472 from reportportal/hotfix/5.8.0
Browse files Browse the repository at this point in the history
Release 5.8.0
  • Loading branch information
AmsterGet authored May 16, 2023
2 parents 1a85f5e + 9e0110b commit f997423
Show file tree
Hide file tree
Showing 320 changed files with 3,373 additions and 5,796 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Build
on:
push:
branches:
- '*'
- '**'
- '!master'
paths-ignore:
- readme.md
Expand All @@ -23,7 +23,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [11, 12]
node: [12]

steps:
- uses: actions/checkout@v2
Expand Down
26 changes: 4 additions & 22 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ env:
UI_BUILD_REACT: 'app/'
RELEASE_DIR: 'release'
UI_ARTIFACT_NAME: 'ui.tar.gz'
VERSION_PLACEHOLDER: '{{.version}}'
DOCKER_TEMPLATE_FILE: 'docker/DockerfileTmpl'
DOCKER_BUILD_FILE: 'Dockerfile'
BUILD_INFO_FILE: 'buildInfo.json'

jobs:
Expand Down Expand Up @@ -43,7 +40,7 @@ jobs:
- name: Generate Build info
run: |
echo '{"build": { "version": "${{ github.event.inputs.version }}", "branch": "${{ github.sha }}", "build_date": "${{ env.BUILD_DATE }}", "name": "Service UI", "repo": "${{ github.repository }}"}}' > ./${{ env.UI_BUILD_REACT }}build/${{ env.BUILD_INFO_FILE }}
echo '{"build": { "version": "${{ github.event.inputs.version }}", "branch": "${{ github.ref_name }}-${{ github.sha }}", "build_date": "${{ env.BUILD_DATE }}", "name": "Service UI", "repo": "${{ github.repository }}"}}' > ./${{ env.UI_BUILD_REACT }}build/${{ env.BUILD_INFO_FILE }}
- name: Create release directory
run: mkdir -v ${{ github.workspace }}/${{ env.RELEASE_DIR }}
Expand All @@ -58,19 +55,10 @@ jobs:
email: 'support@reportportal.io'
token: ${{ secrets.GITHUB_TOKEN }}

- name: Update Dockerfile
id: dockerfileUpdate
run: |
sed 's/${{ env.VERSION_PLACEHOLDER }}/${{ github.event.inputs.version }}/g' ${{ env.DOCKER_TEMPLATE_FILE }} > ${{ env.DOCKER_BUILD_FILE }}
git add ${{ env.DOCKER_BUILD_FILE }}
export CHANGED=`git status | grep ${{ env.DOCKER_BUILD_FILE }} | xargs`
[ -z "${CHANGED}" ] || git commit -m "Dockerfile update"
git push
- name: Tag release
id: tagRelease
run: |
git tag -a ${{ github.event.inputs.version }} -m 'Release ${{ github.event.inputs.version }}'
git tag -a v${{ github.event.inputs.version }} -m 'Release ${{ github.event.inputs.version }}'
git push --tags
- name: Create Release
Expand All @@ -95,16 +83,10 @@ jobs:
asset_name: ${{ env.UI_ARTIFACT_NAME }}
asset_content_type: application/gzip

- name: Bump version
uses: HardNorth/github-version-generate@v1.1.0
with:
version: ${{ github.event.inputs.version }}-SNAPSHOT
next-version-increment-patch: true

- name: Commit version
run: |
echo ${{ env.NEXT_VERSION }} > ${{ github.workspace }}/VERSION
echo ${{ github.event.inputs.version }} > ${{ github.workspace }}/VERSION
git add ${{ github.workspace }}/VERSION
export CHANGED=`git status | grep VERSION | xargs`
[ -z "${CHANGED}" ] || git commit -m 'Bump new snapshot version'
[ -z "${CHANGED}" ] || git commit -m 'Commit version'
git push
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ build/
*.iws
*.log
.vscode
.devcontainer

coverage

Expand Down
7 changes: 0 additions & 7 deletions .releaser.yml

This file was deleted.

28 changes: 22 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,30 @@
FROM nginx:alpine
# Only for technical/build aims, built image will be with nginxinc/nginx-unprivileged:alpine according to the last step

LABEL maintainer="Andrei Varabyeu <andrei_varabyeu@epam.com>"
LABEL version=5.7.4
FROM alpine:latest AS generate-build-info
RUN mkdir -p /usr/src/app/build
WORKDIR /usr/src
ARG version
ARG branch
ARG build_date
RUN echo {\"build\": { \"version\": \"${version}\", \"branch\": \"${branch}\", \"build_date\": \"${build_date}\", \"name\": \"Service UI\", \"repo\": \"reportportal/service-ui\"}} > ./app/build/buildInfo.json

ENV APP_DOWNLOAD_URL https://github.com/reportportal/service-ui/releases/download/v5.7.4
FROM node:12-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 lint && npm run test:coverage && npm run build

ADD ${APP_DOWNLOAD_URL}/ui.tar.gz /
FROM nginxinc/nginx-unprivileged:alpine

USER root

COPY --from=build-frontend /usr/src/app/build /usr/share/nginx/html
COPY --from=generate-build-info /usr/src/app/build /usr/share/nginx/html

RUN tar -zxvf ui.tar.gz -C /usr/share/nginx/html && rm -f ui.tar.gz
RUN rm /etc/nginx/conf.d/default.conf
COPY nginx.conf /etc/nginx/nginx.conf

USER $UID

EXPOSE 8080
24 changes: 0 additions & 24 deletions Dockerfile-full

This file was deleted.

13 changes: 0 additions & 13 deletions Dockerfile-k8s

This file was deleted.

7 changes: 5 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ node {
sh """
MAJOR_VER=\$(cat VERSION)
BUILD_VER="\${MAJOR_VER}-${env.BUILD_NUMBER}"
make IMAGE_NAME=reportportal-dev/service-ui build-image-dev v=\$BUILD_VER
IMAGE_NAME='reportportal-dev/service-ui'
COMMIT_SHA=\$(git rev-parse HEAD | git hash-object --stdin)
BUILD_DATE=\$(date +%FT%T%z)
docker build -t \$IMAGE_NAME --build-arg version=\$BUILD_VER --build-arg build_date=\$BUILD_DATE --build-arg branch=\$BRANCH-\$COMMIT_SHA .
"""
}
}
Expand All @@ -32,7 +35,7 @@ node {
}
}
}

stage('Cleanup') {
withEnv(["AWS_URI=${AWS_URI}"]) {
sh 'docker rmi $AWS_URI/service-ui:SNAPSHOT-$BUILD_NUMBER'
Expand Down
29 changes: 0 additions & 29 deletions Jenkinsfile-Release

This file was deleted.

12 changes: 9 additions & 3 deletions Jenkinsfile-candidate
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,19 @@ node {
stage('Checkout') {
checkout scm
}

stage('Build Docker Image') {
withEnv(["NODE_OPTIONS=--max_old_space_size=4096", "AWS_URI=${AWS_URI}"]) {
sh 'make IMAGE_NAME=$AWS_URI/service-ui:$VERSION-RC-$BUILD_NUMBER build-image-dev v=$VERSION-RC-$BUILD_NUMBER'
sh """
BUILD_VER=$VERSION-RC-$BUILD_NUMBER
IMAGE_NAME=$AWS_URI/service-ui:\$BUILD_VER
COMMIT_SHA=\$(git rev-parse HEAD | git hash-object --stdin)
BUILD_DATE=\$(date +%FT%T%z)
docker build -t \$IMAGE_NAME --build-arg version=\$VERSION --build-arg build_date=\$BUILD_DATE --build-arg branch=\$BRANCH-\$COMMIT_SHA .
"""
}
}

stage('Push to ECR') {
withEnv(["AWS_URI=${AWS_URI}", "AWS_REGION=${AWS_REGION}", "TAG=${VERSION}"]) {
def image = env.AWS_URI + '/service-ui:' + env.TAG + '-RC-' + env.BUILD_NUMBER
Expand Down
62 changes: 0 additions & 62 deletions Makefile

This file was deleted.

1 change: 1 addition & 0 deletions app/.slignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ vendor*.js
runtime*.js
inline*.js
**/polyfills*.js
**/*.spec.js
Loading

0 comments on commit f997423

Please sign in to comment.