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

[v1.27] System agent push tags fix #8569

Merged
merged 2 commits into from Oct 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions .drone.yml
Expand Up @@ -673,12 +673,15 @@ steps:

- name: dispatch
image: curlimages/curl:7.74.0
secrets: [ pat_username, github_token, release_token_k3s ]
user: root
environment:
PAT_USERNAME:
from_secret: pat_username
PAT_TOKEN:
from_secret: github_token
K3S_RELEASE_TOKEN:
from_secret: release_token_k3s
commands:
- apk -U --no-cache add bash
- scripts/dispatch
Expand Down
4 changes: 2 additions & 2 deletions scripts/dispatch
Expand Up @@ -13,7 +13,7 @@ curl -XPOST -u "${PAT_USERNAME}:${PAT_TOKEN}" \
SYSTEM_AGENT_INSTALLER_K3S_REPO="https://api.github.com/repos/rancher/system-agent-installer-k3s/dispatches"

# send dispatch event to SYSTEM_AGENT_INSTALLER_K3S_REPO
curl -XPOST -u "${PAT_USERNAME}:${PAT_TOKEN}" \
curl -XPOST -H "Authorization: Bearer ${K3S_RELEASE_TOKEN}" \
-H "Accept: application/vnd.github.everest-preview+json" \
-H "Content-Type: application/json" $SYSTEM_AGENT_INSTALLER_K3S_REPO \
-H "Content-Type: application/vnd.github+json" $SYSTEM_AGENT_INSTALLER_K3S_REPO \
--data '{"event_type": "create_tag", "client_payload": {"tag":"'"$DRONE_TAG"'"}}'