Skip to content

Commit

Permalink
Merge branch 'Feature/SeleniumUpdate' into BugFix/TryCatchInTask
Browse files Browse the repository at this point in the history
  • Loading branch information
Maheshkale447 committed Aug 16, 2023
2 parents 1575f0f + 6ffc9ef commit 9b4b4f9
Show file tree
Hide file tree
Showing 218 changed files with 199,350 additions and 472 deletions.
35 changes: 22 additions & 13 deletions .github/workflows/CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,22 @@ on:
workflow_dispatch:
inputs:
major:
description: Year
type: number
required: true
default: '23'
minor:
description: Release
type: number
required: true
default: '1'
build:
description: Beta
type: number
required: true
default: '0'
revision:
description: Alpha
type: number
required: true
default: '0'
Expand Down Expand Up @@ -43,7 +47,7 @@ jobs:
- name: create version environment variable - Release
if: ${{ (github.event.inputs.build == 0 ) && ( github.event.inputs.revision == 0) }}
run: |
echo "gingertag=20${{ github.event.inputs.major}}.${{ github.event.inputs.minor}}" >> $GITHUB_ENV
echo "gingertag=20${{ github.event.inputs.major}}.${{ github.event.inputs.minor}}-Official" >> $GITHUB_ENV
echo "gingernumber=${{ github.event.inputs.major}}.${{ github.event.inputs.minor}}.${{ github.event.inputs.build}}.${{ github.event.inputs.revision}}" >> $GITHUB_ENV
- name: create environment variable
Expand All @@ -58,31 +62,36 @@ jobs:
echo "TAG=${{ env.gingertag}}" >> version.txt
cat version.txt
- name: 'Upload static site content'
uses: actions/upload-artifact@v3
- name: Cache Version text file
id: cache
uses: actions/cache@v3.2.6
with:
name: ginger-version
path: ./version.txt
path:
./version.txt
key:
cache-version-${{ github.run_number }}
enableCrossOsArchive:
true

CI:
name: CI
needs: Create-version-Number
uses: Ginger-Automation/Ginger/.github/workflows/CI.yml@master
uses: ./.github/workflows/CI-2.yml
secrets: inherit

Release:
name: Release
needs: CI
uses: Ginger-Automation/Ginger/.github/workflows/Release.yml@master
uses: ./.github/workflows/Release-2.yml
secrets: inherit

Deploy:
name: Deploy
needs: Release
uses: Ginger-Automation/Ginger/.github/workflows/Deploy.yml@master
uses: ./.github/workflows/Deploy-2.yml

# Docker:
# name: Docker
# needs: CI
# uses: Ginger-Automation/Ginger/.github/workflows/Docker.yml@master
# secrets: inherit
Docker:
name: Docker
needs: CI
uses: ./.github/workflows/Docker.yml
secrets: inherit
30 changes: 30 additions & 0 deletions .github/workflows/CI-2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: CI

on:
workflow_dispatch:
workflow_call:

pull_request:
branches:
- master
- Features/Linux-Migration
- Releases/*
- Releases/*/*

jobs:
# Codacy:
# name: Code_Quality
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3

Build:
name: Build Stage
# needs: Codacy
uses: ./.github/workflows/GingerBuild-2.yml

Test:
name: Test Stage
needs: Build
uses: ./.github/workflows/GingerTests-2.yml
secrets: inherit
6 changes: 3 additions & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
Build:
name: Build Stage
# needs: Codacy
uses: Ginger-Automation/Ginger/.github/workflows/GingerBuild.yml@master
uses: ./.github/workflows/GingerBuild.yml

Test:
name: Test Stage
needs: Build
uses: Ginger-Automation/Ginger/.github/workflows/GingerTests.yml@master
secrets: inherit
uses: ./.github/workflows/GingerTests.yml
secrets: inherit
132 changes: 132 additions & 0 deletions .github/workflows/Deploy-2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
name: Deploy

on:
workflow_dispatch:

workflow_call:

jobs:
Deploy-Project:
name: Deploy Releases to Github Release
runs-on: ubuntu-latest
steps:
# ------------------------------------------------------------------------------------------------------
# Createin version Tag & Number variables
# ------------------------------------------------------------------------------------------------------
- name: Restore Version text file
if: ${{github.workflow == 'CD'}}
uses: actions/cache@v3.2.6
with:
path: ./version.txt
key: cache-version-${{ github.run_number }}
enableCrossOsArchive:
true

- name: Create variables from Artifacts file
shell: bash
run: |
source version.txt
echo $TAG
echo "gingernumber=$NUMBER" >> $GITHUB_ENV
echo "gingertag=$TAG" >> $GITHUB_ENV
# ------------------------------------------------------------------------------------------------------
# Copy Ginger repo
# ------------------------------------------------------------------------------------------------------
- uses: actions/checkout@v3

# ------------------------------------------------------------------------------------------------------
# Download GingerRuntime Artifact
# ------------------------------------------------------------------------------------------------------
- name: Restore GingerRuntime
uses: actions/cache@v3.2.6
with:
path: ./GingerRuntime-root.tar.gz
key: cache-GingerRuntime-${{ github.run_number }}
enableCrossOsArchive:
true

# ------------------------------------------------------------------------------------------------------
# Download Windows Installer Artifact
# ------------------------------------------------------------------------------------------------------
- name: Download Windows Installer Artifact
uses: actions/download-artifact@v3
with:
name: WindowsInstaller

# ------------------------------------------------------------------------------------------------------
# Create new Release for ginger
# ------------------------------------------------------------------------------------------------------
- name: Create Github new Release
id: create-new-release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: v${{ env.gingertag}}
release_name: Release v${{ env.gingertag}}
draft: true

# ------------------------------------------------------------------------------------------------------
# Upload GingerRuntime.tar.gz to Github Releases
# ------------------------------------------------------------------------------------------------------
- name: Upload Assest to Github Releases - GingerRuntime.tar.gz
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create-new-release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./GingerRuntime-root.tar.gz
asset_name: GingerRuntime.${{ env.gingertag}}.tar.gz
asset_content_type: application/gzip

# ------------------------------------------------------------------------------------------------------
# Upload Ginger.exe to Github Releases
# ------------------------------------------------------------------------------------------------------
- name: Upload Assest to Github Releases - Ginger.exe
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create-new-release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./Ginger.exe
asset_name: Ginger.${{ env.gingertag}}.exe
asset_content_type: application/exe

# ------------------------------------------------------------------------------------------------------
# Upload Ginger Documents to Github Releases
# ------------------------------------------------------------------------------------------------------
- name: Upload Assest to Github Releases - Ginger.Release.Notes.pdf
if: ( !(contains(env.gingertag , 'Beta' )) && !(contains(env.gingertag , 'Alpha' )) )
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create-new-release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./Documents/Ginger.Release.Notes.pdf
asset_name: Ginger.Release.Notes.pdf
asset_content_type: application/doc


- name: Upload Assest to Github Releases - Ginger.System.Requirements.pdf
if: ( !(contains(env.gingertag , 'Beta' )) && !(contains(env.gingertag , 'Alpha' )) )
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create-new-release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./Documents/Ginger.System.Requirements.pdf
asset_name: Ginger.System.Requirements.pdf
asset_content_type: application/doc


- name: Upload Assest to Github Releases - GingerRuntime.System.Requirements.pdf
if: ( !(contains(env.gingertag , 'Beta' )) && !(contains(env.gingertag , 'Alpha' )) )
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create-new-release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./Documents/GingerRuntime.System.Requirements.pdf
asset_name: GingerRuntime.System.Requirements.pdf
asset_content_type: application/doc
2 changes: 1 addition & 1 deletion .github/workflows/Deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create-new-release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./GingerRuntime.tar.gz
asset_path: ./GingerRuntime-root.tar.gz
asset_name: GingerRuntime.${{ env.gingertag}}.tar.gz
asset_content_type: application/gzip

Expand Down
98 changes: 86 additions & 12 deletions .github/workflows/Docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,98 @@ jobs:
BUILD_CONFIGURATION: Release

steps:
- name: Download Airtifacts
uses: actions/download-artifact@v3
- name: Restore Version text file
uses: actions/cache@v3.2.6
with:
name: ginger-artifact

- name: Building new docker image
path: ./version.txt
key: cache-version-${{ github.run_number }}
enableCrossOsArchive:
true

- name: Create variables from Version text file
shell: bash
run: |
source version.txt
echo $TAG
echo "gingernumber=$NUMBER" >> $GITHUB_ENV
echo "gingertag=$TAG" >> $GITHUB_ENV
- name: Restore static site content
uses: actions/cache@v3.2.6
with:
path: ./**
key: cache-site-${{ github.run_number }}
enableCrossOsArchive:
true

# ------------------------------------------------------------------------------------------------------
# Log in to the Container registry - GHCR
# ------------------------------------------------------------------------------------------------------

- name: Log in to the Container registry - GHCR
run: |
docker login ghcr.io -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }}
# ------------------------------------------------------------------------------------------------------
# Create GingerRuntime docker image
# ------------------------------------------------------------------------------------------------------
- name: Building GingerRuntime docker image
run: |
cd Ginger/GingerRuntime
docker build -t ginger .
docker build -t gingerruntime .
- name: Change image tag to be pushed for GHCR
run: |
docker tag ginger ghcr.io/${{ github.actor }}/ginger:${{github.event.inputs.Version}}
- name: Log in to the Container registry - GHCR
docker tag gingerruntime ghcr.io/${{ github.actor }}/gingerruntime:"${{ env.gingertag}}"
- name: Pushing GingerRuntime Image
run: |
docker login ghcr.io -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }}
docker push ghcr.io/${{ github.actor }}/gingerruntime:"${{ env.gingertag}}"
- name: Change image tag(latest) to be pushed for GHCR
run: |
docker tag gingerruntime ghcr.io/${{ github.actor }}/gingerruntime:latest
- name: Pushing Ginger Image
- name: Pushing GingerRuntime Image
run: |
docker push ghcr.io/${{ github.actor }}/ginger:${{github.event.inputs.Version}}
docker push ghcr.io/${{ github.actor }}/gingerruntime:latest
# ------------------------------------------------------------------------------------------------------
# Create GingerRuntime with Browsers docker image
# ------------------------------------------------------------------------------------------------------
- name: Building gingerruntime-browsers docker image
run: |
cd Ginger/GingerRuntime/Containers/Browsers
docker build -t gingerruntime-browsers .
- name: Change image tag to be pushed for GHCR
run: |
docker tag gingerruntime-browsers ghcr.io/${{ github.actor }}/gingerruntime-browsers:"${{ env.gingertag}}"
- name: Pushing gingerruntime-browsers Image
run: |
docker push ghcr.io/${{ github.actor }}/gingerruntime-browsers:"${{ env.gingertag}}"
- name: Change image tag(latest) to be pushed for GHCR
run: |
docker tag gingerruntime-browsers ghcr.io/${{ github.actor }}/gingerruntime-browsers:latest
- name: Pushing gingerruntime-browsers Image
run: |
docker push ghcr.io/${{ github.actor }}/gingerruntime-browsers:latest
# ------------------------------------------------------------------------------------------------------
# Create Ginger docker image [Switch to docker desktop containers]
# ------------------------------------------------------------------------------------------------------
# - name: Building ginger docker image
# run: |
# cd Ginger
# dir
# docker build -t ginger .

# - name: Change image tag to be pushed for GHCR
# run: |
# docker tag ginger ghcr.io/${{ github.actor }}/ginger:"${{env.gingertag}}"

# - name: Pushing Ginger Image
# run: |
# docker push ghcr.io/${{ github.actor }}/ginger:"${{ env.gingertag}}"
Loading

0 comments on commit 9b4b4f9

Please sign in to comment.