Compare commits

...

5 Commits

Author SHA1 Message Date
CrazyMax
51cc1b5526 Merge pull request #1006 from crazy-max/rm-field-history
Some checks failed
publish / publish (push) Has been cancelled
buildx(history): require buildx >=0.23.0 to export a build record
2026-03-04 14:58:07 +01:00
CrazyMax
58584e3d97 buildx(history): require buildx >=0.23.0 to export a build record
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-03-04 14:38:19 +01:00
CrazyMax
f06e39e022 buildx(history): remove unused field
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-03-04 14:34:21 +01:00
CrazyMax
4c705618e1 Merge pull request #1005 from crazy-max/util-inputlist-comment
util: add commentNoInfix support to getInputList
2026-03-04 13:36:35 +01:00
CrazyMax
1ebb922e84 util: add commentNoInfix support to getInputList
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-03-04 12:57:36 +01:00
4 changed files with 12 additions and 1 deletions

View File

@@ -87,6 +87,12 @@ describe('getInputList', () => {
expect(res).toEqual(['foo=bar', 'bar=qux']);
});
it('multiline with comment and no infix comment', async () => {
setInput('labels', '# ignore this\nfoo=bar\nbar=qux#baz');
const res = Util.getInputList('labels', {comment: '#', commentNoInfix: true});
expect(res).toEqual(['foo=bar', 'bar=qux#baz']);
});
it('different new lines and ignoring comma correctly', async () => {
setInput('cache-from', 'user/app:cache\r\ntype=local,src=path/to/dir');
const res = Util.getInputList('cache-from', {ignoreComma: true});

View File

@@ -70,6 +70,10 @@ export class History {
}
public async export(opts: ExportOpts): Promise<ExportResponse> {
if (!(await this.buildx.versionSatisfies('>=0.23.0'))) {
throw new Error('Buildx >= 0.23.0 is required to export a build record');
}
let builderName: string = '';
let nodeName: string = '';
const refs: Array<string> = [];

View File

@@ -107,7 +107,6 @@ export interface ExportOpts {
refs: Array<string>;
noSummaries?: boolean;
image?: string;
useContainer?: boolean;
}
export interface ExportResponse {

View File

@@ -24,6 +24,7 @@ import {parse} from 'csv-parse/sync';
export interface ListOpts {
ignoreComma?: boolean;
comment?: string;
commentNoInfix?: boolean;
quote?: string | boolean | Buffer | null;
}
@@ -42,6 +43,7 @@ export class Util {
columns: false,
relaxQuotes: true,
comment: opts?.comment,
comment_no_infix: opts?.commentNoInfix,
relaxColumnCount: true,
skipEmptyLines: true,
quote: opts?.quote