From beb4fcb4200b0a7ded9161bf4c1e1946cfcb45d2 Mon Sep 17 00:00:00 2001 From: sergiov-ni <156447188+svelderrainruiz@users.noreply.github.com> Date: Wed, 11 Dec 2024 12:39:06 -0700 Subject: [PATCH 1/8] Update trigger-azure-pipeline.yml --- .github/workflows/trigger-azure-pipeline.yml | 30 ++++++++++++-------- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/.github/workflows/trigger-azure-pipeline.yml b/.github/workflows/trigger-azure-pipeline.yml index b8be5de..63290a5 100644 --- a/.github/workflows/trigger-azure-pipeline.yml +++ b/.github/workflows/trigger-azure-pipeline.yml @@ -22,34 +22,40 @@ jobs: ORG="sergiovelderrain" PROJECT="sergiovelderrain" PIPELINE_ID="1" - API_VERSION="6.0-preview.1" + # You can try a more recent api-version, for example "7.1-preview.1". + API_VERSION="7.1-preview.1" - # Ensure PAT is not empty if [ -z "$PAT" ]; then echo "AZURE_DEVOPS_PAT is not set or empty!" exit 1 fi - # Base64 encode credentials + # Base64 encode the PAT for Basic auth AUTH=$(echo -n ":$PAT" | base64) - # Use the PR's head ref for the pipeline branch + # Extract the PR branch name from the event. + # For a forked PR, this is something like: + # We'll need to prepend refs/heads/ for Azure DevOps. PR_HEAD_REF="${{ github.event.pull_request.head.ref }}" - JSON_BODY='{ - "resources": { - "repositories": { - "self": { - "refName": "refs/heads/'"${PR_HEAD_REF}"'" + + # Construct the JSON payload with properly escaped quotes. + # Using double-quotes around the entire JSON and escaping internal quotes is safest. + JSON_BODY="{ + \"resources\": { + \"repositories\": { + \"self\": { + \"refName\": \"refs/heads/${PR_HEAD_REF}\" } } } - }' + }" echo "Triggering Azure DevOps pipeline with the following JSON:" echo "$JSON_BODY" - # Use --http1.1 to avoid HTTP/2 related issues, remove -s for verbosity - curl --http1.1 -v -X POST \ + # Use --http1.1 and -v for verbose output to help debug issues if any. + # Add --fail to ensure the command fails if we get a non-2xx response. + curl --http1.1 --fail -v -X POST \ -H "Authorization: Basic $AUTH" \ -H "Content-Type: application/json" \ -d "$JSON_BODY" \ From 84874434eafbed099c47b6a7498ec9b977bf3fff Mon Sep 17 00:00:00 2001 From: sergiov-ni <156447188+svelderrainruiz@users.noreply.github.com> Date: Wed, 11 Dec 2024 12:44:46 -0700 Subject: [PATCH 2/8] Update azure-pipelines.yml --- azure-pipelines.yml | 33 ++++++++++++++------------------- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b5a8e07..0f1c15f 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,32 +1,29 @@ -# Removed trigger so pipeline runs only when requested via API -# trigger: -# branches: -# include: -# - main -# - develop +trigger: none +pr: none -name: $(Build.BuildID) +name: $(Build.BuildId) pool: name: "Default" - demands: "iconeditor -equals true" + demands: + - iconeditor -equals true variables: - build_id: $(Build.BuildID) - build_revision: $[counter('buildCounter',1)] - build_version: '1.0.$(Build.BuildID).$(build_revision)' + build_id: $(Build.BuildId) + build_revision: $[counter('buildCounter', 1)] + build_version: '1.0.$(Build.BuildId).$(build_revision)' RelativePath: '$(Build.SourcesDirectory)' RelativePathScripts: '$(Build.SourcesDirectory)\pipeline\scripts' stages: - stage: BuildAndTest - displayName: Build and Test LabVIEW Project + displayName: "Build and Test LabVIEW Project" jobs: - job: ExecuteScripts - displayName: Execute Scripts + displayName: "Execute Scripts" steps: - task: PowerShell@2 - displayName: 'Set agent into development mode' + displayName: "Set agent into development mode" inputs: filePath: '$(RelativePathScripts)\Set_Development_Mode.ps1' arguments: '-RelativePath "$(RelativePath)"' @@ -35,12 +32,10 @@ stages: errorActionPreference: 'Stop' - task: PowerShell@2 - displayName: 'Test and Build the Icon Editor' + displayName: "Test and Build the Icon Editor" inputs: filePath: '$(RelativePathScripts)\Build.ps1' - arguments: > - -RelativePath "$(RelativePath)" - -AbsolutePathScripts "$(RelativePathScripts)" + arguments: '-RelativePath "$(RelativePath)" -AbsolutePathScripts "$(RelativePathScripts)"' workingDirectory: '$(RelativePathScripts)' failOnStderr: true - errorActionPreference: 'Stop' \ No newline at end of file + errorActionPreference: 'Stop' From 3a2c803f0e070300da42f92060ce9c5549b6d6b5 Mon Sep 17 00:00:00 2001 From: sergiov-ni <156447188+svelderrainruiz@users.noreply.github.com> Date: Wed, 11 Dec 2024 12:56:10 -0700 Subject: [PATCH 3/8] Update trigger-azure-pipeline.yml --- .github/workflows/trigger-azure-pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/trigger-azure-pipeline.yml b/.github/workflows/trigger-azure-pipeline.yml index 63290a5..59ee0f9 100644 --- a/.github/workflows/trigger-azure-pipeline.yml +++ b/.github/workflows/trigger-azure-pipeline.yml @@ -21,7 +21,7 @@ jobs: PAT="${{ secrets.AZURE_DEVOPS_PAT }}" ORG="sergiovelderrain" PROJECT="sergiovelderrain" - PIPELINE_ID="1" + PIPELINE_ID="3" # You can try a more recent api-version, for example "7.1-preview.1". API_VERSION="7.1-preview.1" From 29df7ae4e50f3b7b96ac91228734b2c63cce886c Mon Sep 17 00:00:00 2001 From: sergiov-ni Date: Wed, 11 Dec 2024 13:40:20 -0700 Subject: [PATCH 4/8] Revert "Update azure-pipelines.yml" This reverts commit 84874434eafbed099c47b6a7498ec9b977bf3fff. --- azure-pipelines.yml | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 0f1c15f..b5a8e07 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,29 +1,32 @@ -trigger: none -pr: none +# Removed trigger so pipeline runs only when requested via API +# trigger: +# branches: +# include: +# - main +# - develop -name: $(Build.BuildId) +name: $(Build.BuildID) pool: name: "Default" - demands: - - iconeditor -equals true + demands: "iconeditor -equals true" variables: - build_id: $(Build.BuildId) - build_revision: $[counter('buildCounter', 1)] - build_version: '1.0.$(Build.BuildId).$(build_revision)' + build_id: $(Build.BuildID) + build_revision: $[counter('buildCounter',1)] + build_version: '1.0.$(Build.BuildID).$(build_revision)' RelativePath: '$(Build.SourcesDirectory)' RelativePathScripts: '$(Build.SourcesDirectory)\pipeline\scripts' stages: - stage: BuildAndTest - displayName: "Build and Test LabVIEW Project" + displayName: Build and Test LabVIEW Project jobs: - job: ExecuteScripts - displayName: "Execute Scripts" + displayName: Execute Scripts steps: - task: PowerShell@2 - displayName: "Set agent into development mode" + displayName: 'Set agent into development mode' inputs: filePath: '$(RelativePathScripts)\Set_Development_Mode.ps1' arguments: '-RelativePath "$(RelativePath)"' @@ -32,10 +35,12 @@ stages: errorActionPreference: 'Stop' - task: PowerShell@2 - displayName: "Test and Build the Icon Editor" + displayName: 'Test and Build the Icon Editor' inputs: filePath: '$(RelativePathScripts)\Build.ps1' - arguments: '-RelativePath "$(RelativePath)" -AbsolutePathScripts "$(RelativePathScripts)"' + arguments: > + -RelativePath "$(RelativePath)" + -AbsolutePathScripts "$(RelativePathScripts)" workingDirectory: '$(RelativePathScripts)' failOnStderr: true - errorActionPreference: 'Stop' + errorActionPreference: 'Stop' \ No newline at end of file From 1de7df7dbb5e11ce523de3331066be63b6d91c53 Mon Sep 17 00:00:00 2001 From: sergiov-ni Date: Wed, 11 Dec 2024 17:59:21 -0700 Subject: [PATCH 5/8] no message --- SECURITY - Copy.md | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 SECURITY - Copy.md diff --git a/SECURITY - Copy.md b/SECURITY - Copy.md deleted file mode 100644 index ce102ab..0000000 --- a/SECURITY - Copy.md +++ /dev/null @@ -1,19 +0,0 @@ - - -# Security - -NI views the security of our software products as an important part of our commitment to our users. This includes source code repositories managed through the [NI](https://github.com/ni) GitHub organization. - -## Reporting Security Issues - -We encourage you to report security vulnerabilities to us privately so we can follow the principle of [Coordinated Vulnerability Disclosure (CVD)](https://vuls.cert.org/confluence/display/CVD). This allows us time to thoroughly investigate security issues and publicly disclose them when appropriate. - -**Please do not report security vulnerabilities through public GitHub issues.** - -Instead, please report them by sending an email to [security@ni.com](mailto:security@ni.com) with sufficient details about the type of issue, the impact of the issue, and how to reproduce the issue. You may use the [NI PGP key](https://www.ni.com/en/support/security/pgp.html) to encrypt any sensitive communications you send to us. When you notify us of a potential security issue, our remediation process includes acknowledging receipt and coordinating any necessary response activities with you. - -## Learn More - -To learn more about NI Security, please see [https://ni.com/security](https://ni.com/security) - - \ No newline at end of file From 9f3fa3ed51b747778e7640e020403ee7d9802109 Mon Sep 17 00:00:00 2001 From: sergiov-ni <156447188+svelderrainruiz@users.noreply.github.com> Date: Wed, 11 Dec 2024 18:53:46 -0700 Subject: [PATCH 6/8] Update trigger-azure-pipeline.yml --- .github/workflows/trigger-azure-pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/trigger-azure-pipeline.yml b/.github/workflows/trigger-azure-pipeline.yml index 59ee0f9..b1fe108 100644 --- a/.github/workflows/trigger-azure-pipeline.yml +++ b/.github/workflows/trigger-azure-pipeline.yml @@ -23,7 +23,7 @@ jobs: PROJECT="sergiovelderrain" PIPELINE_ID="3" # You can try a more recent api-version, for example "7.1-preview.1". - API_VERSION="7.1-preview.1" + API_VERSION="6.0-preview.1" if [ -z "$PAT" ]; then echo "AZURE_DEVOPS_PAT is not set or empty!" From 1063e94871b891185729544283e4e79cf41ea59f Mon Sep 17 00:00:00 2001 From: sergiov-ni Date: Thu, 12 Dec 2024 07:59:56 -0700 Subject: [PATCH 7/8] test --- CODE_OF_CONDUCT - Copy.md | 128 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 128 insertions(+) create mode 100644 CODE_OF_CONDUCT - Copy.md diff --git a/CODE_OF_CONDUCT - Copy.md b/CODE_OF_CONDUCT - Copy.md new file mode 100644 index 0000000..c4453b8 --- /dev/null +++ b/CODE_OF_CONDUCT - Copy.md @@ -0,0 +1,128 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, religion, or sexual identity +and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the + overall community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or + advances of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email + address, without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at +Elijah.Kerry@ni.com. +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series +of actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or +permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within +the community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.0, available at +https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. + +Community Impact Guidelines were inspired by [Mozilla's code of conduct +enforcement ladder](https://github.com/mozilla/diversity). + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see the FAQ at +https://www.contributor-covenant.org/faq. Translations are available at +https://www.contributor-covenant.org/translations. From f72d540476518864455ead8fc167e8e3f276cbf1 Mon Sep 17 00:00:00 2001 From: sergiov-ni Date: Thu, 12 Dec 2024 08:46:06 -0700 Subject: [PATCH 8/8] no message --- .github/workflows/trigger-azure-pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/trigger-azure-pipeline.yml b/.github/workflows/trigger-azure-pipeline.yml index 2bd5ba8..01657c5 100644 --- a/.github/workflows/trigger-azure-pipeline.yml +++ b/.github/workflows/trigger-azure-pipeline.yml @@ -38,7 +38,7 @@ jobs: # Use the PR's head ref for the pipeline branch if it's a PR event # If manually triggered (workflow_dispatch), default to a known branch like 'develop' if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then - PR_HEAD_REF="develop" + PR_HEAD_REF="main" else PR_HEAD_REF="${{ github.event.pull_request.head.ref }}" fi