diff --git a/.github/workflows/add_closed_at_field.yml b/.github/workflows/add_closed_at_field.yml index c75d6c82c0..8d85310d02 100644 --- a/.github/workflows/add_closed_at_field.yml +++ b/.github/workflows/add_closed_at_field.yml @@ -11,7 +11,7 @@ jobs: name: Update closed_at issue field runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v5 - uses: monry/actions-get-project-item-id@v2 with: github-token: ${{ secrets.UUI_CI_SECRET }} diff --git a/.github/workflows/add_created_at_field.yml b/.github/workflows/add_created_at_field.yml index 2091bde484..aeb1c608fb 100644 --- a/.github/workflows/add_created_at_field.yml +++ b/.github/workflows/add_created_at_field.yml @@ -11,7 +11,7 @@ jobs: name: Update created_at issue field runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v5 - uses: monry/actions-get-project-item-id@v2 with: github-token: ${{ secrets.UUI_CI_SECRET }} diff --git a/.github/workflows/base.yml b/.github/workflows/base.yml index 206c931df5..a3747dd0b1 100644 --- a/.github/workflows/base.yml +++ b/.github/workflows/base.yml @@ -13,9 +13,6 @@ on: image-name: required: true type: string - git-version-mode: - required: true - type: string env: required: true type: string @@ -53,12 +50,12 @@ jobs: VALUES_FILE: ${{ inputs.values-file }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: fetch-depth: 0 - - uses: actions/setup-node@v4 + - uses: actions/setup-node@v5 with: - node-version: '20.x' + node-version: '22.x' cache: 'yarn' cache-dependency-path: | **/yarn.lock @@ -80,7 +77,7 @@ jobs: - name: Authenticate to Cloud id: auth - uses: 'google-github-actions/auth@v2' + uses: 'google-github-actions/auth@v3' with: token_format: access_token project_id: ${{ secrets.PROJECT_ID }} @@ -88,7 +85,7 @@ jobs: service_account: ${{ secrets.WFI_SA }} - name: Login to artifactory - uses: docker/login-action@v3 + uses: docker/login-action@v4 with: registry: ${{ secrets.ARTIFACTORY_REGISTRY_URL }} username: ${{ secrets.ARTIFACTORY_AUTH2_USER }} @@ -96,7 +93,7 @@ jobs: - name: Docker meta id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v6 with: # list of Docker images to use as base name for tags images: | @@ -107,11 +104,11 @@ jobs: type=sha - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v4 - name: Build and push id: docker_build - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v7 with: context: ./ file: ./Dockerfile @@ -119,26 +116,25 @@ jobs: # Image will be tagged with all tags from "Docker meta" step tags: ${{ steps.meta.outputs.tags }} - # install Gitversion to obtain semver version - - name: Install GitVersion - uses: gittools/actions/gitversion/setup@v0.9.15 - with: - versionSpec: '5.8.3' - # need to updated - - name: Version determination - id: gitversion - uses: gittools/actions/gitversion/execute@v0.9.15 - with: - additionalArguments: ${{ inputs.git-version-mode }} - useConfigFile: true - configFilePath: GitVersion.yml + - name: Determine version + id: version + run: | + SHORT_SHA=$(echo "${GITHUB_SHA}" | cut -c1-7) + LATEST_TAG=$(git tag --sort=-version:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | head -1) + MAJOR=$(echo $LATEST_TAG | sed 's/^v//' | cut -d. -f1) + MINOR=$(echo $LATEST_TAG | sed 's/^v//' | cut -d. -f2) + echo "shortSha=${SHORT_SHA}" >> $GITHUB_OUTPUT + echo "major=${MAJOR}" >> $GITHUB_OUTPUT + echo "minor=${MINOR}" >> $GITHUB_OUTPUT - name: Install Helm - uses: azure/setup-helm@v3 + uses: azure/setup-helm@v5 with: version: v3.8.0 - name: Preparation and Helm chart packaging + env: + GITVERSION_SHORTSHA: ${{ steps.version.outputs.shortSha }} run: | echo ${{ steps.auth.outputs.access_token }} | helm registry login ${{ secrets.ARTIFACTORY_REGISTRY_URL }} --username ${{ secrets.ARTIFACTORY_AUTH2_USER }} --password-stdin mkdir helmchart && cd ./helmchart # helm cannot untar file to the repo with the same name as a package. To avoid error we create temp folder @@ -147,6 +143,9 @@ jobs: sed -i -e "s/tag: latest/tag: sha-${GITVERSION_SHORTSHA}/g" ${{ secrets.BASE_HELMCHART_NAME }}/${VALUES_FILE} - name: Packaging and Uploading Helm Chart + env: + GITVERSION_MAJOR: ${{ steps.version.outputs.major }} + GITVERSION_MINOR: ${{ steps.version.outputs.minor }} run: | cd ./helmchart # workaround to avoid Helm chart versioning issues diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index 380b687854..df5b8fb7be 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -27,5 +27,4 @@ jobs: values-file: values.dev.yaml # TODO: After migrating prod environment we can use the same image name for prod and non-prod image-name: ui-dev - git-version-mode: '' env: 'dev' diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 73475ab9f2..5606169140 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -17,10 +17,10 @@ jobs: runs-on: ubuntu-24.04 if: github.event.pull_request.draft == false steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 + - uses: actions/checkout@v5 + - uses: actions/setup-node@v5 with: - node-version: '20.x' + node-version: '22.x' cache: 'yarn' cache-dependency-path: | **/yarn.lock diff --git a/.github/workflows/prod.yml b/.github/workflows/prod.yml index 0eba833993..22b97f8e8b 100644 --- a/.github/workflows/prod.yml +++ b/.github/workflows/prod.yml @@ -32,5 +32,4 @@ jobs: values-file: values.prod.yaml # TODO: After migrating prod environment we can use the same image name for prod and non-prod image-name: ui - git-version-mode: '' env: 'prod' \ No newline at end of file diff --git a/.github/workflows/qa.yml b/.github/workflows/qa.yml index 72d8d13bf1..14b02975ae 100644 --- a/.github/workflows/qa.yml +++ b/.github/workflows/qa.yml @@ -27,5 +27,4 @@ jobs: values-file: values.qa.yaml # TODO: After migrating prod environment we can use the same image name for prod and non-prod image-name: ui-qa - git-version-mode: '' env: 'qa' diff --git a/.github/workflows/qualityGate.yml b/.github/workflows/qualityGate.yml index ec7feebc3a..5b5793be84 100644 --- a/.github/workflows/qualityGate.yml +++ b/.github/workflows/qualityGate.yml @@ -32,21 +32,21 @@ jobs: # By default, it checks out the "merge-commit" for "pull_request" events (https://github.com/actions/checkout) # I.e. the result of merging source branch to the target branch will be checked out. - name: 'Checkout the "merge commit" branch' - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: path: ${{ env.MERGE_COMMIT_BRANCH_DIR }} # Checkout the TARGET branch. - name: 'Checkout "target" branch' - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: ref: ${{ github.event.pull_request.base.ref }} repository: ${{ github.event.pull_request.base.repo.full_name }} path: ${{ env.TARGET_BRANCH_DIR }} - - uses: actions/setup-node@v4 + - uses: actions/setup-node@v5 with: - node-version: '20.x' + node-version: '22.x' cache: 'yarn' cache-dependency-path: | ${{ env.TARGET_BRANCH_DIR }}/yarn.lock diff --git a/.github/workflows/qualityGateCommentPR.yml b/.github/workflows/qualityGateCommentPR.yml index 89519a8975..bbc5253712 100644 --- a/.github/workflows/qualityGateCommentPR.yml +++ b/.github/workflows/qualityGateCommentPR.yml @@ -103,12 +103,12 @@ jobs: # Update comment: track-bundle-size # - id: prevCommentId - uses: peter-evans/find-comment@v2 + uses: peter-evans/find-comment@v3 with: issue-number: ${{ steps.readPrNumber.outputs.result }} comment-author: '${{env.COMMENT_AUTHOR}}' body-includes: '${{env.COMMENT_TAG}}' - - uses: peter-evans/create-or-update-comment@v3 + - uses: peter-evans/create-or-update-comment@v4 with: comment-id: ${{ steps.prevCommentId.outputs.comment-id }} issue-number: ${{ steps.readPrNumber.outputs.result }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 68b88d8182..39bd98ef7c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,13 +23,13 @@ jobs: # No need to run this job on "pull_request" from main UUI repo, because it's guaranteed it's already run on "push" event. if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != 'epam/UUI' || github.event_name == 'push' runs-on: ubuntu-latest - container: node:18 + container: node:22 steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 + - uses: actions/checkout@v5 + - uses: actions/setup-node@v5 with: - node-version: '20.x' + node-version: '22.x' cache: 'yarn' cache-dependency-path: | **/yarn.lock diff --git a/GitVersion.yml b/GitVersion.yml deleted file mode 100644 index 382fa786d2..0000000000 --- a/GitVersion.yml +++ /dev/null @@ -1,47 +0,0 @@ -# see https://gitversion.net/docs/reference/configuration#branch-configuration -assembly-versioning-scheme: MajorMinorPatch -mode: ContinuousDeployment -next-version: 5.10.0 -increment: Patch -branches: - master: - regex: ^main$ - mode: ContinuousDeployment - tag: '' - increment: Patch - prevent-increment-of-merged-branch-version: false - track-merge-target: true - is-release-branch: false - develop: - regex: ^develop$ - mode: ContinuousDeployment - tag: 'dev' - increment: Patch - prevent-increment-of-merged-branch-version: false - track-merge-target: true - tracks-release-branches: true - is-release-branch: false - qa: - regex: ^feature.* - mode: ContinuousDeployment - tag: 'qa' - increment: Patch - source-branches: [ 'develop', 'main' ] - prevent-increment-of-merged-branch-version: false - track-merge-target: false - tracks-release-branches: false - is-release-branch: false - others: - regex: ^fix.*|^bug.* - mode: ContinuousDeployment - tag: 'fe' - increment: Inherit - prevent-increment-of-merged-branch-version: false - track-merge-target: false - source-branches: [ 'develop', 'main' ] - tracks-release-branches: false - is-release-branch: false - is-mainline: false -ignore: - commits-before: 2024-08-01T00:30:00 -merge-message-formats: {}