From 490931b0bf44b32b8808090794154b6ef7ca71b6 Mon Sep 17 00:00:00 2001 From: Aleksandr Zimin Date: Wed, 27 Dec 2023 17:04:25 +0300 Subject: [PATCH] Enable build for prod Signed-off-by: Aleksandr Zimin --- .github/workflows/build_prod.yml | 151 ++++++++++++++++--------------- .github/workflows/deploy_dev.yml | 48 ---------- 2 files changed, 80 insertions(+), 119 deletions(-) delete mode 100644 .github/workflows/deploy_dev.yml diff --git a/.github/workflows/build_prod.yml b/.github/workflows/build_prod.yml index b057cb8b..10accff6 100644 --- a/.github/workflows/build_prod.yml +++ b/.github/workflows/build_prod.yml @@ -1,77 +1,86 @@ -# on: -# push: -# tags: -# - '**' +on: + push: + tags: + - '**' -# jobs: -# prod_ce_setup_build: -# runs-on: ubuntu-latest -# env: -# MODULES_REGISTRY: ${{ vars.PROD_REGISTRY }} -# CI_COMMIT_REF_NAME: ${{ github.ref_name }} -# MODULES_MODULE_NAME: ${{ vars.MODULE_NAME }} -# MODULES_MODULE_SOURCE: ${{ vars.PROD_CE_MODULE_SOURCE }} -# MODULES_REGISTRY_LOGIN: ${{ secrets.PROD_MODULES_REGISTRY_LOGIN }} -# MODULES_REGISTRY_PASSWORD: ${{ secrets.PROD_MODULES_REGISTRY_PASSWORD }} -# MODULES_MODULE_TAG: ${{ github.ref_name }} -# name: Build and Push images -# steps: -# - run: | -# echo $MODULES_REGISTRY -# echo $MODULES_MODULE_NAME -# echo $MODULES_MODULE_SOURCE -# echo $MODULES_MODULE_TAG -# shell: bash -# name: Show vars +jobs: + prod_ce_setup_build: + runs-on: ubuntu-latest + env: + MODULES_REGISTRY: ${{ vars.PROD_REGISTRY }} + CI_COMMIT_REF_NAME: ${{ github.ref_name }} + MODULES_MODULE_NAME: ${{ vars.MODULE_NAME }} + MODULES_MODULE_SOURCE: ${{ vars.PROD_CE_MODULE_SOURCE }} + MODULES_REGISTRY_LOGIN: ${{ secrets.PROD_MODULES_REGISTRY_LOGIN }} + MODULES_REGISTRY_PASSWORD: ${{ secrets.PROD_MODULES_REGISTRY_PASSWORD }} + MODULES_MODULE_TAG: ${{ github.ref_name }} + name: Build and Push images + steps: + - name: SET VAR + run: | + echo "MODULES_MODULE_SOURCE=$MODULES_REGISTRY/$MODULE_SOURCE_NAME/ce/modules" >> "$GITHUB_ENV" + - run: | + echo $MODULES_REGISTRY + echo $MODULES_MODULE_NAME + echo $MODULES_MODULE_SOURCE + echo $MODULES_MODULE_TAG + shell: bash + name: Show vars -# - uses: actions/checkout@v4 -# - uses: deckhouse/modules-actions/setup@v1 -# - uses: deckhouse/modules-actions/build@v1 + # - uses: actions/checkout@v4 + # - uses: deckhouse/modules-actions/setup@v1 + # - uses: deckhouse/modules-actions/build@v1 -# prod_ee_setup_build: -# runs-on: ubuntu-latest -# env: -# MODULES_REGISTRY: ${{ vars.PROD_REGISTRY }} -# CI_COMMIT_REF_NAME: ${{ github.ref_name }} -# MODULES_MODULE_NAME: ${{ vars.MODULE_NAME }} -# MODULES_MODULE_SOURCE: ${{ vars.PROD_EE_MODULE_SOURCE }} -# MODULES_REGISTRY_LOGIN: ${{ secrets.PROD_MODULES_REGISTRY_LOGIN }} -# MODULES_REGISTRY_PASSWORD: ${{ secrets.PROD_MODULES_REGISTRY_PASSWORD }} -# MODULES_MODULE_TAG: ${{ github.ref_name }} -# name: Build and Push images -# steps: -# - run: | -# echo $MODULES_REGISTRY -# echo $MODULES_MODULE_NAME -# echo $MODULES_MODULE_SOURCE -# echo $MODULES_MODULE_TAG -# shell: bash -# name: Show vars + prod_ee_setup_build: + runs-on: ubuntu-latest + env: + MODULES_REGISTRY: ${{ vars.PROD_REGISTRY }} + CI_COMMIT_REF_NAME: ${{ github.ref_name }} + MODULES_MODULE_NAME: ${{ vars.MODULE_NAME }} + MODULES_MODULE_SOURCE: ${{ vars.PROD_EE_MODULE_SOURCE }} + MODULES_REGISTRY_LOGIN: ${{ secrets.PROD_MODULES_REGISTRY_LOGIN }} + MODULES_REGISTRY_PASSWORD: ${{ secrets.PROD_MODULES_REGISTRY_PASSWORD }} + MODULES_MODULE_TAG: ${{ github.ref_name }} + name: Build and Push images + steps: + - name: SET VAR + run: | + echo "MODULES_MODULE_SOURCE=$MODULES_REGISTRY/$MODULE_SOURCE_NAME/ee/modules" >> "$GITHUB_ENV" + - run: | + echo $MODULES_REGISTRY + echo $MODULES_MODULE_NAME + echo $MODULES_MODULE_SOURCE + echo $MODULES_MODULE_TAG + shell: bash + name: Show vars -# - uses: actions/checkout@v4 -# - uses: deckhouse/modules-actions/setup@v1 -# - uses: deckhouse/modules-actions/build@v1 + # - uses: actions/checkout@v4 + # - uses: deckhouse/modules-actions/setup@v1 + # - uses: deckhouse/modules-actions/build@v1 -# prod_fe_setup_build: -# runs-on: ubuntu-latest -# env: -# MODULES_REGISTRY: ${{ vars.PROD_REGISTRY }} -# CI_COMMIT_REF_NAME: ${{ github.ref_name }} -# MODULES_MODULE_NAME: ${{ vars.MODULE_NAME }} -# MODULES_MODULE_SOURCE: ${{ vars.PROD_FE_MODULE_SOURCE }} -# MODULES_REGISTRY_LOGIN: ${{ secrets.PROD_MODULES_REGISTRY_LOGIN }} -# MODULES_REGISTRY_PASSWORD: ${{ secrets.PROD_MODULES_REGISTRY_PASSWORD }} -# MODULES_MODULE_TAG: ${{ github.ref_name }} -# name: Build and Push images -# steps: -# - run: | -# echo $MODULES_REGISTRY -# echo $MODULES_MODULE_NAME -# echo $MODULES_MODULE_SOURCE -# echo $MODULES_MODULE_TAG -# shell: bash -# name: Show vars + prod_fe_setup_build: + runs-on: ubuntu-latest + env: + MODULES_REGISTRY: ${{ vars.PROD_REGISTRY }} + CI_COMMIT_REF_NAME: ${{ github.ref_name }} + MODULES_MODULE_NAME: ${{ vars.MODULE_NAME }} + MODULES_MODULE_SOURCE: ${{ vars.PROD_FE_MODULE_SOURCE }} + MODULES_REGISTRY_LOGIN: ${{ secrets.PROD_MODULES_REGISTRY_LOGIN }} + MODULES_REGISTRY_PASSWORD: ${{ secrets.PROD_MODULES_REGISTRY_PASSWORD }} + MODULES_MODULE_TAG: ${{ github.ref_name }} + name: Build and Push images + steps: + - name: SET VAR + run: | + echo "MODULES_MODULE_SOURCE=$MODULES_REGISTRY/$MODULE_SOURCE_NAME/fe/modules" >> "$GITHUB_ENV" + - run: | + echo $MODULES_REGISTRY + echo $MODULES_MODULE_NAME + echo $MODULES_MODULE_SOURCE + echo $MODULES_MODULE_TAG + shell: bash + name: Show vars -# - uses: actions/checkout@v4 -# - uses: deckhouse/modules-actions/setup@v1 -# - uses: deckhouse/modules-actions/build@v1 + # - uses: actions/checkout@v4 + # - uses: deckhouse/modules-actions/setup@v1 + # - uses: deckhouse/modules-actions/build@v1 diff --git a/.github/workflows/deploy_dev.yml b/.github/workflows/deploy_dev.yml deleted file mode 100644 index c741b384..00000000 --- a/.github/workflows/deploy_dev.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: Deploy Dev - -on: - workflow_dispatch: - inputs: - version: - description: "Select version" - type: choice - default: alpha - options: - - "alpha" - - "beta" - - "early-access" - - "stable" - - "rock-solid" - - tag: - description: "Tag of the module, exapmle v1.21.1" - type: string - required: true - -jobs: - deploy: - runs-on: ubuntu-latest - env: - MODULES_REGISTRY: ${{ vars.DEV_REGISTRY }} - CI_COMMIT_REF_NAME: ${{ github.ref_name }} - MODULES_MODULE_NAME: ${{ vars.MODULE_NAME }} - MODULES_MODULE_SOURCE: ${{ vars.DEV_MODULE_SOURCE }} - RELEASE_CHANNEL: ${{ github.event.inputs.version }} - MODULES_MODULE_TAG: ${{ github.event.inputs.tag }} - name: Build and Push images - steps: - - run: | - echo $MODULES_REGISTRY - echo $CI_COMMIT_REF_NAME - echo $MODULES_MODULE_NAME - echo $MODULES_MODULE_SOURCE - echo $RELEASE_CHANNEL - echo $MODULES_MODULE_TAG - shell: bash - name: Show vars - - - # steps: - # - uses: actions/checkout@v4 - # - uses: deckhouse/modules-actions/setup@v1 - # - uses: deckhouse/modules-actions/deploy@v1