Skip to content

Commit

Permalink
Add PR Check pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
janboll committed Dec 20, 2024
1 parent 6409973 commit 54d8403
Showing 1 changed file with 86 additions and 0 deletions.
86 changes: 86 additions & 0 deletions .github/workflows/services-pr-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
---
name: ARO HCP Service PR Check
env:
DEPLOY_ENV: ${{ inputs.deploy_env }}
SKIP_CONFIRM: true
on:
pull_request:
paths:
- '.github/workflows/aro-hcp-cd.yml'
- '.github/workflows/environment-infra-cd.yml'
- '.github/workflows/services-cd.yml'
- '.github/workflows/services-ci.yml'
- 'config/config.yaml'
- 'dev-infrastructure/**/*.bicep'
- 'dev-infrastructure/**/*.bicepparam'
- 'dev-infrastructure/configurations/*'
- 'frontend/**'
- 'backend/**'
- 'cluster-service/**'
- 'internal/**'
- 'maestro/**'
- 'pko/**'
- 'acm/**'
- 'hypershiftoperator/**'
- 'image-sync/**/'
- 'tooling/image-sync/**'
- 'tooling/templatize/**'
- 'config/*'
types:
- opened
- synchronize
- reopened

concurrency:
group: ${{ github.workflow }}-service-cd-${{ inputs.deploy_env }}
cancel-in-progress: false

jobs:

service_cluster_pr_check:
permissions:
id-token: 'write'
contents: 'read'
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 1

- name: "install azure-cli"
uses: "Azure/ARO-HCP@main"

- name: 'Az CLI login'
uses: azure/login@a65d910e8af852a8061c627c456678983e180302 # v2.2.0
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}

- uses: azure/setup-kubectl@3e0aec4d80787158d308d7b364cb1b702e7feb7f # v4.0.0

# Used to deploy Cluster Service
- name: 'Install oc'
run: |
curl -sfLo - https://mirror.openshift.com/pub/openshift-v4/clients/ocp/4.15.9/openshift-client-linux.tar.gz | tar xzf -
sudo mv oc /usr/local/bin/oc
chmod +x /usr/local/bin/oc
# Used to deploy Maestro Server, Frontend
- uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4.2.0
with:
version: 'v3.13.3'

- uses: azure/use-kubelogin@76597ae0fcbaace21b05e13a2cbf8daee2c6e820 # v1.2
with:
kubelogin-version: 'v0.1.3'

# Prepare kubeconfig
- name: 'Prepare kubeconfig'
run: |
cd dev-infrastructure/
make svc.aks.kubeconfig
- name: 'Deploy Frontend'
run: |
./run_pipeline.sh dev ./frontend/pipeline.yaml deploy -c public -d

0 comments on commit 54d8403

Please sign in to comment.