-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
146 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# v1.1.12 | ||
# v3.200.16 | ||
name: Module CI | ||
|
||
on: | ||
|
@@ -11,6 +11,7 @@ on: | |
- 'README.md' | ||
- 'LICENSE' | ||
- '**/argoDeploy.json' | ||
- '**/cloudDeploy.json' | ||
- samples/** | ||
branches: | ||
[master, dev] | ||
|
@@ -23,12 +24,15 @@ on: | |
- 'README.md' | ||
- 'LICENSE' | ||
- '**/argoDeploy.json' | ||
- '**/cloudDeploy.json' | ||
- samples/** | ||
|
||
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 | ||
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-20.04 | ||
env: | ||
CLOUD_INSTANCE_BASE_URL: ${{secrets.CLOUD_INSTANCE_BASE_URL}} | ||
CLIENT_ID: ${{secrets.CLIENT_ID}} | ||
|
@@ -44,6 +48,8 @@ jobs: | |
outputs: | ||
artifactUrl: ${{ steps.artifactUrl.outputs.download_url }} | ||
jira-keys: ${{ steps.jira_keys.outputs.jira-keys }} | ||
version: ${{ steps.artifact_ver.outputs.shortVersion }} | ||
moduleId: ${{ steps.artifact_ver.outputs.moduleId }} | ||
|
||
steps: | ||
|
||
|
@@ -52,7 +58,7 @@ jobs: | |
run: | | ||
echo "RELEASE_STATUS=true" >> $GITHUB_ENV | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
|
@@ -206,13 +212,15 @@ jobs: | |
deploy: | ||
if: ${{ (github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/master') && github.event_name == 'push' }} | ||
needs: ci | ||
runs-on: ubuntu-latest | ||
runs-on: ubuntu-20.04 | ||
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}} | ||
DEPLOYMENT_ENV: 'dev' | ||
SLEEP_TIME: '5m' | ||
ARGO_SERVER: 'argo.govirto.com' | ||
|
||
steps: | ||
- name: Set DEPLOYMENT_ENV variable | ||
|
@@ -246,20 +254,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() | ||
|
@@ -304,3 +311,35 @@ 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.ref == 'refs/heads/dev') && github.event_name == 'push' }} | ||
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 }} | ||
|
||
deploy-cloud-demo: | ||
if: ${{ (github.ref == 'refs/heads/master') && github.event_name == 'push' }} | ||
needs: ci | ||
uses: VirtoCommerce/.github/.github/workflows/[email protected] | ||
with: | ||
releaseSource: module | ||
releaseType: GithubReleases | ||
moduleId: ${{ needs.ci.outputs.moduleId }} | ||
moduleVer: ${{ needs.ci.outputs.version }} | ||
argoServer: 'argo.virtocommerce.cloud' | ||
matrix: '{"include":[{"envName": "prod", "confPath": "cloudDeploy.json"}]}' | ||
secrets: | ||
envPAT: ${{ secrets.REPO_TOKEN }} | ||
argoLogin: ${{ secrets.ARGOCD_LOGIN }} | ||
argoPassword: ${{ secrets.ARGOCD_PASSWORD }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
# v3.200.16 | ||
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/[email protected] | ||
secrets: | ||
sonarToken: ${{ secrets.SONAR_TOKEN }} | ||
|
||
build: | ||
uses: VirtoCommerce/.github/.github/workflows/[email protected] | ||
with: | ||
uploadPackage: 'true' | ||
uploadDocker: 'false' | ||
forceVersionSuffix: 'false' | ||
incrementPatch: ${{ github.event.inputs.incrementPatch }} | ||
secrets: | ||
envPAT: ${{ secrets.REPO_TOKEN }} | ||
|
||
get-metadata: | ||
runs-on: ubuntu-20.04 | ||
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/[email protected] | ||
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-20.04 | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# v3.200.13 | ||
# v3.200.16 | ||
name: Publish nuget | ||
|
||
on: | ||
|
@@ -12,12 +12,12 @@ on: | |
|
||
jobs: | ||
test: | ||
uses: VirtoCommerce/.github/.github/workflows/[email protected].13 | ||
uses: VirtoCommerce/.github/.github/workflows/[email protected].16 | ||
secrets: | ||
sonarToken: ${{ secrets.SONAR_TOKEN }} | ||
|
||
build: | ||
uses: VirtoCommerce/.github/.github/workflows/[email protected].13 | ||
uses: VirtoCommerce/.github/.github/workflows/[email protected].16 | ||
with: | ||
uploadPackage: 'true' | ||
uploadDocker: 'false' | ||
|
@@ -28,7 +28,7 @@ jobs: | |
publish-nuget: | ||
needs: | ||
[build, test] | ||
uses: VirtoCommerce/.github/.github/workflows/[email protected].13 | ||
uses: VirtoCommerce/.github/.github/workflows/[email protected].16 | ||
with: | ||
fullKey: ${{ needs.build.outputs.packageFullKey }} | ||
forceGithub: false | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
# v1.0.0 | ||
# v3.200.16 | ||
name: Release | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
release: | ||
uses: VirtoCommerce/.github/.github/workflows/[email protected] | ||
uses: VirtoCommerce/.github/.github/workflows/[email protected].16 | ||
secrets: | ||
envPAT: ${{ secrets.REPO_TOKEN }} | ||
envPAT: ${{ secrets.REPO_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"$schema": "./build.schema.json", | ||
"Solution": "VirtoCommerce.PricingModule.sln" | ||
} |