Skip to content

Commit

Permalink
root: added deploy CI job recipe
Browse files Browse the repository at this point in the history
Since we want the CI to be fully automated including deploying the
new release, we have to facilitate the deploy CI Job recipe. Hence,
let's do this.

This patch adds deploy CI job recipe in root repository.

Co-authored-by: Galyna, Cory <[email protected]>
Co-authored-by: (Holloway) Chew, Kean Ho <[email protected]>
Signed-off-by: (Holloway) Chew, Kean Ho <[email protected]>
  • Loading branch information
hollowaykeanho and corygalyna committed Nov 2, 2023
1 parent 1eb3463 commit 0cdc9cb
Show file tree
Hide file tree
Showing 8 changed files with 84 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/git-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ jobs:
id: native_ci_stop
run: |
./ci.cmd stop
- name: Execute repo's AutomataCI - DEPLOY
id: native_ci_deploy
run: |
./ci.cmd deploy
- name: Archive Payloads Artifacts
if: always()
uses: actions/upload-artifact@v3
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ Please try any of the following:
To package the repo product 🠚 $ ./ci.cmd package
To release the repo product 🠚 $ ./ci.cmd release
To stop a development 🠚 $ ./ci.cmd stop
To deploy the new release 🠚 $ ./ci.cmd deploy
To clean the workspace 🠚 $ ./ci.cmd clean
To purge everything 🠚 $ ./ci.cmd purge
```
Expand Down
4 changes: 4 additions & 0 deletions automataCI/ci.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,9 @@ switch ($args[0]) {
} { $_ -in 'stop', 'Stop', 'STOP' } {
$env:PROJECT_CI_JOB = "stop"
$__exit = . "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_AUTOMATA}\common_windows-any.ps1"
} { $_ -in 'deploy', 'Deploy', 'DEPLOY' } {
$env:PROJECT_CI_JOB = "deploy"
$__exit = . "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_AUTOMATA}\common_windows-any.ps1"
} { $_ -in 'clean', 'Clean', 'CLEAN' } {
$env:PROJECT_CI_JOB = "clean"
$__exit = . "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_AUTOMATA}\common_windows-any.ps1"
Expand Down Expand Up @@ -207,6 +210,7 @@ switch ($args[0]) {
Write-Host " To package the repo product 🠚 $ ./ci.cmd package"
Write-Host " To release the repo product 🠚 $ ./ci.cmd release"
Write-Host " To stop a development 🠚 $ ./ci.cmd stop"
Write-Host " To deploy the new release 🠚 $ ./ci.cmd deploy"
Write-Host " To clean the workspace 🠚 $ ./ci.cmd clean"
Write-Host " To purge everything 🠚 $ ./ci.cmd purge"
}}
Expand Down
6 changes: 6 additions & 0 deletions automataCI/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,11 @@ stop|Stop|STOP)
code=$?
unset PROJECT_ARCH PROJECT_OS PROJECT_PATH_PWD PROJECT_PATH_ROOT
;;
deploy|Deploy|DEPLOY)
export PROJECT_CI_JOB="deploy"
. "${PROJECT_PATH_ROOT}/${PROJECT_PATH_AUTOMATA}/common_unix-any.sh"
code=$?
;;
clean|Clean|CLEAN)
export PROJECT_CI_JOB="clean"
. "${PROJECT_PATH_ROOT}/${PROJECT_PATH_AUTOMATA}/common_unix-any.sh"
Expand Down Expand Up @@ -279,6 +284,7 @@ purge|Purge|PURGE)
printf " To package the repo product 🠚 $ ./ci.cmd package\n"
printf " To release the repo product 🠚 $ ./ci.cmd release\n"
printf " To stop a development 🠚 $ ./ci.cmd stop\n"
printf " To deploy the new release 🠚 $ ./ci.cmd deploy\n"
printf " To clean the workspace 🠚 $ ./ci.cmd clean\n"
printf " To purge everything 🠚 $ ./ci.cmd purge\n"
;;
Expand Down
Binary file modified automataCI/docs/AutomataCI-Engineering-Specification.odt
Binary file not shown.
Binary file modified automataCI/docs/AutomataCI-Engineering-Specification.pdf
Binary file not shown.
35 changes: 35 additions & 0 deletions src/.ci/deploy_unix-any.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/sh
# Copyright 2023 (Holloway) Chew, Kean Ho <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at:
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.




# initialize
if [ "$PROJECT_PATH_ROOT" == "" ]; then
>&2 printf "[ ERROR ] - Please run from ci.cmd instead!\n"
return 1
fi

. "${PROJECT_PATH_ROOT}/${PROJECT_PATH_AUTOMATA}/services/io/os.sh"
. "${PROJECT_PATH_ROOT}/${PROJECT_PATH_AUTOMATA}/services/io/fs.sh"




# execute




# report status
return 0
34 changes: 34 additions & 0 deletions src/.ci/deploy_windows-any.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Copyright 2023 (Holloway) Chew, Kean Ho <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy
# of the License at:
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.




# initialize
if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) {
Write-Error "[ ERROR ] - Please run from ci.cmd instead!\n"
exit 1
}

. "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_AUTOMATA}\services\io\os.ps1"
. "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_AUTOMATA}\services\io\fs.ps1"




# execute




# report status
return 0

0 comments on commit 0cdc9cb

Please sign in to comment.