Skip to content

Commit

Permalink
update oc login
Browse files Browse the repository at this point in the history
  • Loading branch information
kuanfandevops committed May 7, 2024
1 parent 2bddd3a commit 0e68bb0
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 30 deletions.
12 changes: 4 additions & 8 deletions .github/workflows/pr-build-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ jobs:
ref: refs/pull/${{ inputs.pr-number }}/head

- name: Log in to Openshift
# uses: redhat-actions/[email protected]
uses: smlgbl/oc-login@main
uses: redhat-actions/[email protected]
with:
openshift_server_url: ${{ secrets.openshift-server }}
openshift_token: ${{ secrets.openshift-token }}
Expand All @@ -63,8 +62,7 @@ jobs:
ref: refs/pull/${{ inputs.pr-number }}/head

- name: Log in to Openshift
# uses: redhat-actions/[email protected]
uses: smlgbl/oc-login@main
uses: redhat-actions/[email protected]
with:
openshift_server_url: ${{ secrets.openshift-server }}
openshift_token: ${{ secrets.openshift-token }}
Expand All @@ -90,8 +88,7 @@ jobs:
ref: refs/pull/${{ inputs.pr-number }}/head

- name: Log in to Openshift
# uses: redhat-actions/[email protected]
uses: smlgbl/oc-login@main
uses: redhat-actions/[email protected]
with:
openshift_server_url: ${{ secrets.openshift-server }}
openshift_token: ${{ secrets.openshift-token }}
Expand All @@ -117,8 +114,7 @@ jobs:
ref: refs/pull/${{ inputs.pr-number }}/head

- name: Log in to Openshift
# uses: redhat-actions/[email protected]
uses: smlgbl/oc-login@main
uses: redhat-actions/[email protected]
with:
openshift_server_url: ${{ secrets.openshift-server }}
openshift_token: ${{ secrets.openshift-token }}
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/pr-deploy-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ jobs:
ref: refs/pull/${{ inputs.pr-number }}/head

- name: Log in to Openshift
# uses: redhat-actions/[email protected]
uses: smlgbl/oc-login@main
uses: redhat-actions/[email protected]
with:
openshift_server_url: ${{ secrets.openshift-server }}
openshift_token: ${{ secrets.openshift-token }}
Expand Down
21 changes: 8 additions & 13 deletions openshift/templates/archieve/pr-dev-database-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,42 +8,38 @@ on:
type: string
dev-suffix:
required: true
type: string
type: string
secrets:
dev-namespace:
required: true
itvr-dev-username:
required: true
itvr-dev-password:
required: true
required: true
openshift-server:
required: true
openshift-token:
required: true

jobs:
required: true
openshift-token:
required: true

jobs:
database:

name: Start Database
runs-on: ubuntu-latest
timeout-minutes: 60

steps:

- name: Check out repository
uses: actions/checkout@v4
with:
ref: refs/pull/${{ inputs.pr-number }}/head

- name: Log in to Openshift
# uses: redhat-actions/[email protected]
uses: smlgbl/oc-login@main
uses: redhat-actions/[email protected]
with:
openshift_server_url: ${{ secrets.openshift-server }}
openshift_token: ${{ secrets.openshift-token }}
insecure_skip_tls_verify: true
namespace: ${{ secrets.dev-namespace }}
namespace: ${{ secrets.dev-namespace }}

- name: Setup Database
shell: bash {0}
Expand All @@ -65,4 +61,3 @@ jobs:
oc -n ${{ secrets.dev-namespace }} exec itvr-spilo${{ inputs.dev-suffix }}-0 -- psql -c "ALTER SYSTEM SET log_checkpoints='off'" || true
oc -n ${{ secrets.dev-namespace }} exec itvr-spilo${{ inputs.dev-suffix }}-0 -- psql -c "select pg_reload_conf()" || true
fi
11 changes: 4 additions & 7 deletions openshift/templates/archieve/pr-teardown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,27 @@ on:
pull_request:
types: closed
branches:
- 'release-*'
- "release-*"

env:
TOOLS_NAMESPACE: ${{ secrets.OPENSHIFT_NAMESPACE_PLATE }}-tools
DEV_NAMESPACE: ${{ secrets.OPENSHIFT_NAMESPACE_PLATE }}-dev

jobs:

teardown-on-dev:
if: endsWith( github.event.pull_request.title, 'build-on-dev' )
name: Tear ITVR down on Dev
runs-on: ubuntu-latest
timeout-minutes: 20

steps:

steps:
- name: Log in to Openshift
# uses: redhat-actions/[email protected]
uses: smlgbl/oc-login@main
uses: redhat-actions/[email protected]
with:
openshift_server_url: ${{ secrets.OPENSHIFT_SERVER }}
openshift_token: ${{ secrets.OPENSHIFT_TOKEN }}
insecure_skip_tls_verify: true
namespace: ${{ env.TOOLS_NAMESPACE }}
namespace: ${{ env.TOOLS_NAMESPACE }}

- name: Undeploy on Dev
shell: bash {0}
Expand Down

0 comments on commit 0e68bb0

Please sign in to comment.