Build and Deploy Image #57
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
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 | |
uses: redhat-developer/[email protected] | |
with: | |
version: "latest" | |
openshift_server_url: ${{ secrets.OPENSHIFT_SERVER}} | |
parameters: '{"apitoken": "${{ secrets.OPENSHIFT_TOKEN}}", "acceptUntrustedCerts": "true"}' | |
cmd: | | |
'version' | |
'start-build ${BUILD_NAME} -n ${NAMESPACE} --follow' | |
deploy: | |
runs-on: ubuntu-latest | |
needs: [build] | |
steps: | |
- name: Dependant is running | |
uses: redhat-developer/[email protected] | |
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:dev' | |
test: | |
runs-on: ubuntu-latest | |
needs: [deploy] | |
steps: | |
- name: Dependant is running | |
uses: redhat-developer/[email protected] | |
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' |