From a995694a47f7e3a47d0e0254e37c6355c1c7f999 Mon Sep 17 00:00:00 2001 From: Rajpal Chauhan Date: Sun, 12 Mar 2023 03:05:21 -0700 Subject: [PATCH] testing Signed-off-by: Rajpal Chauhan --- .github/workflows/main.yaml | 62 +++++++++++++++++++------------------ 1 file changed, 32 insertions(+), 30 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 0eb90b6a..85c1b72a 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -1,18 +1,20 @@ name: Build & Test + on: workflow_dispatch: push: +env: + NAMESPACE: 4a9599-tools + BUILD_NAME: allure-ui + IMAGE_NAME: allure-ui + jobs: build: # if: github.event_name == 'push' && github.ref == 'refs/heads/main' runs-on: ubuntu-latest steps: - name: Image Build - env: - NAMESPACE: 4a9599-tools - BUILD_NAME: allure-ui - IMAGE_NAME: allure-ui uses: redhat-developer/openshift-actions@v2.0 with: version: "latest" @@ -21,31 +23,31 @@ jobs: cmd: | 'version' 'start-build ${BUILD_NAME} -n ${NAMESPACE} --follow' - - - deploys-test: - name: TEST Deployments - environment: test - runs-on: ubuntu-latest - strategy: - matrix: - name: [openshift] - include: - - name: openshift - file: openshift/openshift.deploy.yml - overwrite: true - - steps: - - uses: redhat-developer/openshift-actions@v2.0 - with: - file: ${{ matrix.file }} - openshift_namespace_url: ${{ secrets.OPENSHIFT_NAMESPACE }} + + deploy: + runs-on: ubuntu-latest + needs: [build] + steps: + - name: Dependant is running + uses: redhat-developer/openshift-actions@v2.0 + with: + version: 'latest' openshift_server_url: ${{ secrets.OPENSHIFT_SERVER }} - openshift_token_url: ${{ secrets.OPENSHIFT_TOKEN }} - overwrite: ${{ matrix.overwrite }} - parameters: - -p ZONE=test -p PROMOTE=${{ github.repository }}/${{ matrix.name }}:test - -p NAME=${{ github.event.repository.name }} ${{ matrix.parameters }} - penetration_test: true - + parameters: '{"apitoken": "${{ secrets.OPENSHIFT_TOKEN }}", "acceptUntrustedCerts": "true"}' + cmd: | + 'version' + '-n ${NAMESPACE} tag allure-ui:latest allure-ui:dev' + test: + runs-on: ubuntu-latest + needs: [deploy] + steps: + - name: Dependant is running + uses: redhat-developer/openshift-actions@v2.0 + with: + version: 'latest' + openshift_server_url: ${{ secrets.OPENSHIFT_SERVER }} + parameters: '{"apitoken": "${{ secrets.OPENSHIFT_TOKEN }}", "acceptUntrustedCerts": "true"}' + cmd: | + 'version' + '-n ${NAMESPACE} tag allure-ui:latest allure-ui:test' \ No newline at end of file