Skip to content

Commit

Permalink
Merge pull request #2 from microsoft/revert-1-eedorenko/bring-gm-back
Browse files Browse the repository at this point in the history
Revert "Eedorenko/bring gm back"
  • Loading branch information
eedorenko authored Oct 26, 2023
2 parents 76ce2ab + 2e09254 commit 7748a04
Show file tree
Hide file tree
Showing 7 changed files with 101 additions and 305 deletions.
100 changes: 0 additions & 100 deletions .github/workflows/cd.yaml

This file was deleted.

139 changes: 0 additions & 139 deletions .github/workflows/ci.yaml

This file was deleted.

97 changes: 97 additions & 0 deletions .github/workflows/cicd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
name: cicd

on:
push:
branches:
- main
workflow_dispatch:

env:
SEM_VER: 0.0.1
APP_NAME: hello-world
IMAGE_NAME: ghcr.io/${{ github.repository }}/hello-world

jobs:
Build_Push_Image:
runs-on: ubuntu-latest
permissions: write-all

steps:
- name: Checkout Source
uses: actions/checkout@v3
- name: Login to ghcr
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Generate Image Tag
id: generate_image_tag
run: |
IMAGE_TAG=${{ env.SEM_VER }}-${{ github.run_number }}
echo "IMAGE_TAG=$IMAGE_TAG" >> $GITHUB_ENV
echo "::set-output name=image_tag::$IMAGE_TAG"
- name: Build and Push to ghcr
uses: docker/build-push-action@v2
with:
push: true
context: .
tags: ${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}, ${{ env.IMAGE_NAME }}:latest
outputs:
image_tag: ${{ steps.generate_image_tag.outputs.image_tag }}

Deploy_To_Dev:
runs-on: ubuntu-latest
needs: Build_Push_Image
environment: dev
steps:
- name: Checkout Source
uses: actions/[email protected]
- name: Checkout Configs
uses: actions/[email protected]
with:
ref: dev-configs
path: configs
- name: Read Image Tags
run: |
IMAGE_TAG=${{ needs.Build_Push_Image.outputs.image_tag }}
echo "IMAGE_TAG=$IMAGE_TAG" >> $GITHUB_ENV
VERSION=$IMAGE_TAG
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Generate Manifests for Functional Tests
run: |
.github/workflows/utils/generate-manifests.sh ${{ github.workspace }}/helm ${{ github.workspace }}/configs/functional-tests manifests/functional-test
- name: Generate Manifests for Performance Tests
run: |
.github/workflows/utils/generate-manifests.sh ${{ github.workspace }}/helm ${{ github.workspace }}/configs/performance-tests manifests/performance-test
- name: Create PR
run: |
.github/workflows/utils//create-pr.sh -s ${{ github.workspace }}/manifests -d . -r ${{ secrets.MANIFESTS_REPO }} -b dev -i ${{ github.run_number }} -t ${{ secrets.MANIFESTS_TOKEN }} -m Y
Deploy_To_Stage:
runs-on: ubuntu-latest
needs: [Build_Push_Image, Deploy_To_Dev]
environment: stage
steps:
- name: Checkout Source
uses: actions/[email protected]
- name: Checkout Configs
uses: actions/[email protected]
with:
ref: stage-configs
path: configs
- name: Read Image Tags
run: |
IMAGE_TAG=${{ needs.Build_Push_Image.outputs.image_tag }}
echo "IMAGE_TAG=$IMAGE_TAG" >> $GITHUB_ENV
VERSION=$IMAGE_TAG
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Generate Manifests for UAT
run: |
.github/workflows/utils/generate-manifests.sh ${{ github.workspace }}/helm ${{ github.workspace }}/configs/uat-tests manifests/uat-test
- name: Create PR
run: |
.github/workflows/utils//create-pr.sh -s ${{ github.workspace }}/manifests -d . -r ${{ secrets.MANIFESTS_REPO }} -b stage -i ${{ github.run_number }} -t ${{ secrets.MANIFESTS_TOKEN }} -m N
14 changes: 0 additions & 14 deletions .github/workflows/utils/generate-ansible-manifests.sh

This file was deleted.

20 changes: 0 additions & 20 deletions Dockerfile-fpm

This file was deleted.

12 changes: 0 additions & 12 deletions ansible/install.yml

This file was deleted.

Loading

0 comments on commit 7748a04

Please sign in to comment.