Skip to content

Chanage allowable to recommended #372

Chanage allowable to recommended

Chanage allowable to recommended #372

Workflow file for this run

name: Openshift deployer
on:
push:
branches:
- dev
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Install oc client v3.11.0
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
run: |
cd $HOME
curl -LO https://github.com/openshift/origin/releases/download/v3.11.0/openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit.tar.gz
tar -xf openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit.tar.gz
cd openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit
chmod +x oc
echo "::set-env name=PATH_TO_OC::$PATH:$(pwd)"
- name: Login to openshift
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
run: |
cd $HOME
export PATH=$PATH_TO_OC
/home/runner/openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit/oc login https://console.pathfinder.gov.bc.ca:8443 --token=${{ secrets.sa_token }}
- name: Build image
env:
APP_NAME: range-myra-web-ghactiontest
IMAGE_STREAM_NAME: $APP_NAME
GIT_BRANCH_NAME: ${GITHUB_REF##*/}
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
run: |
cd $HOME
export PATH=$PATH_TO_OC
cd $GITHUB_WORKSPACE
/home/runner/openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit/oc version
/home/runner/openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit/oc project range-myra-tools
/home/runner/openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit/oc cancel-build bc/range-myra-web-dev-build
/home/runner/openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit/oc start-build range-myra-web-dev-build -F
- name: Build caddy image & tag image
env:
APP_NAME: range-myra-web-ghactiontest
IMAGE_STREAM_NAME: $APP_NAME
GIT_BRANCH_NAME: ${GITHUB_REF##*/}
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
run: |
cd $HOME
export PATH=$PATH_TO_OC
/home/runner/openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit/oc project range-myra-tools
/home/runner/openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit/oc cancel-build bc/range-myra-web-caddy-dev-build
/home/runner/openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit/oc start-build range-myra-web-caddy-dev-build --wait=true
/home/runner/openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit/oc tag range-myra-web-caddy:latest range-myra-web-caddy:test