Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 64 additions & 9 deletions .github/workflows/module-ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# v3.800.12
# https://virtocommerce.atlassian.net/browse/VCST-2469
# v3.800.18
# https://virtocommerce.atlassian.net/browse/VCST-4078
name: Module CI

on:
Expand Down Expand Up @@ -54,6 +54,8 @@ jobs:
moduleId: ${{ steps.artifact_ver.outputs.moduleId }}
matrix: ${{ steps.deployment-matrix.outputs.matrix }}
run-e2e: ${{ steps.run-e2e.outputs.result }}
run-ui-tests: ${{ steps.run-ui-tests.outputs.result }}
deployment-folder-exists: ${{ steps.check_deployment_folder.outputs.exists }}

steps:

Expand Down Expand Up @@ -91,13 +93,25 @@ jobs:
uses: VirtoCommerce/vc-github-actions/get-image-version@master
id: artifact_ver

- name: Check if .deployment folder exists
id: check_deployment_folder
run: |
if [ -d ".deployment" ]; then
echo "exists=true" >> $GITHUB_OUTPUT
echo "Diagnostic: .deployment folder exists."
else
echo "exists=false" >> $GITHUB_OUTPUT
echo "Diagnostic: .deployment folder does NOT exist."
fi

- name: Set VERSION_SUFFIX variable
run: |
if [ '${{ github.event_name }}' = 'workflow_dispatch' ]; then
echo "VERSION_SUFFIX=${{ steps.artifact_ver.outputs.fullSuffix }}" >> $GITHUB_ENV
else
echo "VERSION_SUFFIX=${{ steps.artifact_ver.outputs.suffix }}" >> $GITHUB_ENV
fi;

- name: Add version suffix
if: ${{ github.ref != 'refs/heads/master' && github.ref != 'refs/heads/main' }}
uses: VirtoCommerce/vc-github-actions/add-version-suffix@master
Expand Down Expand Up @@ -183,14 +197,37 @@ jobs:

- name: Check commit message for version number
id: run-e2e
env:
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
run: |
if [[ "${{ github.event.head_commit.message }}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]];
if [[ "$COMMIT_MESSAGE" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]];
then
echo "result=false" >> $GITHUB_OUTPUT
else
echo "result=true" >> $GITHUB_OUTPUT
fi

- name: Look for xapi module in dependencies
id: run-ui-tests
shell: pwsh
run: |
$manifestFile = Get-ChildItem -Path ${{ github.workspace }} -Recurse -Filter "module.manifest" | Where-Object { $_.FullName -like "*/src/*/module.manifest" } | Select-Object -First 1
if (-not $manifestFile) {
Write-Error "No module.manifest file found in src subdirectories"
exit 1
}
Write-Host "Found module.manifest at: $($manifestFile.FullName)"
$manifestContent = Get-Content $manifestFile.FullName -Raw
$containsXapi = 'false'
$dependecies = $(Select-Xml -Content $manifestContent -XPath "//dependencies").Node.dependency
foreach ($dependency in $dependecies) {
if ($dependency.id -eq 'VirtoCommerce.Xapi') {
Write-Host "Found VirtoCommerce.Xapi in dependencies"
$containsXapi = 'true'
}
}
echo "result=$containsXapi" >> $env:GITHUB_OUTPUT

- name: Setup Git Credentials
if: ${{ (github.ref == 'refs/heads/dev' && github.event_name != 'workflow_dispatch') || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' }}
uses: VirtoCommerce/vc-github-actions/setup-git-credentials-github@master
Expand Down Expand Up @@ -237,17 +274,33 @@ jobs:
run: |
echo "Jira Upload Build Info response: ${{ steps.push_build_info_to_jira.outputs.response }}"

ui-auto-tests:
if: ${{ ((github.ref == 'refs/heads/dev') && (github.event_name == 'push')) ||
(github.event_name == 'workflow_dispatch') || ((github.base_ref == 'dev') && (github.event_name == 'pull_request')) }}
needs: 'ci'
uses: VirtoCommerce/.github/.github/workflows/ui-autotests.yml@v3.800.18
with:
installModules: 'false'
installCustomModule: 'true'
customModuleId: ${{ needs.ci.outputs.moduleId }}
customModuleUrl: ${{ needs.ci.outputs.artifactUrl }}
runTests: ${{ needs.ci.outputs.run-ui-tests }}
vctestingRepoBranch: 'dev'
frontendZipUrl: 'latest'
secrets:
envPAT: ${{ secrets.REPO_TOKEN }}
testSecretEnvFile: ${{ secrets.VC_TESTING_MODULE_ENV_FILE }}

module-katalon-tests:
if: ${{ ((github.ref == 'refs/heads/dev') && (github.event_name == 'push') && (needs.ci.outputs.run-e2e == 'true')) ||
(github.event_name == 'workflow_dispatch') || (github.base_ref == 'dev') && (github.event_name == 'pull_request') }}
needs: 'ci'
uses: VirtoCommerce/.github/.github/workflows/e2e.yml@v3.800.12

uses: VirtoCommerce/.github/.github/workflows/e2e.yml@v3.800.18
with:
katalonRepo: 'VirtoCommerce/vc-quality-gate-katalon'
katalonRepoBranch: 'dev'
testSuite: 'Test Suites/Modules/Platform_collection'
installModules: 'true'
installModules: 'false'
installCustomModule: 'true'
customModuleId: ${{ needs.ci.outputs.moduleId }}
customModuleUrl: ${{ needs.ci.outputs.artifactUrl }}
Expand All @@ -258,9 +311,11 @@ jobs:
katalonApiKey: ${{ secrets.KATALON_API_KEY }}

deploy-cloud:
if: ${{ (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev') && github.event_name == 'push' }}
if: ${{ (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev')
&& github.event_name == 'push'
&& needs.ci.outputs.deployment-folder-exists == 'true'}}
needs: ci
uses: VirtoCommerce/.github/.github/workflows/deploy-cloud.yml@v3.800.12
uses: VirtoCommerce/.github/.github/workflows/deploy-cloud.yml@v3.800.18
with:
releaseSource: module
moduleId: ${{ needs.ci.outputs.moduleId }}
Expand All @@ -269,4 +324,4 @@ jobs:
jiraKeys: ${{ needs.ci.outputs.jira-keys }}
argoServer: 'argo.virtocommerce.cloud'
matrix: '{"include":${{ needs.ci.outputs.matrix }}}'
secrets: inherit
secrets: inherit
12 changes: 6 additions & 6 deletions .github/workflows/module-release-hotfix.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# v3.800.12
# https://virtocommerce.atlassian.net/browse/VCST-2469
# v3.800.18
# https://virtocommerce.atlassian.net/browse/VCST-4078
name: Release hotfix

on:
Expand All @@ -13,12 +13,12 @@ on:

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

build:
uses: VirtoCommerce/.github/.github/workflows/build.yml@v3.800.12
uses: VirtoCommerce/.github/.github/workflows/build.yml@v3.800.18
with:
uploadPackage: 'true'
uploadDocker: 'false'
Expand Down Expand Up @@ -46,7 +46,7 @@ jobs:
publish-github-release:
needs:
[build, test, get-metadata]
uses: VirtoCommerce/.github/.github/workflows/publish-github.yml@v3.800.12
uses: VirtoCommerce/.github/.github/workflows/publish-github.yml@v3.800.18
with:
fullKey: ${{ needs.build.outputs.packageFullKey }}
changeLog: '${{ needs.get-metadata.outputs.changeLog }}'
Expand Down Expand Up @@ -79,4 +79,4 @@ jobs:
vc-build IncrementPatch
git add Directory.Build.props *module.manifest
git commit -m "ci: Auto IncrementPatch"
git push
git push
12 changes: 7 additions & 5 deletions .github/workflows/publish-nugets.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# v3.800.12
# https://virtocommerce.atlassian.net/browse/VCST-2469
# v3.800.18
# https://virtocommerce.atlassian.net/browse/VCST-4078
name: Publish nuget

on:
Expand All @@ -13,12 +13,12 @@ on:

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

build:
uses: VirtoCommerce/.github/.github/workflows/build.yml@v3.800.12
uses: VirtoCommerce/.github/.github/workflows/build.yml@v3.800.18
with:
uploadPackage: 'true'
uploadDocker: 'false'
Expand All @@ -29,10 +29,12 @@ jobs:
publish-nuget:
needs:
[build, test]
uses: VirtoCommerce/.github/.github/workflows/publish-github.yml@v3.800.12
uses: VirtoCommerce/.github/.github/workflows/publish-github.yml@v3.800.18
with:
fullKey: ${{ needs.build.outputs.packageFullKey }}
forceGithub: false
forceBlob: true
secrets:
envPAT: ${{ secrets.GITHUB_TOKEN }}
nugetKey: ${{ secrets.NUGET_KEY }}
BLOB_TOKEN: ${{ secrets.BLOB_TOKEN }}
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# v3.800.12
# https://virtocommerce.atlassian.net/browse/VCST-2469
# v3.800.18
# https://virtocommerce.atlassian.net/browse/VCST-4078
name: Release

on:
workflow_dispatch:

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