Skip to content
Merged
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/ci-deploy-demo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Deploy Jaeger Demo to OKE

on:
schedule:
- cron: '0 5 * * *' # Daily at 5 AM UTC
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the deploy fails I would rather it happens on US ET time, not at midnight .

#testing
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:

permissions:
secrets: read

jobs:
deploy:
name: Deploy Jaeger to OKE Cluster
runs-on: ubuntu-latest
env:
OCI_CLI_USER: ${{ secrets.OCI_CLI_USER }}
OCI_CLI_TENANCY: ${{ secrets.OCI_CLI_TENANCY }}
OCI_CLI_FINGERPRINT: ${{ secrets.OCI_CLI_FINGERPRINT }}
OCI_CLI_KEY_CONTENT: ${{ secrets.OCI_CLI_KEY_CONTENT }}
OCI_CLI_REGION: ${{ secrets.OCI_CLI_REGION }}

steps:
- name: Configure kubectl with OKE
uses: oracle-actions/[email protected]
with:
cluster: ${{ secrets.OKE_CLUSTER_OCID }}
enablePrivateEndpoint: false

- name: Clone Jaeger repository
run: git clone https://github.com/jaegertracing/jaeger.git
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The current approach clones the main branch of the Jaeger repository regardless of which branch or PR triggered the workflow. For PR and push events, this means you're not testing the actual code changes being proposed.

Consider replacing this with the standard GitHub checkout action:

- name: Checkout code
  uses: actions/checkout@v3

This will automatically check out the correct branch or PR that triggered the workflow, ensuring you're testing the actual changes under review rather than the main branch.

Suggested change
- name: Clone Jaeger repository
run: git clone https://github.com/jaegertracing/jaeger.git
- name: Checkout code
uses: actions/checkout@v3

Spotted by Diamond

Is this helpful? React 👍 or 👎 to let us know.


- name: Deploy using Jaeger's deploy-all.sh
run: |
cd ./jaeger/examples/oci
bash ./deploy-all.sh
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow should use actions/checkout@v3 instead of manually cloning the repository. The current approach creates a fresh clone rather than using the repository context where the workflow is running, which can cause path inconsistencies and doesn't reflect the actual code being submitted in the PR.

Consider replacing:

- name: Clone Jaeger repository
  run: git clone https://github.com/jaegertracing/jaeger.git

- name: Deploy using Jaeger's deploy-all.sh
  run: |
    cd ./jaeger/examples/oci
    bash ./deploy-all.sh

With:

- name: Checkout repository
  uses: actions/checkout@v3

- name: Deploy using Jaeger's deploy-all.sh
  run: |
    cd ./examples/oci
    bash ./deploy-all.sh

This ensures the workflow operates on the correct version of the code and simplifies the path references.

Suggested change
- name: Clone Jaeger repository
run: git clone https://github.com/jaegertracing/jaeger.git
- name: Deploy using Jaeger's deploy-all.sh
run: |
cd ./jaeger/examples/oci
bash ./deploy-all.sh
- name: Checkout repository
uses: actions/checkout@v3
- name: Deploy using Jaeger's deploy-all.sh
run: |
cd ./examples/oci
bash ./deploy-all.sh

Spotted by Diamond

Is this helpful? React 👍 or 👎 to let us know.

Loading