Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: int tests - update kv-spc-secret-name and add --template-content input to workflow call #181

Merged
merged 4 commits into from
Apr 9, 2024

Conversation

c-ryan-k
Copy link
Member

@c-ryan-k c-ryan-k commented Apr 5, 2024

This PR also adds --template-file params on reusable workflow_call triggers in our integration tests.

It consumes the contents of the string input as a file (output from another action) like so:

jobs:
    create-template:
      outputs:
        template: ${{ steps.aio-template.outputs.template }}
        ...
        - name: 'Create AIO Template'
          id: aio-template
          run: |
            az extension add --name azure-iot-ops -y
            echo 'template<<EOF' >> $GITHUB_OUTPUT
            echo "$(az iot ops init --cluster test -g ${{ inputs.resource-group }} --show-template)" >> $GITHUB_OUTPUT
            echo 'EOF' >> $GITHUB_OUTPUT
          
    run-integration-tests:
        uses: azure/azure-iot-ops-cli-extension/.github/workflows/int_test.yml@int_test_updates
        needs: [create-template]
        with:
            resource-group: ${{ inputs.resource-group || 'ops-cli-int-test-rg' }}
            template-content: ${{ needs.create-template.outputs.template }}
            ...

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Thank you for contributing to Azure IoT Operations tooling!

This checklist is used to make sure that common guidelines for a pull request are followed.

General Guidelines

Intent for Production

  • It is expected that pull requests made to default or core branches such as dev or main are of production grade. Corollary to this, any merged contributions to these branches may be deployed in a public release at any given time. By checking this box, you agree and commit to the expected production quality of code.

Basic expectations

  • If introducing new functionality or modified behavior, are they backed by unit and/or integration tests?
  • In the same context as above are command names and their parameter definitions accurate? Do help docs have sufficient content?
  • Have all the relevant unit and integration tests pass? i.e. pytest <project root> -vv. Please provide evidence in the form of a screenshot showing a succesful run of tests locally OR a link to a test pipeline that has been run against the change-set.
  • Have linter checks passed using the .pylintrc and .flake8 rules? Look at the CI scripts for example usage.
  • Have extraneous print or debug statements, commented out code-blocks or code-statements (if any) been removed from the surface area of changes?
  • Have you made an entry in HISTORY.rst which concisely explains your user-facing feature or change?

Azure IoT Operations CLI maintainers reserve the right to enforce any of the outlined expectations.

A PR is considered ready for review when all basic expectations have been met (or do not apply).

@c-ryan-k
Copy link
Member Author

c-ryan-k commented Apr 8, 2024

@c-ryan-k c-ryan-k marked this pull request as ready for review April 8, 2024 18:28
@c-ryan-k c-ryan-k requested a review from digimaun as a code owner April 8, 2024 18:28
@digimaun
Copy link
Member

digimaun commented Apr 8, 2024

Sample run here: https://github.com/c-ryan-k/azure-iot-ops-cli-extension/actions/runs/8604586481/job/23579053939

image

Is the PR description accurate? I see template-content being added to the IT workflow.

Any sample run that uses the new param ? We should consider having one of the matrix configurations (or add a new one) that exercises --template-file.

kv-sat-secret-name:
description: Key Vault Secure Access Token Secret Name
kv-spc-secret-name:
description: Key Vault secret name to be used as the default SPC secret.
Copy link
Member

Choose a reason for hiding this comment

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

tiny nit, shall we end all description sentences with period?

@c-ryan-k c-ryan-k changed the title fix: update kv-spc-secret-name param and add --template-file param to workflow fix: int tests- update kv-spc-secret-name and add --template-content input to workflow call Apr 8, 2024
@c-ryan-k c-ryan-k changed the title fix: int tests- update kv-spc-secret-name and add --template-content input to workflow call fix: int tests - update kv-spc-secret-name and add --template-content input to workflow call Apr 8, 2024
@c-ryan-k c-ryan-k merged commit 5425fba into Azure:dev Apr 9, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants