Skip to content

Commit

Permalink
Merge branch 'release/3.25.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
akak1977 committed Sep 22, 2021
2 parents 964b10d + 02db9ed commit dfa4595
Show file tree
Hide file tree
Showing 13 changed files with 249 additions and 54 deletions.
6 changes: 6 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
## Description

## References
### QA-test:
### Jira-link:
### Artifact URL:
39 changes: 20 additions & 19 deletions .github/workflows/deploy-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,25 @@ jobs:
GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }}

steps:
- name: Read deployment config
if: contains(github.event.pull_request.labels.*.name, 'deploy-qa')
uses: VirtoCommerce/vc-github-actions/get-deploy-param@master
id: deployConfig

- name: Read deployment config
if: contains(github.event.pull_request.labels.*.name, 'deploy-dev')
uses: VirtoCommerce/vc-github-actions/get-deploy-param@master
id: deployConfig
- name: Gets artifact link
if: contains(github.event.pull_request.labels.*.name, 'deploy-qa')
uses: VirtoCommerce/vc-github-actions/get-artifact-link@master
id: artifactLink
with:
downloadComment: 'Artifact URL:'

- name: Gets artifact link
if: contains(github.event.pull_request.labels.*.name, 'deploy-dev')
uses: VirtoCommerce/vc-github-actions/get-artifact-link@master
id: artifactLink

- name: Create deploy PR in DEV
if: github.event.action != 'closed' && contains(github.event.pull_request.labels.*.name, 'deploy-dev')
uses: VirtoCommerce/vc-github-actions/create-deploy-pr@master
with:
deployRepo: ${{ steps.deployConfig.outputs.deployRepo }}
deployBranch: ${{ fromJSON(steps.deployConfig.outputs.deployConfig).dev.deployBranch }}
artifactKey: ${{ steps.deployConfig.outputs.artifactKey }}
artifactUrl: ${{ steps.artifactLink.outputs.artifactUrl }}
taskNumber: ${{ steps.artifactLink.outputs.qaTaskNumber }}
cmPath: ${{ steps.deployConfig.outputs.cmPath }}
- name: Create deploy PR in QA
if: github.event.action != 'closed' && contains(github.event.pull_request.labels.*.name, 'deploy-qa')
uses: VirtoCommerce/vc-github-actions/create-deploy-pr@master
with:
deployRepo: ${{ steps.deployConfig.outputs.deployRepo }}
deployBranch: ${{ fromJSON(steps.deployConfig.outputs.deployConfig).qa.deployBranch }}
artifactKey: ${{ steps.deployConfig.outputs.artifactKey }}
artifactUrl: ${{ steps.artifactLink.outputs.artifactUrl }}
taskNumber: ${{ steps.artifactLink.outputs.qaTaskNumber }}
cmPath: ${{ steps.deployConfig.outputs.cmPath }}
170 changes: 154 additions & 16 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# v1.1.4
# v1.1.7
name: Module CI

on:
Expand All @@ -23,13 +23,22 @@ on:

jobs:
ci:
if: ${{ github.actor != 'dependabot[bot]' && (github.event.pull_request.head.repo.full_name == github.repository || github.event.pull_request.head.repo.full_name == '') }} # Check that PR not from forked repo and not from Dependabot
runs-on: ubuntu-latest
env:
CLOUD_INSTANCE_BASE_URL: ${{secrets.CLOUD_INSTANCE_BASE_URL}}
CLIENT_ID: ${{secrets.CLIENT_ID}}
CLIENT_SECRET: ${{secrets.CLIENT_SECRET}}
SONAR_TOKEN: ${{secrets.SONAR_TOKEN}}
GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }}
NUGET_KEY: ${{ secrets.NUGET_KEY }}
BLOB_SAS: ${{ secrets.BLOB_TOKEN }}
VERSION_SUFFIX: ""
VERSION_SUFFIX: ''
BUILD_STATE: 'failed'

outputs:
artifactUrl: ${{ steps.blobRelease.outputs.packageUrl }}
jira-keys: ${{ steps.jira_keys.outputs.jira-keys }}

steps:

Expand All @@ -38,11 +47,6 @@ jobs:
with:
java-version: 1.11

- name: Set up .net Core 3.1.x for vc-build #GitHib Actions migrates to .net Core 5.x. To vc-build work properly need to manually install .net Core 3.1.x
uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.x'

- uses: actions/checkout@v2
with:
fetch-depth: 0
Expand Down Expand Up @@ -99,12 +103,19 @@ jobs:
uses: VirtoCommerce/vc-github-actions/publish-nuget@master

- name: Publish to Blob
if: ${{ github.ref == 'refs/heads/dev' || (github.event_name == 'workflow_dispatch' && github.ref != 'refs/heads/master') }}
if: ${{ github.ref == 'refs/heads/dev' || github.event_name == 'pull_request' || (github.event_name == 'workflow_dispatch' && github.ref != 'refs/heads/master') }}
id: blobRelease
uses: VirtoCommerce/vc-github-actions/publish-blob-release@master
with:
blobSAS: ${{ secrets.BLOB_TOKEN }}


- name: Add link to PR
if: ${{ github.event_name == 'pull_request' }}
uses: VirtoCommerce/vc-github-actions/publish-artifact-link@master
with:
artifactUrl: ${{ steps.blobRelease.outputs.packageUrl }}
downloadComment: 'Artifact URL:'

- name: Publish Github Release
if: ${{ github.ref == 'refs/heads/master' }}
with:
Expand Down Expand Up @@ -134,11 +145,138 @@ jobs:
moduleDescription: ${{ steps.image.outputs.moduleDescription }}
projectUrl: ${{ steps.image.outputs.projectUrl }}
iconUrl: ${{ steps.image.outputs.iconUrl }}

- name: Invoke Module deployment workflow
if: ${{ github.ref == 'refs/heads/master' }}
uses: benc-uk/workflow-dispatch@v1

- name: Parse Jira Keys from All Commits
uses: VirtoCommerce/vc-github-actions/get-jira-keys@master
if: always()
id: jira_keys
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Print all environment variables
run: env

- name: Push Build Info to Jira
if: ${{ env.CLOUD_INSTANCE_BASE_URL != 0 && env.CLIENT_ID != 0 && env.CLIENT_SECRET != 0 && steps.jira_keys.outputs.jira-keys != '' && always() }}
id: push_build_info_to_jira
uses: HighwayThree/jira-upload-build-info@master
with:
workflow: VC deployment
token: ${{ secrets.REPO_TOKEN }}
inputs: '{ "artifactUrl": "https://github.com/${{ github.repository }}/releases/download/${{ steps.image.outputs.shortVersion }}/${{ steps.image.outputs.moduleId }}_${{ steps.image.outputs.shortVersion }}.zip", "deployBranch": "dev" }'
cloud-instance-base-url: '${{ secrets.CLOUD_INSTANCE_BASE_URL }}'
client-id: '${{ secrets.CLIENT_ID }}'
client-secret: '${{ secrets.CLIENT_SECRET }}'
pipeline-id: '${{ github.repository }} ${{ github.workflow }}'
build-number: ${{ github.run_number }}
build-display-name: 'Workflow: ${{ github.workflow }} (#${{ github.run_number }})'
build-state: '${{ env.BUILD_STATE }}'
build-url: '${{github.event.repository.url}}/actions/runs/${{github.run_id}}'
update-sequence-number: '${{ github.run_id }}'
last-updated: '${{github.event.head_commit.timestamp}}'
issue-keys: '${{ steps.jira_keys.outputs.jira-keys }}'
commit-id: '${{ github.sha }}'
repo-url: '${{ github.event.repository.url }}'
build-ref-url: '${{ github.event.repository.url }}/actions/runs/${{ github.run_id }}'

- name: Confirm Jira Build Output
if: success()
run: |
echo "Jira Upload Build Info response: ${{ steps.push_build_info_to_jira.outputs.response }}"
deploy:
if: ${{ github.ref == 'refs/heads/dev' && github.event_name != 'workflow_dispatch' }}
needs: ci
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }}
CLOUD_INSTANCE_BASE_URL: ${{secrets.CLOUD_INSTANCE_BASE_URL}}
CLIENT_ID: ${{secrets.CLIENT_ID}}
CLIENT_SECRET: ${{secrets.CLIENT_SECRET}}

steps:

- name: Read deployment config
uses: VirtoCommerce/vc-github-actions/get-deploy-param@master
id: deployConfig
with:
envName: 'dev'

- name: Start deployment
uses: bobheadxi/deployments@master
id: deployment
with:
step: start
token: ${{ secrets.GITHUB_TOKEN }}
env: Development
no_override: false

- name: Update deployment-cm
uses: VirtoCommerce/vc-github-actions/create-deploy-pr@master
with:
deployRepo: ${{ steps.deployConfig.outputs.deployRepo }}
deployBranch: ${{ steps.deployConfig.outputs.deployBranch }}
artifactKey: ${{ steps.deployConfig.outputs.artifactKey }}
artifactUrl: ${{ needs.ci.outputs.artifactUrl }}
taskNumber: 'undefined'
forceCommit: 'true'
cmPath: ${{ steps.deployConfig.outputs.cmPath }}

- name: Wait for environment is up
shell: pwsh
timeout-minutes: 15
run: |
do {
Start-Sleep -s 15
$statusBage = (Invoke-WebRequest -Uri "https://argo.govirto.com/api/badge?name=${{ steps.deployConfig.outputs.deployAppName }}").Content
$syncedAndHealthy = $statusBage.Contains('>Healthy<') -and $statusBage.Contains('>Synced<')
if (-not $syncedAndHealthy) {
Write-Host "Sync pending..."
}
}
while (-not $syncedAndHealthy)
- name: DEPLOY_STATE::successful
if: success()
run: echo "DEPLOY_STATE=successful" >> $GITHUB_ENV

- name: DEPLOY_STATE::failed
if: failure()
run: echo "DEPLOY_STATE=failed" >> $GITHUB_ENV

- name: Update GitHub deployment status
uses: bobheadxi/deployments@master
if: always()
with:
step: finish
token: ${{ secrets.GITHUB_TOKEN }}
status: ${{ job.status }}
deployment_id: ${{ steps.deployment.outputs.deployment_id }}

- name: Print all environment variables
run: env

- name: Push Deployment Info to Jira
if: ${{ env.CLOUD_INSTANCE_BASE_URL != 0 && env.CLIENT_ID != 0 && env.CLIENT_SECRET != 0 && needs.ci.outputs.jira-keys != '' && always() }}
id: push_deployment_info_to_jira
uses: HighwayThree/jira-upload-deployment-info@master
env:
CLOUD_INSTANCE_BASE_URL: ${{secrets.CLOUD_INSTANCE_BASE_URL}}
CLIENT_ID: ${{secrets.CLIENT_ID}}
CLIENT_SECRET: ${{secrets.CLIENT_SECRET}}
with:
cloud-instance-base-url: ${{ secrets.CLOUD_INSTANCE_BASE_URL }}
client-id: ${{ secrets.CLIENT_ID }}
client-secret: ${{ secrets.CLIENT_SECRET }}
deployment-sequence-number: ${{ github.run_id }}
update-sequence-number: ${{ github.run_id }}
issue-keys: ${{ needs.ci.outputs.jira-keys }}
display-name: ${{ steps.deployConfig.outputs.deployAppName }}
url: 'https://vcplatform-platform.dev.govirto.com/'
description: 'Deployment to the Development environment'
last-updated: '${{github.event.head_commit.timestamp}}'
state: '${{ env.DEPLOY_STATE }}'
pipeline-id: '${{ github.repository }} ${{ github.workflow }}'
pipeline-display-name: 'Workflow: ${{ github.workflow }} (#${{ github.run_number }})'
pipeline-url: '${{github.event.repository.html_url}}/actions/runs/${{github.run_id}}'
environment-id: 'development'
environment-display-name: 'Dev'
environment-type: 'development'
54 changes: 54 additions & 0 deletions .github/workflows/msteams.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Send message to Teams (regression PR)

on:
pull_request:
branches:
[regression]

jobs:
notify:
runs-on: ubuntu-latest
steps:

- name: Send a message to Microsoft Teams
uses: VirtoCommerce/vc-github-actions/msteams-send-message@master
with:
body: '{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"themeColor": "0076D7",
"summary": "On ${{github.repository}} repository",
"sections": [
{
"activityTitle": "Regression PR created/updated",
"activitySubtitle": "By [${{ github.event.pull_request.user.login }}](${{ github.event.pull_request.user.url }}) on **[${{github.repository}}](${{github.server_url}}/${{github.repository}})** repository",
"activityImage":"${{ github.event.pull_request.user.avatar_url }}",
"facts": [
{
"name": "Repository",
"value": "[${{github.repository}}](${{github.server_url}}/${{github.repository}})"
},
{
"name": "Pull request",
"value": "[${{ github.event.pull_request.number }}](${{ github.event.pull_request._links.html.href }})"
},
{
"name": "Pull request title",
"value": "${{ github.event.pull_request.title }}"
}
],
"markdown": true
}
],
"potentialAction": [ {
"@type": "OpenUri",
"name": "View Pull Request",
"targets": [{
"os": "default",
"uri": "${{ github.event.pull_request._links.html.href }}"
}]
}]
}' # the body of the message
webhook_uri: ${{ secrets.PLATFORM_TEAMS_URI }}
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?><Project>
<!-- These properties will be shared for all projects -->
<PropertyGroup>
<VersionPrefix>3.24.0</VersionPrefix>
<VersionPrefix>3.25.0</VersionPrefix>
<VersionSuffix>
</VersionSuffix>
<VersionSuffix Condition=" '$(VersionSuffix)' != '' AND '$(BuildNumber)' != '' ">$(VersionSuffix)-$(BuildNumber)</VersionSuffix>
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Licensed under the Virto Commerce Open Software License (the "License"); you
may not use this file except in compliance with the License. You may
obtain a copy of the License at

<http://virtocommerce.com/opensourcelicense>
<http://virtocommerce.com/open-source-license>

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
Expand Down
4 changes: 2 additions & 2 deletions docs/add-new-assignment.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
## Simple Assignment without rules and conditions

1. The user selects **Price List** on the Price Lists screen and clicks on the **Assignments widget**
![Price list](/docs/media/screen-price-lists.png)
![Price list](media/screen-price-lists.png)
1. The system opens a new screen with an active **Add** button that enables the user to add a new Assignment to the selected Price List
1. The user clicks the **Add** button and the system opens the **New Price List Assignment** screen. The screen will display the following elements:
1. Assignment Name input field - required
Expand All @@ -33,7 +33,7 @@
![New price list assignment](media/screen-new-price-list-assignment.png)
1. The system will create an assignment without additional rules and conditions
1. The system will display the number of assignments created in the Assignment widget
![Assignment](/docs/media/screen-assignment.png)
![Assignment](media/screen-assignment.png)

## Assignment with Rules and Conditions

Expand Down
2 changes: 1 addition & 1 deletion docs/export-functionality.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The user can start the data export by filtering/selecting data and going to gene

The user can either select all the price lists available from the list as shown below:

![Start Export](screen-start-export.png)
![Start Export](media/screen-start-export.png)

![Export Prices](media/screen-export-prices.png)

Expand Down
2 changes: 1 addition & 1 deletion docs/managing-pricing-module-settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ Allows to view and edit simple settings

Indexing is a function that enables including the Pricing module into the global system of platform indexing. This functionality allows product re-indexing after changing the product price.
The Index content can be viewed on **Search Index details** screen. In order to access this screen, the user should open the **Physical item details** screen and select the **Indexed** widget
![Physical item details](/docs/media/screen-physical-item-details.png)
![Physical item details](media/screen-physical-item-details.png)
2 changes: 2 additions & 0 deletions src/VirtoCommerce.PricingModule.Core/ModuleConstants.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using VirtoCommerce.Platform.Core.Settings;

namespace VirtoCommerce.PricingModule.Core
{
[ExcludeFromCodeCoverage]
public static class ModuleConstants
{
public static class Security
Expand Down
Loading

0 comments on commit dfa4595

Please sign in to comment.