From 15fe2bb80a9e0c8d74d60eec1d1e56b73c64c2f0 Mon Sep 17 00:00:00 2001 From: Michael Henderson Date: Thu, 16 Jun 2022 11:25:30 -0700 Subject: [PATCH 1/4] update to new workflow/readme gen --- .../keyfactor-extension-generate-readme.yml | 27 ---- .../workflows/keyfactor-extension-release.yml | 127 ------------------ .../workflows/keyfactor-starter-workflow.yml | 24 ++++ integration-manifest.json | 5 +- README.md.tpl => readme_source.md | 0 5 files changed, 27 insertions(+), 156 deletions(-) delete mode 100644 .github/workflows/keyfactor-extension-generate-readme.yml delete mode 100644 .github/workflows/keyfactor-extension-release.yml create mode 100644 .github/workflows/keyfactor-starter-workflow.yml rename README.md.tpl => readme_source.md (100%) diff --git a/.github/workflows/keyfactor-extension-generate-readme.yml b/.github/workflows/keyfactor-extension-generate-readme.yml deleted file mode 100644 index 8b82c7e..0000000 --- a/.github/workflows/keyfactor-extension-generate-readme.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Update README -on: [push, workflow_dispatch] - -jobs: - update_readme: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@master - - - uses: cuchi/jinja2-action@v1.2.0 - with: - template: README.md.tpl - output_file: README.md - data_file: integration-manifest.json - env: - GITHUB_TOKEN: ${{ secrets.SDK_SYNC_PAT }} - - - uses: stefanzweifel/git-auto-commit-action@v4 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - push_options: '--force' - commit_message: Update generated README - commit_user_name: Keyfactor - commit_user_email: keyfactor@keyfactor.github.io - commit_author: Keyfactor diff --git a/.github/workflows/keyfactor-extension-release.yml b/.github/workflows/keyfactor-extension-release.yml deleted file mode 100644 index bb020fd..0000000 --- a/.github/workflows/keyfactor-extension-release.yml +++ /dev/null @@ -1,127 +0,0 @@ -# This is a basic workflow to help you get started with Actions - -name: Keyfactor Extension - Release - -env: - project_folder: Keyfactor.AnyAgent.AwsCertificateManager - -# Controls when the action will run. -on: - # Triggers the workflow on pull requests closing - pull_request: - # only run this workflow when closing a PR to a branch that contains a release number. ignore -pre - branches: - - 'release-[0-9]+.[0-9]+' - - '!release-[0-9]+.[0-9]+-pre' - types: [closed] - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - # This workflow contains a single job called "build" - build: - # run if pull request is completed and merged, or if manually dispatched - if: github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true) - - # The type of runner that the job will run on - runs-on: windows-latest - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 - - - name: Setup Envrionment - id: setup_env - run: | - echo "Setup Envrionment Variables for Workflow" - echo "Working Path: ${Env:GITHUB_WORKSPACE}" - $slnPath = (Get-ChildItem -Include *.sln -File -Recurse).fullname - $relName = "${{ github.ref }}".Split("/") - $repoName = "${{ github.repository }}".Split("/") - echo "Solution File Path: ${slnPath}" - echo "SOLUTION_PATH=${slnPath}" | Out-File $env:GITHUB_ENV -Encoding utf8 -Append - echo "Release Name: $($relName[-1])" - echo "RELEASE_NAME=$($relName[-1])" | Out-File $env:GITHUB_ENV -Encoding utf8 -Append - echo "Repo Name: $($repoName[-1])" - echo "REPO_NAME=$($repoName[-1])" | Out-File $env:GITHUB_ENV -Encoding utf8 -Append - - - uses: actions/setup-dotnet@v1 - with: - dotnet-version: '3.1.x' # SDK Version to use; x will use the latest version of the 3.1 channel - #dotnet-version: - - - name: Add Package Source - run: | - dotnet nuget add source https://nuget.pkg.github.com/Keyfactor/index.json -n github -u ${{ github.actor }} -p ${{ secrets.BUILD_PACKAGE_ACCESS }} --store-password-in-clear-text - - # Configures msbuild path envrionment - - name: setup-msbuild - uses: microsoft/setup-msbuild@v1 - - # Restores Packages to Local Machine - - name: restore nuget packages - run: | - nuget restore ${{ env.SOLUTION_PATH }} - - - name: Create Release - id: create_release - #uses: zendesk/action-create-release@v1 - uses: keyfactor/action-create-release@786b73035fa09790f9eb11bb86834a6d7af1c256 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - release_name: Release ${{ env.RELEASE_NAME }} - body: | - [Changelog](../CHANGELOG.MD) - draft: false - prerelease: false - auto_increment_type: patch - tag_schema: semantic - commitish: ${{ github.sha }} - - #update version number of AssemblyInfo.cs file - - name: Increment Assembly Version - run: | - $VersionRegex = "\d+\.\d+\.\d+" - $assemblyInfoFiles = (Get-ChildItem -Include AssemblyInfo.cs -File -Recurse).fullname - foreach ($assemblyInfoFile in $assemblyInfoFiles) - { - $filecontent = Get-Content($assemblyInfoFile) - $newVer = "${{ steps.create_release.outputs.current_tag }}".TrimStart('v') - attrib $assemblyInfoFile -r - $filecontent -replace $VersionRegex, $newVer | Out-File $assemblyInfoFile - } - - - name: Execute MSBuild Commands - run: | - MSBuild.exe $Env:SOLUTION_PATH -p:RestorePackagesConfig=false -p:Configuration=Release - - - name: Archive Files - if: ${{ success() }} - run: | - md ${{ github.workspace }}\zip\Keyfactor - Compress-Archive -Path ${{ github.workspace }}\${{env.project_folder}}\bin\Release\*.dll,${{ github.workspace }}\${{env.project_folder}}\bin\Release\*.json -DestinationPath ${{ github.workspace }}\zip\Keyfactor\$Env:REPO_NAME.zip -Force - - - name: Upload Release Asset (x64) - if: ${{ success() }} - id: upload-release-asset-x64 - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ${{ github.workspace }}\zip\Keyfactor\${{ env.REPO_NAME}}.zip - asset_name: ${{ env.REPO_NAME}}_${{ steps.create_release.outputs.current_tag }}.zip - asset_content_type: application/zip - - - name: On Failure - Remove Tags and Release - if: ${{ failure() }} - uses: dev-drprasad/delete-tag-and-release@v0.2.0 - with: - delete_release: true # default: false - tag_name: ${{ steps.create_release.outputs.current_tag }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/keyfactor-starter-workflow.yml b/.github/workflows/keyfactor-starter-workflow.yml new file mode 100644 index 0000000..fc2ded0 --- /dev/null +++ b/.github/workflows/keyfactor-starter-workflow.yml @@ -0,0 +1,24 @@ +name: Starter Workflow +on: [workflow_dispatch, push, pull_request] + +jobs: + call-create-github-release-workflow: + uses: Keyfactor/actions/.github/workflows/github-release.yml@main + + call-dotnet-build-and-release-workflow: + needs: [call-create-github-release-workflow] + uses: Keyfactor/actions/.github/workflows/dotnet-build-and-release.yml@main + with: + release_version: ${{ needs.call-create-github-release-workflow.outputs.release_version }} + release_url: ${{ needs.call-create-github-release-workflow.outputs.release_url }} + release_dir: Keyfactor.AnyAgent.AwsCertificateManager/bin/Release/ # output directory to upload as a release, relative to checkout workspace + + call-generate-readme-workflow: + if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' + uses: Keyfactor/actions/.github/workflows/generate-readme.yml@main + + call-update-catalog-workflow: + if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' + uses: Keyfactor/actions/.github/workflows/update-catalog.yml@main + secrets: + token: ${{ secrets.SDK_SYNC_PAT }} \ No newline at end of file diff --git a/integration-manifest.json b/integration-manifest.json index 215c1cc..758a797 100644 --- a/integration-manifest.json +++ b/integration-manifest.json @@ -1,7 +1,8 @@ { "$schema": "https://keyfactor.github.io/integration-manifest-schema.json", - "integration_type": "orchestrator", + "integration_type": "windows-orchestrator", "name": "AWS", - "status": "Production", + "status": "production", + "link_github": true, "description": "AWS Certificate Manager is a service that lets you easily provision, manage, and deploy public and private Secure Sockets Layer/Transport Layer Security (SSL/TLS) certificates for use with AWS services and your internal connected resources. SSL/TLS certificates are used to secure network communications and establish the identity of websites over the Internet as well as resources on private networks. AWS Certificate Manager removes the time-consuming manual process of purchasing, uploading, and renewing SSL/TLS certificates." } diff --git a/README.md.tpl b/readme_source.md similarity index 100% rename from README.md.tpl rename to readme_source.md From ee3f276cf85ef6fcbd751c94658da18cab8ffb97 Mon Sep 17 00:00:00 2001 From: Michael Henderson Date: Thu, 16 Jun 2022 11:25:30 -0700 Subject: [PATCH 2/4] add missing secrets tokenupdate to new workflow/readme gen --- .../keyfactor-extension-generate-readme.yml | 27 ---- .../workflows/keyfactor-extension-release.yml | 127 ------------------ .../workflows/keyfactor-starter-workflow.yml | 26 ++++ integration-manifest.json | 5 +- README.md.tpl => readme_source.md | 0 5 files changed, 29 insertions(+), 156 deletions(-) delete mode 100644 .github/workflows/keyfactor-extension-generate-readme.yml delete mode 100644 .github/workflows/keyfactor-extension-release.yml create mode 100644 .github/workflows/keyfactor-starter-workflow.yml rename README.md.tpl => readme_source.md (100%) diff --git a/.github/workflows/keyfactor-extension-generate-readme.yml b/.github/workflows/keyfactor-extension-generate-readme.yml deleted file mode 100644 index 8b82c7e..0000000 --- a/.github/workflows/keyfactor-extension-generate-readme.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Update README -on: [push, workflow_dispatch] - -jobs: - update_readme: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@master - - - uses: cuchi/jinja2-action@v1.2.0 - with: - template: README.md.tpl - output_file: README.md - data_file: integration-manifest.json - env: - GITHUB_TOKEN: ${{ secrets.SDK_SYNC_PAT }} - - - uses: stefanzweifel/git-auto-commit-action@v4 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - push_options: '--force' - commit_message: Update generated README - commit_user_name: Keyfactor - commit_user_email: keyfactor@keyfactor.github.io - commit_author: Keyfactor diff --git a/.github/workflows/keyfactor-extension-release.yml b/.github/workflows/keyfactor-extension-release.yml deleted file mode 100644 index bb020fd..0000000 --- a/.github/workflows/keyfactor-extension-release.yml +++ /dev/null @@ -1,127 +0,0 @@ -# This is a basic workflow to help you get started with Actions - -name: Keyfactor Extension - Release - -env: - project_folder: Keyfactor.AnyAgent.AwsCertificateManager - -# Controls when the action will run. -on: - # Triggers the workflow on pull requests closing - pull_request: - # only run this workflow when closing a PR to a branch that contains a release number. ignore -pre - branches: - - 'release-[0-9]+.[0-9]+' - - '!release-[0-9]+.[0-9]+-pre' - types: [closed] - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - # This workflow contains a single job called "build" - build: - # run if pull request is completed and merged, or if manually dispatched - if: github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true) - - # The type of runner that the job will run on - runs-on: windows-latest - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 - - - name: Setup Envrionment - id: setup_env - run: | - echo "Setup Envrionment Variables for Workflow" - echo "Working Path: ${Env:GITHUB_WORKSPACE}" - $slnPath = (Get-ChildItem -Include *.sln -File -Recurse).fullname - $relName = "${{ github.ref }}".Split("/") - $repoName = "${{ github.repository }}".Split("/") - echo "Solution File Path: ${slnPath}" - echo "SOLUTION_PATH=${slnPath}" | Out-File $env:GITHUB_ENV -Encoding utf8 -Append - echo "Release Name: $($relName[-1])" - echo "RELEASE_NAME=$($relName[-1])" | Out-File $env:GITHUB_ENV -Encoding utf8 -Append - echo "Repo Name: $($repoName[-1])" - echo "REPO_NAME=$($repoName[-1])" | Out-File $env:GITHUB_ENV -Encoding utf8 -Append - - - uses: actions/setup-dotnet@v1 - with: - dotnet-version: '3.1.x' # SDK Version to use; x will use the latest version of the 3.1 channel - #dotnet-version: - - - name: Add Package Source - run: | - dotnet nuget add source https://nuget.pkg.github.com/Keyfactor/index.json -n github -u ${{ github.actor }} -p ${{ secrets.BUILD_PACKAGE_ACCESS }} --store-password-in-clear-text - - # Configures msbuild path envrionment - - name: setup-msbuild - uses: microsoft/setup-msbuild@v1 - - # Restores Packages to Local Machine - - name: restore nuget packages - run: | - nuget restore ${{ env.SOLUTION_PATH }} - - - name: Create Release - id: create_release - #uses: zendesk/action-create-release@v1 - uses: keyfactor/action-create-release@786b73035fa09790f9eb11bb86834a6d7af1c256 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - release_name: Release ${{ env.RELEASE_NAME }} - body: | - [Changelog](../CHANGELOG.MD) - draft: false - prerelease: false - auto_increment_type: patch - tag_schema: semantic - commitish: ${{ github.sha }} - - #update version number of AssemblyInfo.cs file - - name: Increment Assembly Version - run: | - $VersionRegex = "\d+\.\d+\.\d+" - $assemblyInfoFiles = (Get-ChildItem -Include AssemblyInfo.cs -File -Recurse).fullname - foreach ($assemblyInfoFile in $assemblyInfoFiles) - { - $filecontent = Get-Content($assemblyInfoFile) - $newVer = "${{ steps.create_release.outputs.current_tag }}".TrimStart('v') - attrib $assemblyInfoFile -r - $filecontent -replace $VersionRegex, $newVer | Out-File $assemblyInfoFile - } - - - name: Execute MSBuild Commands - run: | - MSBuild.exe $Env:SOLUTION_PATH -p:RestorePackagesConfig=false -p:Configuration=Release - - - name: Archive Files - if: ${{ success() }} - run: | - md ${{ github.workspace }}\zip\Keyfactor - Compress-Archive -Path ${{ github.workspace }}\${{env.project_folder}}\bin\Release\*.dll,${{ github.workspace }}\${{env.project_folder}}\bin\Release\*.json -DestinationPath ${{ github.workspace }}\zip\Keyfactor\$Env:REPO_NAME.zip -Force - - - name: Upload Release Asset (x64) - if: ${{ success() }} - id: upload-release-asset-x64 - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ${{ github.workspace }}\zip\Keyfactor\${{ env.REPO_NAME}}.zip - asset_name: ${{ env.REPO_NAME}}_${{ steps.create_release.outputs.current_tag }}.zip - asset_content_type: application/zip - - - name: On Failure - Remove Tags and Release - if: ${{ failure() }} - uses: dev-drprasad/delete-tag-and-release@v0.2.0 - with: - delete_release: true # default: false - tag_name: ${{ steps.create_release.outputs.current_tag }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/keyfactor-starter-workflow.yml b/.github/workflows/keyfactor-starter-workflow.yml new file mode 100644 index 0000000..30547b2 --- /dev/null +++ b/.github/workflows/keyfactor-starter-workflow.yml @@ -0,0 +1,26 @@ +name: Starter Workflow +on: [workflow_dispatch, push, pull_request] + +jobs: + call-create-github-release-workflow: + uses: Keyfactor/actions/.github/workflows/github-release.yml@main + + call-dotnet-build-and-release-workflow: + needs: [call-create-github-release-workflow] + uses: Keyfactor/actions/.github/workflows/dotnet-build-and-release.yml@main + with: + release_version: ${{ needs.call-create-github-release-workflow.outputs.release_version }} + release_url: ${{ needs.call-create-github-release-workflow.outputs.release_url }} + release_dir: Keyfactor.AnyAgent.AwsCertificateManager/bin/Release + secrets: + token: ${{ secrets.PRIVATE_PACKAGE_ACCESS }} + + call-generate-readme-workflow: + if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' + uses: Keyfactor/actions/.github/workflows/generate-readme.yml@main + + call-update-catalog-workflow: + if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' + uses: Keyfactor/actions/.github/workflows/update-catalog.yml@main + secrets: + token: ${{ secrets.SDK_SYNC_PAT }} \ No newline at end of file diff --git a/integration-manifest.json b/integration-manifest.json index 215c1cc..758a797 100644 --- a/integration-manifest.json +++ b/integration-manifest.json @@ -1,7 +1,8 @@ { "$schema": "https://keyfactor.github.io/integration-manifest-schema.json", - "integration_type": "orchestrator", + "integration_type": "windows-orchestrator", "name": "AWS", - "status": "Production", + "status": "production", + "link_github": true, "description": "AWS Certificate Manager is a service that lets you easily provision, manage, and deploy public and private Secure Sockets Layer/Transport Layer Security (SSL/TLS) certificates for use with AWS services and your internal connected resources. SSL/TLS certificates are used to secure network communications and establish the identity of websites over the Internet as well as resources on private networks. AWS Certificate Manager removes the time-consuming manual process of purchasing, uploading, and renewing SSL/TLS certificates." } diff --git a/README.md.tpl b/readme_source.md similarity index 100% rename from README.md.tpl rename to readme_source.md From 9344a184460bc081f2e5630742fc438fe62da315 Mon Sep 17 00:00:00 2001 From: Keyfactor Date: Thu, 16 Jun 2022 18:31:29 +0000 Subject: [PATCH 3/4] Update generated README --- README.md | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8488612..610e6d2 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,25 @@ # AWS -## Orchestrator + +AWS Certificate Manager is a service that lets you easily provision, manage, and deploy public and private Secure Sockets Layer/Transport Layer Security (SSL/TLS) certificates for use with AWS services and your internal connected resources. SSL/TLS certificates are used to secure network communications and establish the identity of websites over the Internet as well as resources on private networks. AWS Certificate Manager removes the time-consuming manual process of purchasing, uploading, and renewing SSL/TLS certificates. + +#### Integration status: Production - Ready for use in production environments. + +## About the Keyfactor Windows Orchestrator AnyAgent + +This repository contains a Windows Orchestrator AnyAgent, which is a plugin to the Keyfactor Windows Orchestrator. Within the Keyfactor Platform, Orchestrators are used to manage “certificate stores” — collections of certificates and roots of trust that are found within and used by various applications. + +The Windows Orchestrator is part of the Keyfactor software distribution and is available via the Keyfactor customer portal. For general instructions on installing AnyAgents, see the “Keyfactor Command Orchestrator Installation and Configuration Guide” section of the Keyfactor documentation. For configuration details of this specific AnyAgent, see below in this readme. + +Note that in Keyfactor Version 9, the Windows Orchestrator have been replaced by the Universal Orchestrator. While this AnyAgent continues to work with the Windows Orchestrator, and the Windows Orchestrator is supported alongside the Universal Orchestrator talking to Keyfactor version 9, AnyAgent plugins cannot be used with the Universal Orchestrator. + +--- + + + +--- + +# AWS +## Windows-orchestrator AWS Certificate Manager is a service that lets you easily provision, manage, and deploy public and private Secure Sockets Layer/Transport Layer Security (SSL/TLS) certificates for use with AWS services and your internal connected resources. SSL/TLS certificates are used to secure network communications and establish the identity of websites over the Internet as well as resources on private networks. AWS Certificate Manager removes the time-consuming manual process of purchasing, uploading, and renewing SSL/TLS certificates. @@ -53,3 +73,4 @@ We define them as "US East 2" in the UI and convert them to the amazon format in 1) **User** - Will be where the AWS Access Key ID goes 2) **Password** - Will be where the Secret Access Key goes. + From a898f396bc801b93bef37d8e3637d67bcb3f2bc0 Mon Sep 17 00:00:00 2001 From: Keyfactor Date: Thu, 16 Jun 2022 18:37:49 +0000 Subject: [PATCH 4/4] Update generated README --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/README.md b/README.md index bdc0e72..610e6d2 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,24 @@ # AWS +AWS Certificate Manager is a service that lets you easily provision, manage, and deploy public and private Secure Sockets Layer/Transport Layer Security (SSL/TLS) certificates for use with AWS services and your internal connected resources. SSL/TLS certificates are used to secure network communications and establish the identity of websites over the Internet as well as resources on private networks. AWS Certificate Manager removes the time-consuming manual process of purchasing, uploading, and renewing SSL/TLS certificates. + +#### Integration status: Production - Ready for use in production environments. + +## About the Keyfactor Windows Orchestrator AnyAgent + +This repository contains a Windows Orchestrator AnyAgent, which is a plugin to the Keyfactor Windows Orchestrator. Within the Keyfactor Platform, Orchestrators are used to manage “certificate stores” — collections of certificates and roots of trust that are found within and used by various applications. + +The Windows Orchestrator is part of the Keyfactor software distribution and is available via the Keyfactor customer portal. For general instructions on installing AnyAgents, see the “Keyfactor Command Orchestrator Installation and Configuration Guide” section of the Keyfactor documentation. For configuration details of this specific AnyAgent, see below in this readme. + +Note that in Keyfactor Version 9, the Windows Orchestrator have been replaced by the Universal Orchestrator. While this AnyAgent continues to work with the Windows Orchestrator, and the Windows Orchestrator is supported alongside the Universal Orchestrator talking to Keyfactor version 9, AnyAgent plugins cannot be used with the Universal Orchestrator. + +--- + + + +--- + +# AWS ## Windows-orchestrator AWS Certificate Manager is a service that lets you easily provision, manage, and deploy public and private Secure Sockets Layer/Transport Layer Security (SSL/TLS) certificates for use with AWS services and your internal connected resources. SSL/TLS certificates are used to secure network communications and establish the identity of websites over the Internet as well as resources on private networks. AWS Certificate Manager removes the time-consuming manual process of purchasing, uploading, and renewing SSL/TLS certificates.