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: 61 additions & 12 deletions .github/workflows/deploy_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,30 @@ env:
MODULES_MODULE_SOURCE: ${{ vars.DEV_MODULE_SOURCE }}
MODULES_REGISTRY_LOGIN: ${{ vars.DEV_MODULES_REGISTRY_LOGIN }}
MODULES_REGISTRY_PASSWORD: ${{ secrets.DEV_MODULES_REGISTRY_PASSWORD }}
RELEASE_CHANNEL: ${{ github.event.inputs.channel }}
MODULES_MODULE_TAG: ${{ github.event.inputs.tag }}
GOLANG_VERSION: ${{ vars.GOLANG_VERSION }}
GOPROXY: ${{ secrets.GOPROXY }}
SOURCE_REPO: ${{ secrets.SOURCE_REPO }}
BASE_IMAGES_VERSION: ${{ vars.BASE_IMAGES_VERSION }}

on:
workflow_dispatch:
inputs:
channel:
description: "Select release channel"
type: choice
default: alpha
options:
- "alpha"
- "beta"
- "early-access"
- "stable"
- "rock-solid"
alpha:
type: boolean
description: Alpha
beta:
type: boolean
description: Beta
early-access:
type: boolean
description: Early-access
stable:
type: boolean
description: Stable
rock-solid:
type: boolean
description: Rock-solid

tag:
description: "The module's tag, which must include the -dev1 postfix. For example: v1.21.1-dev1"
Expand All @@ -37,6 +42,7 @@ on:
default: true
description: "Set to true if build is required"


jobs:
deploy-dev:
runs-on: [self-hosted, large]
Expand All @@ -57,6 +63,10 @@ jobs:
shell: bash

- uses: actions/checkout@v4
- name: Download base images and auth prepare
run: |
wget https://fox.flant.com/api/v4/projects/deckhouse%2Fbase-images/packages/generic/base_images/$BASE_IMAGES_VERSION/base_images.yml -O base_images.yml
cat base_images.yml
- uses: deckhouse/modules-actions/setup@v2
with:
registry: ${{ vars.DEV_REGISTRY }}
Expand All @@ -70,4 +80,43 @@ jobs:
module_tag: ${{ github.event.inputs.tag }}
source_repo: ${{ secrets.SOURCE_REPO }}
source_repo_ssh_key: ${{ secrets.SOURCE_REPO_SSH_KEY }}
- uses: deckhouse/modules-actions/deploy@v2
- name: deploy Alpha
if: github.event.inputs.alpha == 'true'
uses: deckhouse/modules-actions/deploy@v2
with:
module_source: "${{ vars.DEV_MODULE_SOURCE }}"
module_name: ${{ vars.MODULE_NAME }}
module_tag: ${{ github.event.inputs.tag }}
release_channel: "alpha"
- name: deploy Beta
if: github.event.inputs.beta == 'true'
uses: deckhouse/modules-actions/deploy@v2
with:
module_source: "${{ vars.DEV_MODULE_SOURCE }}"
module_name: ${{ vars.MODULE_NAME }}
module_tag: ${{ github.event.inputs.tag }}
release_channel: "beta"
- name: deploy Early-access
if: github.event.inputs.early-access == 'true'
uses: deckhouse/modules-actions/deploy@v2
with:
module_source: "${{ vars.DEV_MODULE_SOURCE }}"
module_name: ${{ vars.MODULE_NAME }}
module_tag: ${{ github.event.inputs.tag }}
release_channel: "early-access"
- name: deploy Stable
if: github.event.inputs.stable == 'true'
uses: deckhouse/modules-actions/deploy@v2
with:
module_source: "${{ vars.DEV_MODULE_SOURCE }}"
module_name: ${{ vars.MODULE_NAME }}
module_tag: ${{ github.event.inputs.tag }}
release_channel: "stable"
- name: deploy Rock-solid
if: github.event.inputs.rock-solid == 'true'
uses: deckhouse/modules-actions/deploy@v2
with:
module_source: "${{ vars.DEV_MODULE_SOURCE }}"
module_name: ${{ vars.MODULE_NAME }}
module_tag: ${{ github.event.inputs.tag }}
release_channel: "rock-solid"
38 changes: 38 additions & 0 deletions .github/workflows/deploy_prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ on:
ce:
type: boolean
description: CE
be:
type: boolean
description: BE (GutHub variable "ALLOW_BE" should be "true")
ee:
type: boolean
description: EE
Expand Down Expand Up @@ -64,6 +67,7 @@ jobs:
job-CE:
name: Edition CE
runs-on: [self-hosted, large]
environment: ${{github.event.inputs.channel}}
if: github.event.inputs.ce == 'true'
steps:
- run: echo "CE"
Expand All @@ -90,9 +94,40 @@ jobs:
module_tag: ${{ github.event.inputs.tag }}
release_channel: ${{ github.event.inputs.channel }}

job-BE:
name: Edition BE
runs-on: [self-hosted, large]
environment: ${{github.event.inputs.channel}}
if: github.event.inputs.be == 'true' && vars.ALLOW_BE == 'true'
steps:
- run: echo "BE"
- name: SET VAR
run: |
echo "MODULES_MODULE_SOURCE=$MODULES_REGISTRY/$MODULE_SOURCE_NAME/be/modules" >> "$GITHUB_ENV"
- name: ECHO VAR
run: |
echo $MODULES_MODULE_SOURCE
- uses: actions/checkout@v4
- uses: deckhouse/modules-actions/setup@v2
with:
registry: ${{ vars.PROD_REGISTRY }}
registry_login: ${{ vars.PROD_MODULES_REGISTRY_LOGIN }}
registry_password: ${{ secrets.PROD_MODULES_REGISTRY_PASSWORD }}
- name: Check previous release
run: |
chmod +x .github/check_previous_channel_release.sh
.github/check_previous_channel_release.sh $MODULES_MODULE_NAME be $RELEASE_CHANNEL $MODULES_MODULE_TAG license-token $MODULES_READ_REGISTRY_PASSWORD
- uses: deckhouse/modules-actions/deploy@v2
with:
module_source: "${{ vars.PROD_REGISTRY }}/${{ vars.PROD_MODULE_SOURCE_NAME }}/be/modules"
module_name: ${{ vars.MODULE_NAME }}
module_tag: ${{ github.event.inputs.tag }}
release_channel: ${{ github.event.inputs.channel }}

job-EE:
name: Edition EE
runs-on: [self-hosted, large]
environment: ${{github.event.inputs.channel}}
if: github.event.inputs.ee == 'true'
steps:
- run: echo "EE"
Expand Down Expand Up @@ -122,6 +157,7 @@ jobs:
job-FE:
name: Edition FE
runs-on: [self-hosted, large]
environment: ${{github.event.inputs.channel}}
if: github.event.inputs.fe == 'true'
steps:
- run: echo "FE"
Expand Down Expand Up @@ -151,6 +187,7 @@ jobs:
job-SE:
name: Edition SE
runs-on: [self-hosted, large]
environment: ${{github.event.inputs.channel}}
if: github.event.inputs.se == 'true'
steps:
- run: echo "SE"
Expand Down Expand Up @@ -180,6 +217,7 @@ jobs:
job-SE-plus:
name: Edition SE+
runs-on: [self-hosted, large]
environment: ${{github.event.inputs.channel}}
if: github.event.inputs.se-plus == 'true'
steps:
- run: echo "SE+"
Expand Down