{"id":20141772,"url":"https://github.com/eduardosbcabral/library-versioning-azure-devops","last_synced_at":"2026-06-12T07:32:50.718Z","repository":{"id":116101233,"uuid":"424278949","full_name":"eduardosbcabral/library-versioning-azure-devops","owner":"eduardosbcabral","description":"Template repository that helps azure devops libraries versioning.","archived":false,"fork":false,"pushed_at":"2022-05-30T23:05:47.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-02T23:41:25.634Z","etag":null,"topics":["azure-devops","library","versioning"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eduardosbcabral.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-03T15:28:32.000Z","updated_at":"2021-11-03T17:34:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"7a52a578-b3a2-4321-83f6-e9c6111d265f","html_url":"https://github.com/eduardosbcabral/library-versioning-azure-devops","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/eduardosbcabral/library-versioning-azure-devops","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eduardosbcabral%2Flibrary-versioning-azure-devops","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eduardosbcabral%2Flibrary-versioning-azure-devops/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eduardosbcabral%2Flibrary-versioning-azure-devops/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eduardosbcabral%2Flibrary-versioning-azure-devops/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eduardosbcabral","download_url":"https://codeload.github.com/eduardosbcabral/library-versioning-azure-devops/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eduardosbcabral%2Flibrary-versioning-azure-devops/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34234557,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-12T02:00:06.859Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["azure-devops","library","versioning"],"created_at":"2024-11-13T21:58:49.377Z","updated_at":"2026-06-12T07:32:50.703Z","avatar_url":"https://github.com/eduardosbcabral.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Library Versioning | Azure Devops\n\nTemplate repository that helps azure applications libraries versioning.\n\nIt was created to have a history of the variable value changes.\n\n# Instructions\n\nThe variable file contains the following entries:\n\n```yaml\nid: // (required) variable group identifier that you can get by looking at the URL on Azure Devops\nname: // (required) name of the variable group\ndescription: // (optional) description of the variable group\nvariables: // start of the variables list entry\n- name: // name of the variable\n  value: // value of the variable. Optional if it is a secret value\n  isSecret: // set it to true if it is a secret value\n```\n\nTo add a new variable, just add it to the respective application yaml file.\n\nIf it is a new application variable group, you have to create a new folder.\n\nIf a variable is a secret, do not set a value and define it as 'isSecret: true' and change it manually at the azure interface. We cannot leave such values as a plain text. This way, the variable value is not updated and keeps the same.\n\n# Updating the pipeline\n\nThis repository contains a [script](script.js) that updates the azure library automatically if you prefer.\n\nThe script expects two arguments:\n- Application name: same value as the folder name.\n- File name: the respective file name(without the extension) inside of the application folder\n\nTo run the script, you will need Node.JS and an Azure DevOps personal access token with a permission to manage Variable Groups. Check this [page](https://docs.microsoft.com/pt-br/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=azure-devops\u0026tabs=preview-page) for instructions on how to generate it.\n\n- You have to create a token with the permission **Variable Groups (Read, create \u0026 manage)**\n\n- Change the name of the [.env.example](.env.example) file to **.env**\n\n- After the creation of the token, set it to the variable (AZURE_TOKEN) inside the new created .env file.\n\nInstall the dependencies a single time after cloning the repository\n```\nnpm install\n```\n\nAfter all of this, run the script as stated below:\n```\nnpm run update application_folder_name file_name\n```\n\nExample:\n```\nnpm run update AfiliationApi staging\n```\n\n# Browser script\nThe script below help us generate the yaml file directly from the browser console. You need to enter the variables page and put the zoom all the way down to show us all variables at the same time, then you run the code in console. After that you can copy the output and create the respective lib yaml file.\n```\nlet urlSearchParams = new URLSearchParams(window.location.search);\nlet params = Object.fromEntries(urlSearchParams.entries());\nlet id = params.variableGroupId\nlet name = document.querySelector('input.bolt-textfield-input').value\nlet description = document.querySelector('textarea.bolt-textfield-input').value\nlet str = `id: ${id}\\n`\nstr += `name: ${name}\\n`\n\nif (description) {\n    str += `description: ${description}\\n`\n}\n\nstr += `variables:`\n\nvar index = 0\ndocument.querySelectorAll('.ms-List-cell .flat-view-text-preserve, .ms-List-cell .flat-view-text-input-read-only').forEach(elem =\u003e {\n    if(index % 2 == 0) {\n        str += `\n- name: ${elem.innerText}`\n    } else {\n        str += `\n${elem.className==='flat-view-text-preserve' ? `  value: ${elem.innerText}` : '  isSecret: true' }`        \n    }\n    index++;\n})\nconsole.log(str)\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feduardosbcabral%2Flibrary-versioning-azure-devops","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feduardosbcabral%2Flibrary-versioning-azure-devops","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feduardosbcabral%2Flibrary-versioning-azure-devops/lists"}