sfops
sfpSlackGithub
  • Overview
  • Features
  • Environments
    • Creating an Environment
    • Authenticating to Environments
    • Review Environments
      • Configuring Review Sandboxes
      • Creation and Allocation of Review Sandboxes
  • Project Workflows
    • sfops - Execute Issue Ops
    • sfops - On Pull Request Comments
    • sfops - Close Issues
    • sfops - Execute Every 30 mins
    • sfops - Daily Job Executor
    • sfops - Review Sandbox - Creator
    • sfops - On Push to Branch
    • sfops - Execute Releases to any env
    • sfops - Execute Releases
  • IssueOps
    • Access
      • Request elevated previlege in production
    • Release
      • Release a Domain
      • Hotfix Workflow
  • Changelog
    • November24
    • January25
  • DevCentral
    • Customising Menu
    • Extending using Custom Forms and Issue Ops Actions
  • self managed instances
    • Setup for self managed instances
      • 1. Create repositories
      • 2. Create a GitHub App
      • 3. Setting up sfops repository
      • 4. Trigger the workflows
      • 5. Setting up project repository
      • 6. Fetching upstream changes
        • 6.1 Manual Process for Updating sfops from Upstream
    • Update Instructions
      • Updating to v29.0.0
      • Updating to v30.3.1 and above
    • Workflow details
      • Sync Upstream Repository and Create Pull Request
  • Legal
    • Terms of Service for sfops
Powered by GitBook
On this page
  • Trigger
  • Schedule
  • Jobs
  1. Project Workflows

sfops - Execute Every 30 mins

This workflow is designed to execute cron operations every 30 minutes. It can be triggered manually or runs on a schedule.

name: 'sfops - Execute Every 30 mins'

# Read name of sandbox
on:
  workflow_dispatch:
  schedule:
      - cron: '30 * * * *'   


jobs:
  cron-every-30-mins:
    name: 'Exec cron operations every 30 mins'
    uses:   ${{ sfops.repo_owner }}/${{ sfops.action_repository }}/.github/workflows/cron-jobs-30-mins.yml@main
    with:
      sfopsbot-app-id: ${{ vars.SFOPSBOT_APP_ID }}
      path-to-config : "config/sandbox-pool-config.json"
      metrics-provider: ${{ vars.SFOPS_METRICS_PROVIDER }}
      dashboard-repo:  ${{ vars.SFOPS_DASHBOARD_REPO }}
    secrets:
      DEVHUB_SFDX_AUTH_URL: ${{ secrets.DEVHUB_SFDX_AUTH_URL }}
      DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }}
      DATADOG_HOST: ${{ secrets.DATADOG_HOST }}
      SFOPSBOT_APP_PRIVATE_KEY: ${{ secrets.SFOPSBOT_APP_PRIVATE_KEY }}
      NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }}    

Trigger

The workflow is triggered in two ways:

  1. Manually via workflow_dispatch

  2. Automatically every 30 minutes via a cron schedule

Schedule

schedule:
  - cron: '30 * * * *'

This cron expression means the job will run at the 30-minute mark of every hour.

Jobs

The workflow calls a reusable workflow (cron-jobs-30-mins.yml) which contains several jobs:

1. check-sandbox-status

This job checks the status of review sandboxes and provisions them if necessary.

Key steps:

  • Authenticate with DevHub

  • Provision sandboxes to "Available" status

  • Update sandbox status in a dashboard repository

2. update-scratchorg-status

This job reports the status of scratch orgs to dev central repository

3. update-sandbox-frontdoor-url

This job updates the frontdoor URL for sandboxes.

4. update-workitem-status

This job updates the status of work items and environment information.

Key steps:

  • Report environment information

  • Report work item status (likely related to Pull Requests)

5. execute-jobs

This job executes any pending jobs in the repository.

Previoussfops - Close IssuesNextsfops - Daily Job Executor

Last updated 10 months ago