Skip to content

Commit

Permalink
Merge branch 'release/3.201.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
vc-ci committed Aug 12, 2022
2 parents 510f0b3 + b3d241c commit b10bb5e
Show file tree
Hide file tree
Showing 13 changed files with 217 additions and 129 deletions.
4 changes: 2 additions & 2 deletions .deployment/module/argoDeploy.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"deployBranch": "dev",
"environmentId": "dev",
"environmentName": "Development",
"environmentType": "development",
"environmentType": "staging",
"environmentUrl": "https://vcplatform-platform.dev.govirto.com/"
},
"qa": {
Expand All @@ -20,7 +20,7 @@
},
"prod": {
"deployAppName": "vcplatform-demo",
"deployBranch": "master",
"deployBranch": "demo",
"environmentId": "prod",
"environmentName": "Demo",
"environmentType": "production",
Expand Down
16 changes: 16 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Common settings

.github/* @mvktsk @Vectorfield4
.gitignore @mvktsk @Vectorfield4
.dockerignore @mvktsk @Vectorfield4

# Main Code and Tests

src/* @VirtoCommerce/platform
tests/* @VirtoCommerce/platform
.editorconfig @VirtoCommerce/platform
3rd-party-components.md @VirtoCommerce/platform
VirtoCommerce.Platform.sln @VirtoCommerce/platform

# Docs
docs/* @zashchitnik-kuka
89 changes: 54 additions & 35 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# v1.1.10
# v1.1.13
name: Module CI

on:
Expand Down Expand Up @@ -42,8 +42,9 @@ jobs:
RELEASE_STATUS: 'false'

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

steps:

Expand All @@ -52,39 +53,30 @@ jobs:
run: |
echo "RELEASE_STATUS=true" >> $GITHUB_ENV
- name: Set up JDK 11 for dotnet-sonarscanner #Sonar stop accepting Java versions less than 11
uses: actions/setup-java@v1
with:
java-version: 1.11

- uses: actions/checkout@v2
with:
fetch-depth: 0

- uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'

- name: Install VirtoCommerce.GlobalTool
run: dotnet tool install --global VirtoCommerce.GlobalTool --version 2.1.0-alpha.17
uses: VirtoCommerce/vc-github-actions/setup-vcbuild@master

- name: Install dotnet-sonarscanner
run: dotnet tool install --global dotnet-sonarscanner

- name: Get changelog
- name: Get Changelog
id: changelog
uses: VirtoCommerce/vc-github-actions/changelog-generator@master

- name: Get Image Version
- name: Get Artifact Version
uses: VirtoCommerce/vc-github-actions/get-image-version@master
id: image
id: artifact_ver

- name: Set VERSION_SUFFIX variable
run: |
if [ '${{ github.event_name }}' = 'workflow_dispatch' ]; then
echo "VERSION_SUFFIX=${{ steps.image.outputs.fullSuffix }}" >> $GITHUB_ENV
echo "VERSION_SUFFIX=${{ steps.artifact_ver.outputs.fullSuffix }}" >> $GITHUB_ENV
else
echo "VERSION_SUFFIX=${{ steps.image.outputs.suffix }}" >> $GITHUB_ENV
echo "VERSION_SUFFIX=${{ steps.artifact_ver.outputs.suffix }}" >> $GITHUB_ENV
fi;
- name: Add version suffix
if: ${{ github.ref != 'refs/heads/master' }}
Expand Down Expand Up @@ -140,9 +132,19 @@ jobs:

- name: Publish Github Release
if: ${{ github.ref == 'refs/heads/master' }}
id: githubRelease
with:
changelog: ${{ steps.changelog.outputs.changelog }}
uses: VirtoCommerce/vc-github-actions/publish-github-release@master

- name: Set artifactUrl value
id: artifactUrl
run: |
if [ '${{ github.ref }}' = 'refs/heads/master' ]; then
echo ::set-output name=download_url::${{ steps.githubRelease.outputs.downloadUrl }}
else
echo ::set-output name=download_url::${{ steps.blobRelease.outputs.packageUrl }}
fi;
- name: Setup Git Credentials
if: ${{ (github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/master') && github.event_name != 'workflow_dispatch' }}
Expand All @@ -163,10 +165,10 @@ jobs:
githubToken: ${{ secrets.REPO_TOKEN }}
login: ${{ secrets.VIRTOCOMMERCE_APP_ID }}
password: ${{ secrets.VIRTOCOMMERCE_SECRET }}
moduleId: ${{ steps.image.outputs.moduleId }}
moduleDescription: ${{ steps.image.outputs.moduleDescription }}
projectUrl: ${{ steps.image.outputs.projectUrl }}
iconUrl: ${{ steps.image.outputs.iconUrl }}
moduleId: ${{ steps.artifact_ver.outputs.moduleId }}
moduleDescription: ${{ steps.artifact_ver.outputs.moduleDescription }}
projectUrl: ${{ steps.artifact_ver.outputs.projectUrl }}
iconUrl: ${{ steps.artifact_ver.outputs.iconUrl }}

- name: Parse Jira Keys from All Commits
uses: VirtoCommerce/vc-github-actions/get-jira-keys@master
Expand Down Expand Up @@ -203,7 +205,7 @@ jobs:
echo "Jira Upload Build Info response: ${{ steps.push_build_info_to_jira.outputs.response }}"
deploy:
if: ${{ github.event_name != 'pull_request' && github.event_name != 'workflow_dispatch' }}
if: ${{ (github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/master') && github.event_name == 'push' }}
needs: ci
runs-on: ubuntu-latest
env:
Expand All @@ -212,6 +214,8 @@ jobs:
CLIENT_ID: ${{secrets.CLIENT_ID}}
CLIENT_SECRET: ${{secrets.CLIENT_SECRET}}
DEPLOYMENT_ENV: 'dev'
SLEEP_TIME: '5m'
ARGO_SERVER: 'argo.govirto.com'

steps:
- name: Set DEPLOYMENT_ENV variable
Expand Down Expand Up @@ -245,20 +249,19 @@ jobs:
forceCommit: 'true'
cmPath: ${{ steps.deployConfig.outputs.cmPath }}

- name: Sleep for ${{ env.SLEEP_TIME }}
run: sleep ${{ env.SLEEP_TIME }}
shell: bash

- 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)
uses: VirtoCommerce/vc-github-actions/vc-argocd-cli@master
timeout-minutes: 10
id: argocd-cli
with:
server: ${{env.ARGO_SERVER}}
username: ${{ secrets.ARGOCD_LOGIN }}
password: ${{ secrets.ARGOCD_PASSWORD }}
command: app wait ${{ steps.deployConfig.outputs.deployAppName }}

- name: DEPLOY_STATE::successful
if: success()
Expand Down Expand Up @@ -303,3 +306,19 @@ jobs:
environment-id: ${{ steps.deployConfig.outputs.environmentId }}
environment-display-name: ${{ steps.deployConfig.outputs.environmentName }}
environment-type: ${{ steps.deployConfig.outputs.environmentType }}

module-katalon-tests:
if: ${{ github.event_name == 'pull_request' }}
needs: 'ci'
uses: VirtoCommerce/.github/.github/workflows/e2e.yml@main
with:
katalonRepo: 'VirtoCommerce/vc-quality-gate-katalon'
katalonRepoBranch: 'dev'
testSuite: 'Test Suites/Modules/Platform_collection'
installModules: 'true'
installCustomModule: 'true'
customModuleId: ${{ needs.ci.outputs.moduleId }}
customModuleUrl: ${{ needs.ci.outputs.artifactUrl }}
secrets:
envPAT: ${{ secrets.REPO_TOKEN }}
katalonApiKey: ${{ secrets.KATALON_API_KEY }}
37 changes: 37 additions & 0 deletions .github/workflows/publish-nugets.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# v3.200.13
name: Publish nuget

on:
workflow_dispatch:
inputs:
publishAlpha:
description: 'Publish nuget as alpha version.'
required: true
default: true
type: boolean

jobs:
test:
uses: VirtoCommerce/.github/.github/workflows/test-and-sonar.yml@v3.200.13
secrets:
sonarToken: ${{ secrets.SONAR_TOKEN }}

build:
uses: VirtoCommerce/.github/.github/workflows/build.yml@v3.200.13
with:
uploadPackage: 'true'
uploadDocker: 'false'
forceVersionSuffix: ${{ github.event.inputs.publishAlpha }}
secrets:
envPAT: ${{ secrets.REPO_TOKEN }}

publish-nuget:
needs:
[build, test]
uses: VirtoCommerce/.github/.github/workflows/publish-github.yml@v3.200.13
with:
fullKey: ${{ needs.build.outputs.packageFullKey }}
forceGithub: false
secrets:
envPAT: ${{ secrets.GITHUB_TOKEN }}
nugetKey: ${{ secrets.NUGET_KEY }}
61 changes: 0 additions & 61 deletions .github/workflows/publish_nugets.yml

This file was deleted.

78 changes: 78 additions & 0 deletions .github/workflows/release-hotfix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# v3.200.12
name: Release hotfix

on:
workflow_dispatch:
inputs:
incrementPatch:
description: 'Increment patch version.'
required: true
default: true
type: boolean

jobs:
test:
uses: VirtoCommerce/.github/.github/workflows/test-and-sonar.yml@v3.200.12
secrets:
sonarToken: ${{ secrets.SONAR_TOKEN }}

build:
uses: VirtoCommerce/.github/.github/workflows/build.yml@v3.200.12
with:
uploadPackage: 'true'
uploadDocker: 'false'
forceVersionSuffix: 'false'
incrementPatch: ${{ github.event.inputs.incrementPatch }}
secrets:
envPAT: ${{ secrets.REPO_TOKEN }}

get-metadata:
runs-on: ubuntu-latest
outputs:
changelog: ${{ steps.changelog.outputs.changelog }}
steps:

- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Get Changelog
id: changelog
uses: VirtoCommerce/vc-github-actions/changelog-generator@master

publish-github-release:
needs:
[build, test, get-metadata]
uses: VirtoCommerce/.github/.github/workflows/publish-github.yml@v3.200.12
with:
fullKey: ${{ needs.build.outputs.packageFullKey }}
changeLog: '${{ needs.get-metadata.outputs.changeLog }}'
incrementPatch: ${{ github.event.inputs.incrementPatch }}

secrets:
envPAT: ${{ secrets.GITHUB_TOKEN }}
nugetKey: ${{ secrets.NUGET_KEY }}

increment-version:
needs:
[publish-github-release]
if: ${{ github.event.inputs.incrementPatch == 'true' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install VirtoCommerce.GlobalTool
uses: VirtoCommerce/vc-github-actions/setup-vcbuild@master

- name: Setup Git Credentials
uses: VirtoCommerce/vc-github-actions/setup-git-credentials-github@master
with:
githubToken: ${{ secrets.REPO_TOKEN }}

- name: Increment Version
run: |
vc-build IncrementPatch
git add Directory.Build.props *module.manifest
git commit -m "ci: Auto IncrementPatch"
git push
11 changes: 11 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# v1.0.0
name: Release

on:
workflow_dispatch:

jobs:
release:
uses: VirtoCommerce/.github/.github/workflows/release.yml@v3.200.12
secrets:
envPAT: ${{ secrets.REPO_TOKEN }}
Loading

0 comments on commit b10bb5e

Please sign in to comment.