-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* create new workflow to reset demo pod replicas * install oc in workflow * change name * use proper namespace * provide debug output * trigger scaling * clean up action * run reset demo on workflow dispatch
- Loading branch information
1 parent
1c45396
commit 9e228fd
Showing
2 changed files
with
31 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: 'Reset Demo instances' | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
env: | ||
OPENSHIFT_SERVER: ${{ secrets.OPENSHIFT_SERVER }} | ||
OPENSHIFT_TOKEN: ${{ secrets.OPENSHIFT_TOKEN }} | ||
OPENSHIFT_NAMESPACE: "pitc-okr-demo" | ||
POD_NAME: "demo-okr-application" | ||
|
||
jobs: | ||
reset-demo: | ||
runs-on: ubuntu-24.04 | ||
name: Scale down and restart demo application | ||
steps: | ||
- name: Install CLI tools from GitHub | ||
uses: redhat-actions/openshift-tools-installer@v1 | ||
with: | ||
oc: "4.15" | ||
|
||
- name: Log in to OpenShift | ||
uses: redhat-actions/oc-login@v1 | ||
with: | ||
openshift_server_url: ${{ env.OPENSHIFT_SERVER }} | ||
openshift_token: ${{ env.OPENSHIFT_TOKEN }} | ||
namespace: ${{ env.OPENSHIFT_NAMESPACE }} | ||
|
||
- name: set pod replicas to 0 and trigger auto restart | ||
run: oc scale deployment ${{env.POD_NAME}} --replicas 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters