mirror of
https://github.com/gradle/actions
synced 2024-11-24 02:12:12 +00:00
Build outputs
This commit is contained in:
parent
a835cbb991
commit
610728fa8c
4 changed files with 91 additions and 14 deletions
48
dist/main/index.js
vendored
48
dist/main/index.js
vendored
|
@ -139971,6 +139971,7 @@ const request_error_1 = __nccwpck_require__(10537);
|
||||||
const path = __importStar(__nccwpck_require__(71017));
|
const path = __importStar(__nccwpck_require__(71017));
|
||||||
const fs_1 = __importDefault(__nccwpck_require__(57147));
|
const fs_1 = __importDefault(__nccwpck_require__(57147));
|
||||||
const layout = __importStar(__nccwpck_require__(28182));
|
const layout = __importStar(__nccwpck_require__(28182));
|
||||||
|
const errors_1 = __nccwpck_require__(36976);
|
||||||
const input_params_1 = __nccwpck_require__(23885);
|
const input_params_1 = __nccwpck_require__(23885);
|
||||||
const DEPENDENCY_GRAPH_PREFIX = 'dependency-graph_';
|
const DEPENDENCY_GRAPH_PREFIX = 'dependency-graph_';
|
||||||
function setup(option) {
|
function setup(option) {
|
||||||
|
@ -139984,6 +139985,7 @@ function setup(option) {
|
||||||
}
|
}
|
||||||
core.info('Enabling dependency graph generation');
|
core.info('Enabling dependency graph generation');
|
||||||
core.exportVariable('GITHUB_DEPENDENCY_GRAPH_ENABLED', 'true');
|
core.exportVariable('GITHUB_DEPENDENCY_GRAPH_ENABLED', 'true');
|
||||||
|
core.exportVariable('GITHUB_DEPENDENCY_GRAPH_CONTINUE_ON_FAILURE', (0, input_params_1.getDependencyGraphContinueOnFailure)());
|
||||||
core.exportVariable('GITHUB_DEPENDENCY_GRAPH_JOB_CORRELATOR', getJobCorrelator());
|
core.exportVariable('GITHUB_DEPENDENCY_GRAPH_JOB_CORRELATOR', getJobCorrelator());
|
||||||
core.exportVariable('GITHUB_DEPENDENCY_GRAPH_JOB_ID', github.context.runId);
|
core.exportVariable('GITHUB_DEPENDENCY_GRAPH_JOB_ID', github.context.runId);
|
||||||
core.exportVariable('GITHUB_DEPENDENCY_GRAPH_REF', github.context.ref);
|
core.exportVariable('GITHUB_DEPENDENCY_GRAPH_REF', github.context.ref);
|
||||||
|
@ -140009,7 +140011,7 @@ function complete(option) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
core.warning(`Failed to ${option} dependency graph. Will continue. ${String(e)}`);
|
warnOrFail(option, e);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -140040,7 +140042,7 @@ function downloadAndSubmitDependencyGraphs() {
|
||||||
yield submitDependencyGraphs(yield downloadDependencyGraphs());
|
yield submitDependencyGraphs(yield downloadDependencyGraphs());
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
core.warning(`Download and submit dependency graph failed. Will continue. ${String(e)}`);
|
warnOrFail(input_params_1.DependencyGraphOption.DownloadAndSubmit, e);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -140052,7 +140054,7 @@ function submitDependencyGraphs(dependencyGraphFiles) {
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
if (error instanceof request_error_1.RequestError) {
|
if (error instanceof request_error_1.RequestError) {
|
||||||
core.warning(buildWarningMessage(jsonFile, error));
|
throw new Error(translateErrorMessage(jsonFile, error));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
throw error;
|
throw error;
|
||||||
|
@ -140061,9 +140063,9 @@ function submitDependencyGraphs(dependencyGraphFiles) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
function buildWarningMessage(jsonFile, error) {
|
function translateErrorMessage(jsonFile, error) {
|
||||||
const relativeJsonFile = getRelativePathFromWorkspace(jsonFile);
|
const relativeJsonFile = getRelativePathFromWorkspace(jsonFile);
|
||||||
const mainWarning = `Failed to submit dependency graph ${relativeJsonFile}.\n${String(error)}`;
|
const mainWarning = `Dependency submission failed for ${relativeJsonFile}.\n${String(error)}`;
|
||||||
if (error.message === 'Resource not accessible by integration') {
|
if (error.message === 'Resource not accessible by integration') {
|
||||||
return `${mainWarning}
|
return `${mainWarning}
|
||||||
Please ensure that the 'contents: write' permission is available for the workflow job.
|
Please ensure that the 'contents: write' permission is available for the workflow job.
|
||||||
|
@ -140118,6 +140120,12 @@ function findDependencyGraphFiles(dir) {
|
||||||
return graphFiles;
|
return graphFiles;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
function warnOrFail(option, error) {
|
||||||
|
if (!(0, input_params_1.getDependencyGraphContinueOnFailure)()) {
|
||||||
|
throw new errors_1.PostActionJobFailure(error);
|
||||||
|
}
|
||||||
|
core.warning(`Failed to ${option} dependency graph. Will continue.\n${String(error)}`);
|
||||||
|
}
|
||||||
function getOctokit() {
|
function getOctokit() {
|
||||||
return github.getOctokit(getGithubToken());
|
return github.getOctokit(getGithubToken());
|
||||||
}
|
}
|
||||||
|
@ -140169,6 +140177,30 @@ function sanitize(value) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 36976:
|
||||||
|
/***/ ((__unused_webpack_module, exports) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
|
exports.PostActionJobFailure = void 0;
|
||||||
|
class PostActionJobFailure extends Error {
|
||||||
|
constructor(error) {
|
||||||
|
if (error instanceof Error) {
|
||||||
|
super(error.message);
|
||||||
|
this.name = error.name;
|
||||||
|
this.stack = error.stack;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
super(String(error));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
exports.PostActionJobFailure = PostActionJobFailure;
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 23584:
|
/***/ 23584:
|
||||||
|
@ -140332,7 +140364,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.JobSummaryOption = exports.DependencyGraphOption = exports.parseNumericInput = exports.getArtifactRetentionDays = exports.getDependencyGraphOption = exports.getPRCommentOption = exports.getJobSummaryOption = exports.isJobSummaryEnabled = exports.getGithubToken = exports.getJobMatrix = exports.getArguments = exports.getGradleVersion = exports.getBuildRootDirectory = exports.getCacheExcludes = exports.getCacheIncludes = exports.getCacheEncryptionKey = exports.isCacheCleanupEnabled = exports.isCacheDebuggingEnabled = exports.isCacheStrictMatch = exports.isCacheOverwriteExisting = exports.isCacheWriteOnly = exports.isCacheReadOnly = exports.isCacheDisabled = void 0;
|
exports.JobSummaryOption = exports.DependencyGraphOption = exports.parseNumericInput = exports.getArtifactRetentionDays = exports.getDependencyGraphContinueOnFailure = exports.getDependencyGraphOption = exports.getPRCommentOption = exports.getJobSummaryOption = exports.isJobSummaryEnabled = exports.getGithubToken = exports.getJobMatrix = exports.getArguments = exports.getGradleVersion = exports.getBuildRootDirectory = exports.getCacheExcludes = exports.getCacheIncludes = exports.getCacheEncryptionKey = exports.isCacheCleanupEnabled = exports.isCacheDebuggingEnabled = exports.isCacheStrictMatch = exports.isCacheOverwriteExisting = exports.isCacheWriteOnly = exports.isCacheReadOnly = exports.isCacheDisabled = void 0;
|
||||||
const core = __importStar(__nccwpck_require__(42186));
|
const core = __importStar(__nccwpck_require__(42186));
|
||||||
const string_argv_1 = __nccwpck_require__(19663);
|
const string_argv_1 = __nccwpck_require__(19663);
|
||||||
function isCacheDisabled() {
|
function isCacheDisabled() {
|
||||||
|
@ -140437,6 +140469,10 @@ function getDependencyGraphOption() {
|
||||||
throw TypeError(`The value '${val}' is not valid for 'dependency-graph'. Valid values are: [disabled, generate, generate-and-submit, generate-and-upload, download-and-submit]. The default value is 'disabled'.`);
|
throw TypeError(`The value '${val}' is not valid for 'dependency-graph'. Valid values are: [disabled, generate, generate-and-submit, generate-and-upload, download-and-submit]. The default value is 'disabled'.`);
|
||||||
}
|
}
|
||||||
exports.getDependencyGraphOption = getDependencyGraphOption;
|
exports.getDependencyGraphOption = getDependencyGraphOption;
|
||||||
|
function getDependencyGraphContinueOnFailure() {
|
||||||
|
return getBooleanInput('dependency-graph-continue-on-failure', true);
|
||||||
|
}
|
||||||
|
exports.getDependencyGraphContinueOnFailure = getDependencyGraphContinueOnFailure;
|
||||||
function getArtifactRetentionDays() {
|
function getArtifactRetentionDays() {
|
||||||
const val = core.getInput('artifact-retention-days');
|
const val = core.getInput('artifact-retention-days');
|
||||||
return parseNumericInput('artifact-retention-days', val, 0);
|
return parseNumericInput('artifact-retention-days', val, 0);
|
||||||
|
|
2
dist/main/index.js.map
vendored
2
dist/main/index.js.map
vendored
File diff suppressed because one or more lines are too long
53
dist/post/index.js
vendored
53
dist/post/index.js
vendored
|
@ -137424,6 +137424,7 @@ const request_error_1 = __nccwpck_require__(10537);
|
||||||
const path = __importStar(__nccwpck_require__(71017));
|
const path = __importStar(__nccwpck_require__(71017));
|
||||||
const fs_1 = __importDefault(__nccwpck_require__(57147));
|
const fs_1 = __importDefault(__nccwpck_require__(57147));
|
||||||
const layout = __importStar(__nccwpck_require__(28182));
|
const layout = __importStar(__nccwpck_require__(28182));
|
||||||
|
const errors_1 = __nccwpck_require__(36976);
|
||||||
const input_params_1 = __nccwpck_require__(23885);
|
const input_params_1 = __nccwpck_require__(23885);
|
||||||
const DEPENDENCY_GRAPH_PREFIX = 'dependency-graph_';
|
const DEPENDENCY_GRAPH_PREFIX = 'dependency-graph_';
|
||||||
function setup(option) {
|
function setup(option) {
|
||||||
|
@ -137437,6 +137438,7 @@ function setup(option) {
|
||||||
}
|
}
|
||||||
core.info('Enabling dependency graph generation');
|
core.info('Enabling dependency graph generation');
|
||||||
core.exportVariable('GITHUB_DEPENDENCY_GRAPH_ENABLED', 'true');
|
core.exportVariable('GITHUB_DEPENDENCY_GRAPH_ENABLED', 'true');
|
||||||
|
core.exportVariable('GITHUB_DEPENDENCY_GRAPH_CONTINUE_ON_FAILURE', (0, input_params_1.getDependencyGraphContinueOnFailure)());
|
||||||
core.exportVariable('GITHUB_DEPENDENCY_GRAPH_JOB_CORRELATOR', getJobCorrelator());
|
core.exportVariable('GITHUB_DEPENDENCY_GRAPH_JOB_CORRELATOR', getJobCorrelator());
|
||||||
core.exportVariable('GITHUB_DEPENDENCY_GRAPH_JOB_ID', github.context.runId);
|
core.exportVariable('GITHUB_DEPENDENCY_GRAPH_JOB_ID', github.context.runId);
|
||||||
core.exportVariable('GITHUB_DEPENDENCY_GRAPH_REF', github.context.ref);
|
core.exportVariable('GITHUB_DEPENDENCY_GRAPH_REF', github.context.ref);
|
||||||
|
@ -137462,7 +137464,7 @@ function complete(option) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
core.warning(`Failed to ${option} dependency graph. Will continue. ${String(e)}`);
|
warnOrFail(option, e);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -137493,7 +137495,7 @@ function downloadAndSubmitDependencyGraphs() {
|
||||||
yield submitDependencyGraphs(yield downloadDependencyGraphs());
|
yield submitDependencyGraphs(yield downloadDependencyGraphs());
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
core.warning(`Download and submit dependency graph failed. Will continue. ${String(e)}`);
|
warnOrFail(input_params_1.DependencyGraphOption.DownloadAndSubmit, e);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -137505,7 +137507,7 @@ function submitDependencyGraphs(dependencyGraphFiles) {
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
if (error instanceof request_error_1.RequestError) {
|
if (error instanceof request_error_1.RequestError) {
|
||||||
core.warning(buildWarningMessage(jsonFile, error));
|
throw new Error(translateErrorMessage(jsonFile, error));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
throw error;
|
throw error;
|
||||||
|
@ -137514,9 +137516,9 @@ function submitDependencyGraphs(dependencyGraphFiles) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
function buildWarningMessage(jsonFile, error) {
|
function translateErrorMessage(jsonFile, error) {
|
||||||
const relativeJsonFile = getRelativePathFromWorkspace(jsonFile);
|
const relativeJsonFile = getRelativePathFromWorkspace(jsonFile);
|
||||||
const mainWarning = `Failed to submit dependency graph ${relativeJsonFile}.\n${String(error)}`;
|
const mainWarning = `Dependency submission failed for ${relativeJsonFile}.\n${String(error)}`;
|
||||||
if (error.message === 'Resource not accessible by integration') {
|
if (error.message === 'Resource not accessible by integration') {
|
||||||
return `${mainWarning}
|
return `${mainWarning}
|
||||||
Please ensure that the 'contents: write' permission is available for the workflow job.
|
Please ensure that the 'contents: write' permission is available for the workflow job.
|
||||||
|
@ -137571,6 +137573,12 @@ function findDependencyGraphFiles(dir) {
|
||||||
return graphFiles;
|
return graphFiles;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
function warnOrFail(option, error) {
|
||||||
|
if (!(0, input_params_1.getDependencyGraphContinueOnFailure)()) {
|
||||||
|
throw new errors_1.PostActionJobFailure(error);
|
||||||
|
}
|
||||||
|
core.warning(`Failed to ${option} dependency graph. Will continue.\n${String(error)}`);
|
||||||
|
}
|
||||||
function getOctokit() {
|
function getOctokit() {
|
||||||
return github.getOctokit(getGithubToken());
|
return github.getOctokit(getGithubToken());
|
||||||
}
|
}
|
||||||
|
@ -137622,6 +137630,30 @@ function sanitize(value) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 36976:
|
||||||
|
/***/ ((__unused_webpack_module, exports) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
|
exports.PostActionJobFailure = void 0;
|
||||||
|
class PostActionJobFailure extends Error {
|
||||||
|
constructor(error) {
|
||||||
|
if (error instanceof Error) {
|
||||||
|
super(error.message);
|
||||||
|
this.name = error.name;
|
||||||
|
this.stack = error.stack;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
super(String(error));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
exports.PostActionJobFailure = PostActionJobFailure;
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 23885:
|
/***/ 23885:
|
||||||
|
@ -137653,7 +137685,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.JobSummaryOption = exports.DependencyGraphOption = exports.parseNumericInput = exports.getArtifactRetentionDays = exports.getDependencyGraphOption = exports.getPRCommentOption = exports.getJobSummaryOption = exports.isJobSummaryEnabled = exports.getGithubToken = exports.getJobMatrix = exports.getArguments = exports.getGradleVersion = exports.getBuildRootDirectory = exports.getCacheExcludes = exports.getCacheIncludes = exports.getCacheEncryptionKey = exports.isCacheCleanupEnabled = exports.isCacheDebuggingEnabled = exports.isCacheStrictMatch = exports.isCacheOverwriteExisting = exports.isCacheWriteOnly = exports.isCacheReadOnly = exports.isCacheDisabled = void 0;
|
exports.JobSummaryOption = exports.DependencyGraphOption = exports.parseNumericInput = exports.getArtifactRetentionDays = exports.getDependencyGraphContinueOnFailure = exports.getDependencyGraphOption = exports.getPRCommentOption = exports.getJobSummaryOption = exports.isJobSummaryEnabled = exports.getGithubToken = exports.getJobMatrix = exports.getArguments = exports.getGradleVersion = exports.getBuildRootDirectory = exports.getCacheExcludes = exports.getCacheIncludes = exports.getCacheEncryptionKey = exports.isCacheCleanupEnabled = exports.isCacheDebuggingEnabled = exports.isCacheStrictMatch = exports.isCacheOverwriteExisting = exports.isCacheWriteOnly = exports.isCacheReadOnly = exports.isCacheDisabled = void 0;
|
||||||
const core = __importStar(__nccwpck_require__(42186));
|
const core = __importStar(__nccwpck_require__(42186));
|
||||||
const string_argv_1 = __nccwpck_require__(19663);
|
const string_argv_1 = __nccwpck_require__(19663);
|
||||||
function isCacheDisabled() {
|
function isCacheDisabled() {
|
||||||
|
@ -137758,6 +137790,10 @@ function getDependencyGraphOption() {
|
||||||
throw TypeError(`The value '${val}' is not valid for 'dependency-graph'. Valid values are: [disabled, generate, generate-and-submit, generate-and-upload, download-and-submit]. The default value is 'disabled'.`);
|
throw TypeError(`The value '${val}' is not valid for 'dependency-graph'. Valid values are: [disabled, generate, generate-and-submit, generate-and-upload, download-and-submit]. The default value is 'disabled'.`);
|
||||||
}
|
}
|
||||||
exports.getDependencyGraphOption = getDependencyGraphOption;
|
exports.getDependencyGraphOption = getDependencyGraphOption;
|
||||||
|
function getDependencyGraphContinueOnFailure() {
|
||||||
|
return getBooleanInput('dependency-graph-continue-on-failure', true);
|
||||||
|
}
|
||||||
|
exports.getDependencyGraphContinueOnFailure = getDependencyGraphContinueOnFailure;
|
||||||
function getArtifactRetentionDays() {
|
function getArtifactRetentionDays() {
|
||||||
const val = core.getInput('artifact-retention-days');
|
const val = core.getInput('artifact-retention-days');
|
||||||
return parseNumericInput('artifact-retention-days', val, 0);
|
return parseNumericInput('artifact-retention-days', val, 0);
|
||||||
|
@ -138021,6 +138057,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.run = void 0;
|
exports.run = void 0;
|
||||||
const core = __importStar(__nccwpck_require__(42186));
|
const core = __importStar(__nccwpck_require__(42186));
|
||||||
const setupGradle = __importStar(__nccwpck_require__(18652));
|
const setupGradle = __importStar(__nccwpck_require__(18652));
|
||||||
|
const errors_1 = __nccwpck_require__(36976);
|
||||||
process.on('uncaughtException', e => handleFailure(e));
|
process.on('uncaughtException', e => handleFailure(e));
|
||||||
function run() {
|
function run() {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
@ -138028,6 +138065,10 @@ function run() {
|
||||||
yield setupGradle.complete();
|
yield setupGradle.complete();
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
|
if (error instanceof errors_1.PostActionJobFailure) {
|
||||||
|
core.setFailed(String(error));
|
||||||
|
return;
|
||||||
|
}
|
||||||
handleFailure(error);
|
handleFailure(error);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
2
dist/post/index.js.map
vendored
2
dist/post/index.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue