Compare commits
13 Commits
final1
...
8c7b4b5b1b
| Author | SHA1 | Date | |
|---|---|---|---|
| 8c7b4b5b1b | |||
| ac8829e417 | |||
| 44a12848a4 | |||
| 314dc872cc | |||
| 91eac576a5 | |||
| eb3206bbfc | |||
| fff78aa6b2 | |||
| f5787b5a9f | |||
| 16231c1d55 | |||
| 98511aaa46 | |||
| 1bd7e2c7ab | |||
| 070fa3c928 | |||
| 71c68f7533 |
@@ -21,38 +21,38 @@ runs:
|
|||||||
- name: Argo Login
|
- name: Argo Login
|
||||||
uses: clowdhaus/argo-cd-action/@main
|
uses: clowdhaus/argo-cd-action/@main
|
||||||
with:
|
with:
|
||||||
version: 2.13.3
|
version: 3.1.3
|
||||||
command: login
|
command: login
|
||||||
options: ${{ vars.ARGO_HOST }} --username ${{ vars.ARGO_USER }} --password ${{ fromJSON(inputs.secrets).ARGO_PASSWORD }}
|
options: ${{ vars.ARGO_HOST }} --username ${{ vars.ARGO_USER }} --password ${{ fromJSON(inputs.secrets).ARGO_PASSWORD }}
|
||||||
- name: Change tag name
|
- name: Change tag name
|
||||||
uses: clowdhaus/argo-cd-action/@main
|
uses: clowdhaus/argo-cd-action/@main
|
||||||
with:
|
with:
|
||||||
version: 2.13.3
|
version: 3.1.3
|
||||||
command: app set ${{ inputs.environment }} --parameter images.${{github.event.repository.name}}=${{ inputs.tag }}
|
command: app set ${{ inputs.environment }} --parameter images.${{github.event.repository.name}}=${{ inputs.tag }}
|
||||||
- name: Sync changes
|
- name: Sync changes
|
||||||
if: ${{ inputs.migrate == 'true' }}
|
if: ${{ inputs.migrate == 'true' }}
|
||||||
uses: clowdhaus/argo-cd-action/@main
|
uses: clowdhaus/argo-cd-action/@main
|
||||||
with:
|
with:
|
||||||
version: 2.13.3
|
version: 3.1.3
|
||||||
command: app sync ${{ inputs.environment }} --resource apps:Deployment:${{github.event.repository.name}}
|
command: app sync ${{ inputs.environment }} --resource apps:Deployment:${{github.event.repository.name}}
|
||||||
- name: Migrate
|
- name: Migrate
|
||||||
if: ${{ inputs.migrate == 'true' }}
|
if: ${{ inputs.migrate == 'true' }}
|
||||||
uses: clowdhaus/argo-cd-action/@main
|
uses: clowdhaus/argo-cd-action/@main
|
||||||
with:
|
with:
|
||||||
version: 2.13.3
|
version: 3.1.3
|
||||||
command: app actions run ${{ inputs.environment }} migrate --kind Deployment --resource-name ${{github.event.repository.name}}
|
command: app actions run ${{ inputs.environment }} migrate --kind Deployment --resource-name ${{github.event.repository.name}}
|
||||||
- name: Sync changes
|
- name: Sync changes
|
||||||
uses: clowdhaus/argo-cd-action/@main
|
uses: clowdhaus/argo-cd-action/@main
|
||||||
with:
|
with:
|
||||||
version: 2.13.3
|
version: 3.1.3
|
||||||
command: app sync ${{ inputs.environment }} --resource 'apps:Deployment:*'
|
command: app sync ${{ inputs.environment }} --resource 'apps:Deployment:*'
|
||||||
- name: Refresh secret
|
- name: Refresh secret
|
||||||
uses: clowdhaus/argo-cd-action/@main
|
uses: clowdhaus/argo-cd-action/@main
|
||||||
with:
|
with:
|
||||||
version: 2.13.3
|
version: 3.1.3
|
||||||
command: app actions run ${{ inputs.environment }} refresh --kind ExternalSecret --resource-name vault-${{github.event.repository.name}}
|
command: app actions run ${{ inputs.environment }} refresh --kind ExternalSecret --resource-name vault-${{github.event.repository.name}}
|
||||||
- name: Restart service
|
- name: Restart service
|
||||||
uses: clowdhaus/argo-cd-action/@main
|
uses: clowdhaus/argo-cd-action/@main
|
||||||
with:
|
with:
|
||||||
version: 2.13.3
|
version: 3.1.3
|
||||||
command: app actions run ${{ inputs.environment }} restart --kind Deployment --resource-name ${{github.event.repository.name}}
|
command: app actions run ${{ inputs.environment }} restart --kind Deployment --resource-name ${{github.event.repository.name}}
|
||||||
@@ -19,12 +19,13 @@ inputs:
|
|||||||
runs:
|
runs:
|
||||||
using: 'composite'
|
using: 'composite'
|
||||||
steps:
|
steps:
|
||||||
- uses: mattermost/action-mattermost-notify@master
|
- uses: dosymep/vk-teams-action@v1.0.0
|
||||||
env:
|
env:
|
||||||
icons: '{"success" : ":white_check_mark:", "failure": ":x:", "canceled": ":facepalm:", "started": ":warning:"}'
|
ICONS: '{"success":"✅","failure":"❌","canceled":"🤦","started":"⚠️"}'
|
||||||
with:
|
with:
|
||||||
MATTERMOST_WEBHOOK_URL: ${{ fromJSON(inputs.secrets).MM_WEBHOOK_URL }}
|
token: ${{ fromJSON(inputs.secrets).VK_TEAMS_BOT_TOKEN }}
|
||||||
PAYLOAD: |
|
to: ${{ fromJSON(inputs.secrets).VK_TEAMS_CHAT_ID }}
|
||||||
{
|
format: MarkdownV2
|
||||||
"text": "${{ github.repository }} [${{inputs.name}}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_number }}) was ${{ inputs.result }} by ${{ github.event.sender.login}} ${{ fromJson(env.icons)[inputs.result]}}"
|
message: |
|
||||||
}
|
${{ github.repository }} \[${{inputs.name}}\]\(${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_number }}\) was ${{ inputs.result }} by ${{ github.event.sender.login }} ${{ fromJson(env.ICONS)[inputs.result] }}
|
||||||
|
|
||||||
|
|||||||
10
.github/workflows/deploy.yaml
vendored
10
.github/workflows/deploy.yaml
vendored
@@ -30,17 +30,7 @@ jobs:
|
|||||||
CR_REPO: ${{ github.event.repository.name }}
|
CR_REPO: ${{ github.event.repository.name }}
|
||||||
TAG: ${{ inputs.tag }}
|
TAG: ${{ inputs.tag }}
|
||||||
steps:
|
steps:
|
||||||
- name: deploy
|
|
||||||
if: inputs.environment == 'prod' || inputs.environment == 'demo'
|
|
||||||
uses: https://bb.hublab.ru/HUB/workflows/.gitea/actions/deploy@HEAD
|
|
||||||
with:
|
|
||||||
secrets: ${{ toJSON(secrets) }}
|
|
||||||
environment: ${{ inputs.environment }}
|
|
||||||
tag: ${{ inputs.tag }}
|
|
||||||
migrate: ${{ inputs.migrate }}
|
|
||||||
host: ${{ inputs.host }}
|
|
||||||
- name: deploy k8s
|
- name: deploy k8s
|
||||||
if: inputs.environment == 'stage'
|
|
||||||
uses: https://bb.hublab.ru/HUB/workflows/.gitea/actions/k8s@HEAD
|
uses: https://bb.hublab.ru/HUB/workflows/.gitea/actions/k8s@HEAD
|
||||||
with:
|
with:
|
||||||
secrets: ${{ toJSON(secrets) }}
|
secrets: ${{ toJSON(secrets) }}
|
||||||
|
|||||||
16
.github/workflows/deployk8s.yaml
vendored
16
.github/workflows/deployk8s.yaml
vendored
@@ -44,12 +44,10 @@ jobs:
|
|||||||
environment: ${{ inputs.environment }}
|
environment: ${{ inputs.environment }}
|
||||||
tag: ${{ inputs.tag }}
|
tag: ${{ inputs.tag }}
|
||||||
migrate: ${{ inputs.migrate }}
|
migrate: ${{ inputs.migrate }}
|
||||||
|
- name: post-notify
|
||||||
notify:
|
if: always()
|
||||||
needs: [deploy]
|
uses: https://bb.hublab.ru/HUB/workflows/.gitea/actions/notify@HEAD
|
||||||
if: always()
|
with:
|
||||||
uses: HUB/workflows/.github/workflows/notify.yaml@main
|
result: ${{ needs.deploy.result}}
|
||||||
with:
|
name: k8s deploy ${{ inputs.environment }} tag ${{ inputs.tag }}
|
||||||
result: ${{ needs.deploy.result}}
|
secrets: inherit
|
||||||
name: k8s deploy ${{ inputs.environment }} tag ${{ inputs.tag }}
|
|
||||||
secrets: inherit
|
|
||||||
Reference in New Issue
Block a user