diff --git a/.github/workflows/openshift-build.yml b/.github/workflows/openshift-build.yml new file mode 100644 index 00000000..69791300 --- /dev/null +++ b/.github/workflows/openshift-build.yml @@ -0,0 +1,24 @@ +name: Trigger OpenShift Build + +on: + push: + branches: [ update-app2 ] + +jobs: + trigger-build: + runs-on: ubuntu-latest + + steps: + - name: Install OC CLI + run: | + curl -LO "https://mirror.openshift.com/pub/openshift-v4/clients/oc/latest/linux/oc.tar.gz" + tar -xvf oc.tar.gz + sudo mv oc /usr/local/bin/oc + + - name: Login to OpenShift + run: | + oc login https://api.rm3.7wse.p1.openshiftapps.com:6443 --token=${{ secrets.OPENSHIFT_TOKEN }} + + - name: Start Build in OpenShift + run: | + oc start-build version -n jesusalmanza-dev diff --git a/express-helloworld/app.js b/express-helloworld/app.js index 782ccf03..9bc5c939 100644 --- a/express-helloworld/app.js +++ b/express-helloworld/app.js @@ -5,6 +5,10 @@ app.get('/', function (req, res) { res.send('Hello World!\n'); }); +app.get('/mars', function(req, res) { + res.send('Hello Mars!\n'); +}) + app.listen(8080, function () { console.log('Example app listening on port 8080!'); }); diff --git a/version/app.js b/version/app.js index ea830239..c2bae735 100644 --- a/version/app.js +++ b/version/app.js @@ -5,7 +5,7 @@ var response; app.get('/', function (req, res) { - response = 'This is version 1 of the app.' + '\n'; + response = 'This is version 6 of the app.' + '\n'; //send the response to the client res.send(response);