Merge pull request #657 from lstocchi/openshift_action_ci
Add support for OpenShift
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
# This workflow will set up the oc CLI in your GitHub Action workflow and deploy your application to your OpenShift cluster.
|
||||
#
|
||||
# This workflow assumes you already have access to an OpenShift cluster.
|
||||
# For instructions to get started with OpenShift see https://www.openshift.com/try
|
||||
#
|
||||
# To configure this workflow:
|
||||
#
|
||||
# 1. Set up a secret in your repository named OPENSHIFT_SERVER_URL with the value of your OpenShift server URL.
|
||||
#
|
||||
# 2. Set up another secret named API_TOKEN with the value of a valid token to authenticate to OpenShift.
|
||||
#
|
||||
# 3. Change the values for the PROJECT and APP_NAME environment variables (below).
|
||||
#
|
||||
# For more information on the OpenShift Action, refer to https://github.com/redhat-developer/openshift-actions
|
||||
name: Build and Deploy to OpenShift
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- $default-branch
|
||||
|
||||
# Environment variables available to all jobs and steps in this workflow
|
||||
env:
|
||||
PROJECT: myproject
|
||||
APP_NAME: myapp
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Setup and Deploy
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
# Set up the oc CLI, authenticate and deploy to OpenShift
|
||||
- name: Set up oc CLI and deploy to OpenShift
|
||||
uses: redhat-developer/openshift-actions@v2.1.0
|
||||
with:
|
||||
version: '4.3'
|
||||
openshift_server_url: ${{ secrets.OPENSHIFT_SERVER_URL }}
|
||||
parameters: '{"apitoken": "${{ secrets.API_TOKEN }}", "acceptUntrustedCerts": "true"}'
|
||||
cmd: |
|
||||
oc project ${PROJECT}
|
||||
oc new-app ${GITHUB_WORKSPACE} --name ${APP_NAME}
|
||||
# Expose the service created by using the oc CLI installed previously
|
||||
- name: Execute additional oc commands
|
||||
run: |
|
||||
oc expose svc/${{ env.APP_NAME }}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"name": "OpenShift",
|
||||
"description": "Set up the oc CLI in your GitHub Actions workflow and deploy your application to OpenShift.",
|
||||
"creator": "Red Hat",
|
||||
"iconName": "openshift",
|
||||
"categories": null
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<svg id="icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><style>.cls-1{fill:#d71e00;}.cls-2{fill:#c21a00;}.cls-3{fill:#fff;}.cls-4{fill:#c3c3c3;}.cls-5{fill:#d5d5d5;}</style></defs><title>plugin_icons_0918_RGB_openshift_color</title><circle class="cls-1" cx="50" cy="50" r="50"/><path class="cls-2" d="M85.36,14.64A50,50,0,0,1,14.64,85.36Z"/><path class="cls-3" d="M58.79,32.55a19.22,19.22,0,0,1,5.62,4l10.42-3.79A29.77,29.77,0,0,0,20.91,52.39L31.33,48.6A19.29,19.29,0,0,1,58.79,32.55"/><path class="cls-3" d="M26.72,55.51l-9.89,3.61A30.05,30.05,0,0,0,21.48,69.2l10.39-3.78a19.54,19.54,0,0,1-5.15-9.91"/><path class="cls-3" d="M72.46,38.87l-9.9,3.6A19.39,19.39,0,0,1,65,53.37l10.4-3.78a30.22,30.22,0,0,0-2.92-10.72"/><path class="cls-4" d="M35.63,49.11a16.24,16.24,0,0,1,0-2.09L25.25,50.81c.05.67.14,1.33.24,2Z"/><path class="cls-5" d="M35.62,48.2c0-.4,0-.79.05-1.18C35.64,47.41,35.62,47.8,35.62,48.2Z"/><path class="cls-5" d="M35.62,48.62c0,.16,0,.33,0,.49L25.49,52.8c-.1-.66-.19-1.32-.24-2a30.5,30.5,0,0,0,.82,4.94l9.9-3.6A19.83,19.83,0,0,1,35.62,48.62Z"/><path class="cls-4" d="M80.19,32.76c-.32-.53-.66-1.06-1-1.57L68.75,35A17.85,17.85,0,0,1,70,36.46Z"/><path class="cls-5" d="M80.18,32.76,70,36.46a21,21,0,0,1,1.78,2.64l9.89-3.6A29.32,29.32,0,0,0,80.18,32.76Z"/><path class="cls-5" d="M68.75,35l10.41-3.79L68.75,35l0,0Z"/><path class="cls-5" d="M26.39,67.42A29.9,29.9,0,0,0,29,70.63l11.32-4.12a19.33,19.33,0,0,1-3.57-2.88ZM80.29,47.8l-10.4,3.78A19,19,0,0,1,69,56.06l11.32-4.13a30,30,0,0,0,0-4.13"/><path class="cls-3" d="M69,56.06c.1-.29.18-.58.26-.87a19,19,0,0,1-1.13,3.08,19.36,19.36,0,0,1-25.72,9.36,18.43,18.43,0,0,1-2.3-1.3l.24.18L29.05,70.63a29.49,29.49,0,0,0,9,6.47,29.84,29.84,0,0,0,39.6-14.42,29.49,29.49,0,0,0,2.71-10.75Z"/><path class="cls-3" d="M27.61,69c-.42-.51-.83-1-1.22-1.58C26.78,68,27.19,68.49,27.61,69Z"/><path class="cls-3" d="M80.29,47.8c0,.67.08,1.33.09,2C80.37,49.13,80.34,48.46,80.29,47.8Z"/><path class="cls-3" d="M29,70.52c-.36-.37-.7-.76-1-1.16C28.25,69.76,28.59,70.15,29,70.52Z"/><path class="cls-3" d="M69.38,54.77c.1-.42.19-.85.27-1.28C69.57,53.92,69.48,54.35,69.38,54.77Z"/><path class="cls-3" d="M80.33,51.83c0-.55,0-1.1,0-1.65C80.37,50.73,80.36,51.28,80.33,51.83Z"/><path class="cls-3" d="M38.73,65.35,38.32,65Z"/><path class="cls-3" d="M69.72,53.06c.07-.49.14-1,.17-1.46C69.86,52.08,69.79,52.57,69.72,53.06Z"/></svg>
|
||||
|
After Width: | Height: | Size: 2.3 KiB |
Reference in New Issue
Block a user