Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Create CI job to have an automated check that fails if a pattern file has an issue, model data missing, etc. (mesheryctl or etc.) #111

Open
MarioArriaga92 opened this issue Jun 22, 2023 · 6 comments · May be fixed by #128
Assignees
Labels

Comments

@MarioArriaga92
Copy link

Current Behavior

During today's Meshery Build & Release meeting, @theBeginner86 shared with audience there was a problem when he tried to test IstioSpire design in PR #109 because Custom Resource wasn't being handled properly in the UI:
CleanShot 2023-06-22 at 11 32 42

Desired Behavior

Since resolution is that there was a "bug" in the updates made to the samples/IstioSPIRE.yaml pattern file itself the suggestion is if we can create a Github Workflow CI job so we can smoke test changes made to these sample files in an automated and standard fashion

The idea is to simplify maintenance of sample pattern files and avoid false positive failures across meshery adapter or other CI runs across Meshery repos and end users that consume these samples.

Implementation

No idea yet but I'm sure contributors will have great recommendations here.

Acceptance Tests


Contributor Guides and Resources

@professorabhay
Copy link

Hey @MarioArriaga92, I am working on it and I tried by making some changes to it locally.
Please assign it to me so that I can raise a PR.

@professorabhay
Copy link

image


on:
  push:
    paths:
      - 'samples/IstioSPIRE.yaml'

jobs:
  smoke_test:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout Repository
        uses: actions/checkout@v2

      - name: Set up Kubernetes
        uses: azure/setup-kubectl@v1
        with:
          version: 'latest'

      - name: Set up Istio
        run: |
          curl -L https://istio.io/downloadIstio | ISTIO_VERSION=1.12.0 sh -
          export PATH="$PATH:$HOME/istio-1.12.0/bin"
          istioctl install --set profile=demo
      - name: Set up SPIRE
        run: |
          # Add the necessary commands to set up SPIRE on your test cluster
      - name: Deploy Sample IstioSPIRE.yaml
        run: |
          kubectl apply -f samples/IstioSPIRE.yaml
      - name: Wait for Deployment to Be Ready
        run: |
          kubectl wait --for=condition=available deployment -l app=myapp -n mynamespace --timeout=300s
      - name: Run Smoke Tests
        run: |
          # Add the necessary commands to run smoke tests on the deployed sample
      - name: Delete Sample Deployment
        run: |
          kubectl delete -f samples/IstioSPIRE.yaml```

@MarioArriaga92
Copy link
Author

Hey @professorabhay are you working on this?

@MarioArriaga92
Copy link
Author

Hey @professorabhay are you working on this?

I do not see any PR in https://github.com/service-mesh-patterns/service-mesh-patterns/pulls yet though

@professorabhay
Copy link

Hi @MarioArriaga92,

Yes, I've worked on it. I created a template with some defined steps, but there are still some things that need further refinement. I also require some guidance, as I'm a beginner. I've provided the file content above. Could you please take a look at it?

@MarioArriaga92
Copy link
Author

@professorabhay can you please visit https://github.com/service-mesh-patterns/service-mesh-patterns/pulls and create new PR? The screenshot you shared makes it clear you've created a PR against your own fork, not against the upstream repo (service-mesh-patterns/service-mesh-patterns).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 participants