Skip to content

add proper old release #17

add proper old release

add proper old release #17

Workflow file for this run

name: cicd
on:
- push
env:
GITOPS_REPO_URL: https://github.com/borikoss/charts-repo-actions-demo-gitops
GITOPS_REPO_BRANCH: main
jobs:
Build_Generate:
runs-on: ubuntu-latest
steps:
- name: Checkout Source
uses: actions/checkout@v4
- name: Generate Manifests
run: |
.github/workflows/utils/generate-manifests.py ${{ github.workspace }} \
${{ github.workspace }}/deployment/deploymentTargets \
${{ github.workspace }}/generated_manifests
- name: See generated manifests list
run: |
find generated_manifests/ -print
- name: Upload Artifact generated_manifests
uses: actions/upload-artifact@v3
with:
name: generated_manifests
path: generated_manifests/
Deploy_To_Dev:
runs-on: ubuntu-latest
needs: Build_Generate
env:
GITOPS_REPO_FOLDER: dev
GITOPS_REPO_AUTO_MERGE: "Y"
steps:
- name: Checkout Source
uses: actions/checkout@v4
- name: Download Artifact generated_manifests
uses: actions/download-artifact@v3
with:
name: generated_manifests
path: generated_manifests/
- name: Create PR to GitOps repo
run: |
.github/workflows/utils/create-pr.sh \
-s ${{ github.workspace }}/generated_manifests/${{ env.GITOPS_REPO_FOLDER }} \
-d ${{ env.GITOPS_REPO_FOLDER }} \
-r ${{ env.GITOPS_REPO_URL }} \
-b ${{ env.GITOPS_REPO_BRANCH }} \
-i ${{ github.run_number }} \
-t ${{ secrets.GITOPS_REPO_COMMIT_TOKEN }} \
-m ${{ env.GITOPS_REPO_AUTO_MERGE }}
Deploy_To_Qa:
runs-on: ubuntu-latest
needs: [Build_Generate,Deploy_To_Dev]
env:
GITOPS_REPO_FOLDER: qa
GITOPS_REPO_AUTO_MERGE: "Y"
steps:
- name: Checkout Source
uses: actions/checkout@v4
- name: Download Artifact generated_manifests
uses: actions/download-artifact@v3
with:
name: generated_manifests
path: generated_manifests/
- name: Create PR to GitOps repo
run: |
.github/workflows/utils/create-pr.sh \
-s ${{ github.workspace }}/generated_manifests/${{ env.GITOPS_REPO_FOLDER }} \
-d ${{ env.GITOPS_REPO_FOLDER }} \
-r ${{ env.GITOPS_REPO_URL }} \
-b ${{ env.GITOPS_REPO_BRANCH }} \
-i ${{ github.run_number }} \
-t ${{ secrets.GITOPS_REPO_COMMIT_TOKEN }} \
-m ${{ env.GITOPS_REPO_AUTO_MERGE }}
Deploy_To_Prod:
runs-on: ubuntu-latest
needs: [Build_Generate,Deploy_To_Qa]
env:
GITOPS_REPO_FOLDER: prod
GITOPS_REPO_AUTO_MERGE: "N"
steps:
- name: Checkout Source
uses: actions/checkout@v4
- name: Download Artifact generated_manifests
uses: actions/download-artifact@v3
with:
name: generated_manifests
path: generated_manifests/
- name: Create PR to GitOps repo
run: |
.github/workflows/utils/create-pr.sh \
-s ${{ github.workspace }}/generated_manifests/${{ env.GITOPS_REPO_FOLDER }} \
-d ${{ env.GITOPS_REPO_FOLDER }} \
-r ${{ env.GITOPS_REPO_URL }} \
-b ${{ env.GITOPS_REPO_BRANCH }} \
-i ${{ github.run_number }} \
-t ${{ secrets.GITOPS_REPO_COMMIT_TOKEN }} \
-m ${{ env.GITOPS_REPO_AUTO_MERGE }}