-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(feez/nuget/slack): github secrets (#2373)
- Loading branch information
Showing
2 changed files
with
11 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,32 +26,19 @@ jobs: | |
|
||
- name: Package with canary suffix | ||
run: ./build.sh pack | ||
|
||
- name: Prepare feedz.io | ||
uses: hashicorp/[email protected] | ||
with: | ||
url: ${{ secrets.VAULT_ADDR }} | ||
method: approle | ||
roleId: ${{ secrets.VAULT_ROLE_ID }} | ||
secretId: ${{ secrets.VAULT_SECRET_ID }} | ||
secrets: | | ||
secret/apm-team/ci/elastic-observability-feedz.io apiKey | REPO_API_KEY ; | ||
secret/apm-team/ci/elastic-observability-feedz.io url | REPO_API_URL | ||
|
||
# Github packages requires authentication, this is likely going away in the future so for now we publish to feedz.io | ||
- name: publish canary packages to feedz.io | ||
run: dotnet nuget push 'build/output/_packages/*.nupkg' -k ${REPO_API_KEY} -s ${REPO_API_URL} --skip-duplicate --no-symbols | ||
run: dotnet nuget push 'build/output/_packages/*.nupkg' -k ${{ secrets.FEEDZ_IO_API_KEY }} -s ${{ secrets.FEEDZ_IO_API_URL }} --skip-duplicate --no-symbols | ||
|
||
- name: publish canary packages github package repository | ||
run: dotnet nuget push 'build/output/_packages/*.nupkg' -k ${{secrets.GITHUB_TOKEN}} -s https://nuget.pkg.github.com/elastic/index.json --skip-duplicate --no-symbols | ||
|
||
- if: ${{ failure() }} | ||
uses: elastic/apm-pipeline-library/.github/actions/slack-message@current | ||
uses: elastic/oblt-actions/slack/[email protected] | ||
with: | ||
url: ${{ secrets.VAULT_ADDR }} | ||
roleId: ${{ secrets.VAULT_ROLE_ID }} | ||
secretId: ${{ secrets.VAULT_SECRET_ID }} | ||
channel: "#apm-agent-dotnet" | ||
bot-token: ${{ secrets.SLACK_BOT_TOKEN }} | ||
channel-id: "#apm-agent-dotnet" | ||
message: | | ||
:large_yellow_circle: [${{ github.repository }}] Snapshot could not be published to feedz.io. | ||
Build: (<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|here>) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,19 +29,8 @@ jobs: | |
- name: Package | ||
run: ./build.sh pack | ||
|
||
- name: Prepare Nuget | ||
uses: hashicorp/[email protected] | ||
with: | ||
url: ${{ secrets.VAULT_ADDR }} | ||
method: approle | ||
roleId: ${{ secrets.VAULT_ROLE_ID }} | ||
secretId: ${{ secrets.VAULT_SECRET_ID }} | ||
secrets: | | ||
secret/apm-team/ci/elastic-observability-nuget apiKey | REPO_API_KEY ; | ||
secret/apm-team/ci/elastic-observability-nuget url | REPO_API_URL | ||
- name: Release to Nuget | ||
run: .ci/linux/deploy.sh ${REPO_API_KEY} ${REPO_API_URL} | ||
run: .ci/linux/deploy.sh ${{ secrets.NUGET_API_KEY }} ${{ secrets.NUGET_API_URL }} | ||
|
||
- name: Log in to the Elastic Container registry | ||
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0 | ||
|
@@ -69,24 +58,20 @@ jobs: | |
gh release upload ${{ github.ref_name }} "build/output/ElasticApmAgent_${{ steps.bootstrap.outputs.agent-version }}.zip" "build/output/elastic_apm_profiler_${{ steps.bootstrap.outputs.agent-version }}-linux-x64.zip" | ||
- if: ${{ success() }} | ||
uses: elastic/apm-pipeline-library/.github/actions/slack-message@current | ||
uses: elastic/oblt-actions/slack/[email protected] | ||
with: | ||
url: ${{ secrets.VAULT_ADDR }} | ||
roleId: ${{ secrets.VAULT_ROLE_ID }} | ||
secretId: ${{ secrets.VAULT_SECRET_ID }} | ||
channel: ${{ env.SLACK_CHANNEL }} | ||
bot-token: ${{ secrets.SLACK_BOT_TOKEN }} | ||
channel-id: ${{ env.SLACK_CHANNEL }} | ||
message: | | ||
:large_green_circle: [${{ github.repository }}] Release *${{ github.ref_name }}* published. | ||
Build: (<${{ env.JOB_URL }}|here>) | ||
Release URL: (<https://github.com/elastic/apm-agent-dotnet/releases/tag/${{ github.ref_name }}|${{ github.ref_name }}>) | ||
- if: ${{ failure() }} | ||
uses: elastic/apm-pipeline-library/.github/actions/slack-message@current | ||
uses: elastic/oblt-actions/slack/[email protected] | ||
with: | ||
url: ${{ secrets.VAULT_ADDR }} | ||
roleId: ${{ secrets.VAULT_ROLE_ID }} | ||
secretId: ${{ secrets.VAULT_SECRET_ID }} | ||
channel: ${{ env.SLACK_CHANNEL }} | ||
bot-token: ${{ secrets.SLACK_BOT_TOKEN }} | ||
channel-id: ${{ env.SLACK_CHANNEL }} | ||
message: | | ||
:large_yellow_circle: [${{ github.repository }}] Release *${{ github.ref_name }}* could not be published. | ||
Build: (<${{ env.JOB_URL }}|here>) | ||
|