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

[CI Environment] Token Mechanism Uplift (support tokens as GitHub Secret + Migrate Settings.Json to Settings YAML) #1516

Merged
merged 123 commits into from
Aug 13, 2022

Conversation

ahmadabdalla
Copy link
Contributor

@ahmadabdalla ahmadabdalla commented Jun 9, 2022

Closes #1440

Description

  • Migrated from global.variables.yml and settings.json into a single settings.yml
  • Support for a GitHub secret / ADO variable named TOKEN_NAMEPREFIX which takes precedence over the localToken_namePrefix that exists in the settings.yml
  • Updated documentation

Details

  • Pester tests changed to now receive an input of the token as a configuration instead of the pester test file having to process the settings and extract content from it.
  • unified the experience for token replacement across multiple scripts and pipelines
  • GitHub Module Workflows contain a new Environment Variable called TOKEN_NAMEPREFIX, this is not used if the secret is not specified
  • Updated documentation especially referencing the need for the powershell-yaml module in the scenario 2 - contribution documentation.

Experience for new TOKEN

If not defined as a secret in GHA / variable in ADO:

image

If defined as a secret in GHA/ADO variable:

image
image

Pipeline references

For module/pipeline changes, please create and attach the status badge of your successful run.

Pipeline
Compute: Disks
Authorization: RoleDefinitions
Network: ApplicationSecurityGroups

Type of Change

Please delete options that are not relevant.

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Update to documentation

Checklist

  • I'm sure there are no other open Pull Requests for the same update/change
  • My corresponding pipelines / checks run clean and green without any errors or warnings
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (readme)
  • I did format my code

@ahmadabdalla ahmadabdalla self-assigned this Jun 9, 2022
global.variables.yml Outdated Show resolved Hide resolved
@github-actions
Copy link

Unit Test Results

46 tests   45 ✔️  18s ⏱️
  1 suites    1 💤
  1 files      0

Results for commit f98b02b.

@ahmadabdalla ahmadabdalla changed the title [CI Environment] Token Mechanism Uplift (support tokens as GitHub Secret + Migrate Settings.Json to Global Variables YAML) [CI Environment] Token Mechanism Uplift (support tokens as GitHub Secret + Migrate Settings.Json to Settings YAML) Aug 12, 2022
@ahmadabdalla ahmadabdalla moved this from In progress to Ready for review in Backlog Aug 13, 2022
ahmadabdalla and others added 5 commits August 13, 2022 15:00
…and CI environment.md

Co-authored-by: Alexander Sehr <ASehr@hotmail.de>
Co-authored-by: Alexander Sehr <ASehr@hotmail.de>
…and CI environment.md

Co-authored-by: Alexander Sehr <ASehr@hotmail.de>
Co-authored-by: Alexander Sehr <ASehr@hotmail.de>
@ahmadabdalla ahmadabdalla merged commit c05d706 into Azure:main Aug 13, 2022
Backlog automation moved this from Ready for review to Done Aug 13, 2022
@ahmadabdalla ahmadabdalla deleted the users/ahmad/tokenUpdates branch August 23, 2022 05:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[cat] azure devops category: Azure DevOps [cat] github category: GitHub [cat] testing category: testing [cat] utilities category: utilities documentation Improvements or additions to documentation enhancement New feature or request
Projects
Status: Done
4 participants