microsoft / AL-Go

The plug-and-play DevOps solution for Business Central app development on GitHub
MIT License
280 stars 115 forks source link

Deliver to Storage is not using ubuntu runner #1103

Closed gntpet closed 3 months ago

gntpet commented 3 months ago

Hey @freddydk ,

We recently got into the trouble with our github costs :) It trigger us to change our configuration and we switched to ubuntu-latest for the trivial jobs. We can see savings especially on Deployment Jobs, which costed us ~2.5$ per each deployment 🙃

We still see some room for the improvement. For example job "Deliver to Storage" is still using our expensive build machine. Could you please make code adjustments, so it would use "runs-on" setting?

image

Our settings are:

{
  "type": "PTE",
  "templateUrl": "https://github.com/microsoft/AL-Go-PTE@main",
  "treatTestFailuresAsWarnings": true,
  "doNotRunBcptTests": true,
  "enableCodeCop": true,
  "rulesetFile": "../cicd.ruleset.json",
  "companyName": "TNM Automated Test",
  "runs-on": "ubuntu-latest",
  "githubRunner": "srs-eid",
  "defaultNewContainerParameters": {
    "isolation": "hyperv"
  },
  "skipUpgrade": true,
  "environments": [
    "QA"
  ],
  "CICDPushBranches": [
    "main",
    "release/*",
    "feature/*"
  ],
  "CICDPullRequestBranches": [
    "main",
    "release/*",
    "features/*",
    "bug/*"
  ],
  "DeliverToStorage": {
    "Branches": [
      "main",
      "release/*"
    ]
  },
  "DeployToQA": {
    "EnvironmentType": "SaaS",
    "EnvironmentName": "QA",
    "Projects": "SRS.nl",
    "Branches": [
      "main"
    ],
    "ContinuousDeployment": true,
    "runs-on": "ubuntu-latest"
  },
  "DeployToQA24": {
    "EnvironmentType": "SaaS",
    "EnvironmentName": "QA24",
    "Projects": "SRS.nl",
    "Branches": [
      "feature/bc24-update-EID-3621"
    ],
    "ContinuousDeployment": true,
    "runs-on": "ubuntu-latest"
  },
  "DeployToUAT": {
    "EnvironmentType": "SaaS",
    "EnvironmentName": "UAT",
    "Projects": "SRS.nl",
    "Branches": [
      "release/*"
    ],
    "ContinuousDeployment": false,
    "runs-on": "ubuntu-latest"
  },
  "DeployToPROD": {
    "EnvironmentType": "SaaS",
    "EnvironmentName": "PROD",
    "Projects": "SRS.nl",
    "Branches": [
      "release/*"
    ],
    "ContinuousDeployment": false,
    "runs-on": "ubuntu-latest"
  },
  "EnableTaskScheduler": true,
  "doNotRunTests": true,
  "alwaysBuildAllProjects": true,
  "PullRequestTrigger": "pull_request",
  "CurrentSchedule": "0 2 * * *",
  "NextMinorSchedule": "0 2 * * 6",
  "NextMajorSchedule": "0 2 * * 0",
  "templateSha": "a6b2e468579e02a31a9cc9a2ae178a1e6beadf00"
}
freddydk commented 3 months ago

Did you run Update AL-Go System Files after changing runs-on in your repo settings? (I will specify this in the docs - it isn't clear today)

When I look in my CICD.yaml after updating AL-Go System Files - mine is using ubuntu (also for initialize and checkforupdates) image

gntpet commented 3 months ago

You are right @freddydk. I just checked and it got fixed last somewhere last week. I guess it got fixed after running al-go system update, as you suggested.