Philip Denys
03/20/2023, 11:45 AMCharan
05/31/2023, 4:17 PMerictgrubaugh
05/31/2023, 5:16 PMCharan
05/31/2023, 5:21 PMJoel Musheno
06/12/2023, 6:57 PMname: $(SourceBranchName)-$(Build.BuildId)
resources:
- repo: self
pool:
vmImage: 'ubuntu-latest'
trigger:
branches:
include:
- main
variables:
nodeVersion: '16.x'
dotNetVersion: '7.0.x'
stages:
- stage: LintAndScanForSecrets
displayName: Lint and Scan for Secrets
dependsOn: [] # this removes the implicit dependency on previous stage and causes this to run in parallel
jobs:
- job:
steps:
- task: NodeTool@0
displayName: 'Install NodeJS'
inputs:
versionSpec: $(nodeVersion)
- bash: |
yarn install
yarn run lint
workingDirectory: '$(System.DefaultWorkingDirectory)'
displayName: 'Lint Netsuite Account Customization Packages'
- task: MicrosoftSecurityDevOps@1
displayName: 'Secrets scanning with Microsoft Security DevOps'
inputs:
categories: 'secrets'
break: true
- stage: FooSandboxValidation
displayName: Foo Sandbox Validation
dependsOn: []
variables:
- group: Foo Netsuite (Sandbox)
jobs:
- job:
steps:
- task: NodeTool@0
displayName: 'Install NodeJS'
inputs:
versionSpec: $(nodeVersion)
- task: JavaToolInstaller@0
inputs:
versionSpec: '17'
jdkArchitectureOption: 'x64'
jdkSourceOption: 'PreInstalled'
- bash: npm install -g --acceptSuiteCloudSDKLicense @oracle/suitecloud-cli@1.6.2
displayName: 'Install SuiteCloud CLI'
- bash: suitecloud account:savetoken --account "$(netsuiteAccount)" --authid "$(name)" --tokenid "$(tokenId)" --tokensecret "$(tokenSecret)" || true
displayName: "Sandbox Netsuite account:savetoken"
workingDirectory: '$(System.DefaultWorkingDirectory)/Netsuite/AccountCustomization/Compass'
- bash: suitecloud project:validate --server
displayName: "Sandbox Netsuite project:validate"
workingDirectory: '$(System.DefaultWorkingDirectory)/Netsuite/AccountCustomization/Foo'
- stage: FooProductionValidation
displayName: Foo Production Validation
dependsOn: []
variables:
- group: Foo Netsuite (Production)
jobs:
- job:
steps:
- task: NodeTool@0
displayName: 'Install NodeJS'
inputs:
versionSpec: $(nodeVersion)
- task: JavaToolInstaller@0
inputs:
versionSpec: '17'
jdkArchitectureOption: 'x64'
jdkSourceOption: 'PreInstalled'
- bash: npm install -g --acceptSuiteCloudSDKLicense @oracle/suitecloud-cli@1.6.2
displayName: 'Install Suitecloud CLI'
- bash: suitecloud account:savetoken --account "$(netsuiteAccount)" --authid "$(name)" --tokenid "$(tokenId)" --tokensecret "$(tokenSecret)" || true
displayName: "Sandbox Netsuite account:savetoken"
workingDirectory: '$(System.DefaultWorkingDirectory)/Netsuite/AccountCustomization/Foo'
- bash: suitecloud project:validate --server
displayName: "Sandbox Netsuite project:validate"
workingDirectory: '$(System.DefaultWorkingDirectory)/Netsuite/AccountCustomization/Foo'
- stage: PackageArtifacts
displayName: Package Artifacts
dependsOn:
- LintAndScanForSecrets
- FooSandboxValidation
- FooProductionValidation
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
jobs:
- job:
steps:
- publish: '$(System.DefaultWorkingDirectory)/Netsuite/AccountCustomization'
artifact: FooSDFPackge
Joel Musheno
06/12/2023, 6:59 PMCharan
06/12/2023, 7:45 PMJoel Musheno
06/12/2023, 8:06 PM$tokenId
$tokenSecret
)
It will, most likely, not work with github actions. Github has it’s library of ‘actions’ (https://github.com/marketplace?type=actions) and Azure DevOps has it’s library of ‘tasks’ (https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/?view=azure-pipelines&viewFallbackFrom=azure-devops)
They perform similar actions, but the syntax differences is something you’ll have to research.
e.g. -bash:
executes a shell script/inline command in ADO
The github equivalent looks to be
- shell: bash
run: |
expr 1 + 1 > output.log
erictgrubaugh
06/12/2023, 10:03 PMerictgrubaugh
06/12/2023, 10:04 PMerictgrubaugh
06/12/2023, 10:06 PMerictgrubaugh
06/12/2023, 10:07 PMerictgrubaugh
06/12/2023, 10:08 PMerictgrubaugh
06/12/2023, 10:08 PMCharan
06/13/2023, 5:49 AM