Skip to content

Commit 5ad92ad

Browse files
authored
Merge branch 'master' into update-go-version
2 parents 40ec67b + f52e999 commit 5ad92ad

176 files changed

Lines changed: 12831 additions & 1141 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/dependabot.yml

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "gomod"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
open-pull-requests-limit: 5
8+
9+
- package-ecosystem: "gomod"
10+
directory: "/pkg/plugin/sdk"
11+
schedule:
12+
interval: "weekly"
13+
14+
- package-ecosystem: "gomod"
15+
directory: "/tool/actions-gh-release"
16+
schedule:
17+
interval: "weekly"
18+
19+
- package-ecosystem: "gomod"
20+
directory: "/tool/actions-plan-preview"
21+
schedule:
22+
interval: "weekly"
23+
24+
- package-ecosystem: "gomod"
25+
directory: "/tool/codegen/protoc-gen-auth"
26+
schedule:
27+
interval: "weekly"
28+
29+
- package-ecosystem: "gomod"
30+
directory: "/pkg/app/pipedv1/plugin/kubernetes"
31+
schedule:
32+
interval: "weekly"
33+
34+
- package-ecosystem: "gomod"
35+
directory: "/pkg/app/pipedv1/plugin/kubernetes_multicluster"
36+
schedule:
37+
interval: "weekly"
38+
39+
- package-ecosystem: "gomod"
40+
directory: "/pkg/app/pipedv1/plugin/terraform"
41+
schedule:
42+
interval: "weekly"
43+
44+
- package-ecosystem: "gomod"
45+
directory: "/pkg/app/pipedv1/plugin/cloudrun"
46+
schedule:
47+
interval: "weekly"
48+
49+
- package-ecosystem: "gomod"
50+
directory: "/pkg/app/pipedv1/plugin/scriptrun"
51+
schedule:
52+
interval: "weekly"
53+
54+
- package-ecosystem: "gomod"
55+
directory: "/pkg/app/pipedv1/plugin/analysis"
56+
schedule:
57+
interval: "weekly"
58+
59+
- package-ecosystem: "gomod"
60+
directory: "/pkg/app/pipedv1/plugin/wait"
61+
schedule:
62+
interval: "weekly"
63+
64+
- package-ecosystem: "gomod"
65+
directory: "/pkg/app/pipedv1/plugin/waitapproval"
66+
schedule:
67+
interval: "weekly"
68+
69+
- package-ecosystem: "npm"
70+
directory: "/web"
71+
schedule:
72+
interval: "weekly"
73+
open-pull-requests-limit: 5
74+
75+
- package-ecosystem: "npm"
76+
directory: "/docs"
77+
schedule:
78+
interval: "monthly"
79+
80+
- package-ecosystem: "github-actions"
81+
directory: "/"
82+
schedule:
83+
interval: "weekly"

.github/labeler.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ area/manifests:
2121
area/docs:
2222
- docs/*
2323
- docs/**/*
24+
- README.md
25+
- CONTRIBUTING.md
26+
- RELEASES.md
2427

2528
area/examples:
2629
- examples/*

.github/workflows/lint.yaml

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,7 @@ jobs:
6161
# if jobs in the 'go' job matrix failed or were cancelled, this job will fail
6262
# otherwise this job is marked as successful because all steps are skipped
6363
run: exit 1
64-
if: >-
65-
${{
66-
contains(needs.*.result, 'failure')
67-
|| contains(needs.*.result, 'cancelled')
68-
}}
64+
if: needs.go.result != 'success'
6965

7066
web:
7167
runs-on: ubuntu-24.04
@@ -101,3 +97,35 @@ jobs:
10197

10298
- name: Lint all Helm charts
10399
run: make lint/helm
100+
101+
govulncheck:
102+
runs-on: ubuntu-24.04
103+
needs: list-go-modules
104+
strategy:
105+
fail-fast: false
106+
matrix:
107+
module: ${{ fromJSON(needs.list-go-modules.outputs.modules) }}
108+
steps:
109+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
110+
- uses: actions/setup-go@v5
111+
with:
112+
go-version: ${{ env.GO_VERSION }}
113+
- name: Install govulncheck
114+
run: go install golang.org/x/vuln/cmd/govulncheck@latest
115+
- name: Run govulncheck
116+
working-directory: ${{ matrix.module }}
117+
# TODO: Remove continue-on-error once vulnerabilities are fixed (see #6600)
118+
continue-on-error: true
119+
run: govulncheck ./...
120+
121+
govulncheck-completed:
122+
runs-on: ubuntu-24.04
123+
if: always()
124+
needs: govulncheck
125+
steps:
126+
- name: Check govulncheck status
127+
# Warn-only for now until vulnerabilities are fixed (see #6600)
128+
# Change 'skipped' back to 'success' once fixed
129+
run: |
130+
echo "::warning::govulncheck found vulnerabilities - see issue #6600 for tracking"
131+
if: needs.govulncheck.result != 'success'

.github/workflows/publish_image_chart.yaml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -133,18 +133,6 @@ jobs:
133133
commit-url: https://github.com/pipe-cd/pipecd/commit/${{ github.sha }}
134134
commit-author: ${{ github.actor }}
135135
contexts: Source-Commit-URL=https://github.com/pipe-cd/pipecd/commit/${{ github.sha }}
136-
# Notify PipeCD to trigger update demo environment via EventWatcher.
137-
- uses: pipe-cd/actions-event-register@v1.2.0
138-
with:
139-
api-address: ${{ secrets.PIPECD_API_ADDRESS }}
140-
api-key: ${{ secrets.PIPECD_API_KEY }}
141-
event-name: helm-release
142-
labels: helmRepo=pipecd,env=demo
143-
data: ${{ env.PIPECD_VERSION }}
144-
commit-hash: ${{ github.sha }}
145-
commit-url: https://github.com/pipe-cd/pipecd/commit/${{ github.sha }}
146-
commit-author: ${{ github.actor }}
147-
contexts: Source-Commit-URL=https://github.com/pipe-cd/pipecd/commit/${{ github.sha }}
148136

149137
release-quickstart-manifests:
150138
runs-on: ubuntu-24.04

.github/workflows/thank-you.yaml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Contributor Thank You
2+
3+
on:
4+
pull_request_target:
5+
types:
6+
- closed
7+
8+
permissions:
9+
pull-requests: write
10+
contents: read
11+
12+
jobs:
13+
thank-you:
14+
# Only run if the PR was actually merged
15+
if: github.event.pull_request.merged
16+
runs-on: ubuntu-latest
17+
steps:
18+
# We must check out the code to read the MAINTAINERS.json file
19+
- name: Checkout repository
20+
uses: actions/checkout@v4
21+
22+
- name: Leave a Thank You Comment
23+
uses: actions/github-script@v7
24+
with:
25+
script: |
26+
const fs = require('fs');
27+
const creator = context.payload.pull_request.user.login;
28+
29+
// Skip bots to avoid comment loops
30+
if (creator.endsWith('[bot]')) {
31+
console.log('Skipping bot account.');
32+
return;
33+
}
34+
35+
// Read maintainers list from JSON file
36+
const maintainersData = JSON.parse(fs.readFileSync('MAINTAINERS.json', 'utf8'));
37+
const maintainers = maintainersData.maintainers.map(m => m.toLowerCase());
38+
39+
// Skip core maintainers to avoid spamming the team
40+
if (maintainers.includes(creator.toLowerCase())) {
41+
console.log(`Skipping maintainer account: ${creator}`);
42+
return;
43+
}
44+
45+
const message = 'Thank you for contributing to PipeCD! The changes in this pull request will be part of the upcoming release!';
46+
47+
// Post the comment to the PR
48+
await github.rest.issues.createComment({
49+
owner: context.repo.owner,
50+
repo: context.repo.repo,
51+
issue_number: context.payload.pull_request.number,
52+
body: message
53+
});
54+

MAINTAINERS.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"maintainers": [
3+
"khanhtc1202",
4+
"nghialv",
5+
"ffjlabo",
6+
"Warashi",
7+
"t-kikuc",
8+
"eeshaanSA"
9+
]
10+
}

RELEASE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Generated by `make release` command.
22
# DO NOT EDIT.
3-
tag: v0.55.0
3+
tag: v0.56.0
44

55
releaseNoteGenerator:
66
showCommitter: false

cmd/pipectl/main.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import (
2525
"github.com/pipe-cd/pipecd/pkg/app/pipectl/cmd/piped"
2626
"github.com/pipe-cd/pipecd/pkg/app/pipectl/cmd/planpreview"
2727
"github.com/pipe-cd/pipecd/pkg/app/pipectl/cmd/plugin"
28+
"github.com/pipe-cd/pipecd/pkg/app/pipectl/cmd/transfer"
2829
"github.com/pipe-cd/pipecd/pkg/cli"
2930
)
3031

@@ -43,6 +44,7 @@ func main() {
4344
encrypt.NewCommand(),
4445
migrate.NewCommand(),
4546
plugin.NewCommand(),
47+
transfer.NewCommand(),
4648
)
4749

4850
if err := app.Run(); err != nil {

docs/assets/js/copy-button.js

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
/**
2+
* Copy button functionality for code snippets
3+
* Adds a copy button to all highlighted code blocks
4+
*/
5+
6+
(function() {
7+
'use strict';
8+
9+
// SVG icon for copy button
10+
const copyIcon = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"></path><rect x="8" y="2" width="8" height="4" rx="1" ry="1"></rect></svg>`;
11+
12+
const checkIcon = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>`;
13+
14+
/**
15+
* Add copy button to a code block
16+
*/
17+
function addCopyButton(codeBlock) {
18+
// Skip if button already added
19+
if (codeBlock.parentElement.querySelector('.copy-button')) {
20+
return;
21+
}
22+
23+
// Get the text content from the code block
24+
const codeText = codeBlock.textContent;
25+
26+
// Create button container
27+
const buttonContainer = document.createElement('div');
28+
buttonContainer.className = 'copy-button-container';
29+
30+
// Create button
31+
const button = document.createElement('button');
32+
button.className = 'copy-button';
33+
button.title = 'Copy code';
34+
button.innerHTML = copyIcon;
35+
button.type = 'button';
36+
37+
// Add click handler
38+
button.addEventListener('click', function(e) {
39+
e.preventDefault();
40+
41+
// Copy to clipboard
42+
if (navigator.clipboard && navigator.clipboard.writeText) {
43+
navigator.clipboard.writeText(codeText).then(() => {
44+
// Show success state
45+
showCopySuccess(button);
46+
}).catch(() => {
47+
// Fallback: try using execCommand
48+
fallbackCopy(codeText, button);
49+
});
50+
} else {
51+
// Fallback for older browsers
52+
fallbackCopy(codeText, button);
53+
}
54+
});
55+
56+
buttonContainer.appendChild(button);
57+
codeBlock.parentElement.insertBefore(buttonContainer, codeBlock);
58+
}
59+
60+
/**
61+
* Fallback copy method for older browsers
62+
*/
63+
function fallbackCopy(text, button) {
64+
const textarea = document.createElement('textarea');
65+
textarea.value = text;
66+
textarea.style.position = 'fixed';
67+
textarea.style.left = '-9999px';
68+
document.body.appendChild(textarea);
69+
70+
try {
71+
textarea.select();
72+
document.execCommand('copy');
73+
showCopySuccess(button);
74+
} catch (err) {
75+
console.error('Failed to copy text:', err);
76+
} finally {
77+
document.body.removeChild(textarea);
78+
}
79+
}
80+
81+
/**
82+
* Show copy success feedback
83+
*/
84+
function showCopySuccess(button) {
85+
const originalHTML = button.innerHTML;
86+
button.classList.add('copied');
87+
button.innerHTML = checkIcon;
88+
button.title = 'Copied!';
89+
90+
// Reset after 2 seconds
91+
setTimeout(() => {
92+
button.classList.remove('copied');
93+
button.innerHTML = originalHTML;
94+
button.title = 'Copy code';
95+
}, 2000);
96+
}
97+
98+
/**
99+
* Initialize copy buttons when DOM is ready
100+
*/
101+
function initCopyButtons() {
102+
// Target code blocks within .highlight divs (Hugo/Chroma output)
103+
const codeBlocks = document.querySelectorAll('.highlight > pre > code');
104+
105+
codeBlocks.forEach(codeBlock => {
106+
addCopyButton(codeBlock);
107+
});
108+
}
109+
110+
// Initialize when DOM is ready
111+
if (document.readyState === 'loading') {
112+
document.addEventListener('DOMContentLoaded', initCopyButtons);
113+
} else {
114+
initCopyButtons();
115+
}
116+
117+
// Also support dynamic content (if needed in future)
118+
if (window.MutationObserver) {
119+
const observer = new MutationObserver((mutations) => {
120+
mutations.forEach((mutation) => {
121+
if (mutation.addedNodes.length) {
122+
mutation.addedNodes.forEach((node) => {
123+
if (node.nodeType === 1) { // Element node
124+
const codeBlocks = node.querySelectorAll?.('.highlight > pre > code') || [];
125+
codeBlocks.forEach(addCopyButton);
126+
}
127+
});
128+
}
129+
});
130+
});
131+
132+
observer.observe(document.body, {
133+
childList: true,
134+
subtree: true
135+
});
136+
}
137+
})();

0 commit comments

Comments
 (0)