Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

When calling templated steps, GitHub does not contain an env block where we you would normally set the DataStage project name. Instead, it uses a template, with arguments that are passed in. So in this case the DataStage project name is created as a parameter passed into the template.

Code Block
Deploy_CI:
  name: Deploy - CI

  # The “with” statement that supplies arguments can only take elements from the github context and the “needs”
  # object, so you MUST have a line that “needs” the job where you set the values and return the outputs.
  needs: [EnvSetupBase, EnvSetupAgent, EnvSetup117Engine, Create_DSParams_Diff_Artifact]

  # The “uses” statement that calls the reusable workflow can’t evaluate expressions yet.
  # That means the repo name, branch, etc. must be hardcoded.
  uses: DataMigrators/demo1117.github.mettleci.io/.github/workflows/deploy-template.yaml@main

  # The “with” statement that supplies arguments cannot yet parse expressions. :-(
  with:
    ...
    EnvID: ci
    DatastageProject: "${{ needs.EnvSetupBase.outputs.var_BaseIISProjectName }}_ci" # Set the DataStage target project name
    ...

...