mirror of
https://github.com/gradle/actions
synced 2024-11-27 11:52:24 +00:00
[bot] Update dist directory
This commit is contained in:
parent
c198d84863
commit
750cdda3ed
10 changed files with 77 additions and 47 deletions
36
dist/dependency-submission/main/index.js
vendored
36
dist/dependency-submission/main/index.js
vendored
|
@ -144345,6 +144345,9 @@ class DependencyGraphConfig {
|
|||
getJobCorrelator() {
|
||||
return DependencyGraphConfig.constructJobCorrelator(github.context.workflow, github.context.job, getJobMatrix());
|
||||
}
|
||||
getReportDirectory() {
|
||||
return path_1.default.resolve(getWorkspaceDirectory(), 'dependency-graph-reports');
|
||||
}
|
||||
static constructJobCorrelator(workflow, jobId, matrixJson) {
|
||||
const matrixString = this.describeMatrix(matrixJson);
|
||||
const label = matrixString ? `${workflow}-${jobId}-${matrixString}` : `${workflow}-${jobId}`;
|
||||
|
@ -144694,7 +144697,7 @@ async function setup(config) {
|
|||
maybeExportVariable('GITHUB_DEPENDENCY_GRAPH_REF', github.context.ref);
|
||||
maybeExportVariable('GITHUB_DEPENDENCY_GRAPH_SHA', getShaFromContext());
|
||||
maybeExportVariable('GITHUB_DEPENDENCY_GRAPH_WORKSPACE', (0, configuration_1.getWorkspaceDirectory)());
|
||||
maybeExportVariable('DEPENDENCY_GRAPH_REPORT_DIR', path.resolve((0, configuration_1.getWorkspaceDirectory)(), 'dependency-graph-reports'));
|
||||
maybeExportVariable('DEPENDENCY_GRAPH_REPORT_DIR', config.getReportDirectory());
|
||||
if (option === configuration_1.DependencyGraphOption.Clear) {
|
||||
core.exportVariable('DEPENDENCY_GRAPH_INCLUDE_PROJECTS', '');
|
||||
core.exportVariable('DEPENDENCY_GRAPH_INCLUDE_CONFIGURATIONS', '');
|
||||
|
@ -144716,10 +144719,10 @@ async function complete(config) {
|
|||
return;
|
||||
case configuration_1.DependencyGraphOption.GenerateAndSubmit:
|
||||
case configuration_1.DependencyGraphOption.Clear:
|
||||
await submitDependencyGraphs(await findGeneratedDependencyGraphFiles());
|
||||
await submitDependencyGraphs(await findDependencyGraphFiles());
|
||||
return;
|
||||
case configuration_1.DependencyGraphOption.GenerateAndUpload:
|
||||
await uploadDependencyGraphs(await findGeneratedDependencyGraphFiles(), config);
|
||||
await uploadDependencyGraphs(await findDependencyGraphFiles(), config);
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
|
@ -144727,11 +144730,11 @@ async function complete(config) {
|
|||
}
|
||||
}
|
||||
exports.complete = complete;
|
||||
async function findGeneratedDependencyGraphFiles() {
|
||||
const workspaceDirectory = (0, configuration_1.getWorkspaceDirectory)();
|
||||
return await findDependencyGraphFiles(workspaceDirectory);
|
||||
}
|
||||
async function uploadDependencyGraphs(dependencyGraphFiles, config) {
|
||||
if (dependencyGraphFiles.length === 0) {
|
||||
core.info('No dependency graph files found to upload.');
|
||||
return;
|
||||
}
|
||||
if (isRunningInActEnvironment()) {
|
||||
core.info('Dependency graph upload not supported in the ACT environment.');
|
||||
core.info(`Would upload: ${dependencyGraphFiles.join(', ')}`);
|
||||
|
@ -144761,6 +144764,10 @@ async function downloadAndSubmitDependencyGraphs(config) {
|
|||
}
|
||||
}
|
||||
async function submitDependencyGraphs(dependencyGraphFiles) {
|
||||
if (dependencyGraphFiles.length === 0) {
|
||||
core.info('No dependency graph files found to submit.');
|
||||
return;
|
||||
}
|
||||
if (isRunningInActEnvironment()) {
|
||||
core.info('Dependency graph submit not supported in the ACT environment.');
|
||||
core.info(`Would submit: ${dependencyGraphFiles.join(', ')}`);
|
||||
|
@ -144802,7 +144809,6 @@ async function submitDependencyGraphFile(jsonFile) {
|
|||
core.notice(`Submitted ${relativeJsonFile}: ${response.data.message}`);
|
||||
}
|
||||
async function downloadDependencyGraphs() {
|
||||
const workspaceDirectory = (0, configuration_1.getWorkspaceDirectory)();
|
||||
const findBy = github.context.payload.workflow_run
|
||||
? {
|
||||
token: (0, configuration_1.getGithubToken)(),
|
||||
|
@ -144812,27 +144818,29 @@ async function downloadDependencyGraphs() {
|
|||
}
|
||||
: undefined;
|
||||
const artifactClient = new artifact_1.DefaultArtifactClient();
|
||||
const downloadPath = path.resolve(workspaceDirectory, 'dependency-graph');
|
||||
const dependencyGraphArtifacts = (await artifactClient.listArtifacts({
|
||||
latest: true,
|
||||
findBy
|
||||
})).artifacts.filter(candidate => candidate.name.startsWith(DEPENDENCY_GRAPH_PREFIX));
|
||||
})).artifacts.filter(artifact => artifact.name.startsWith(DEPENDENCY_GRAPH_PREFIX));
|
||||
for (const artifact of dependencyGraphArtifacts) {
|
||||
const downloadedArtifact = await artifactClient.downloadArtifact(artifact.id, {
|
||||
path: downloadPath,
|
||||
findBy
|
||||
});
|
||||
core.info(`Downloading dependency-graph artifact ${artifact.name} to ${downloadedArtifact.downloadPath}`);
|
||||
}
|
||||
return findDependencyGraphFiles(downloadPath);
|
||||
return findDependencyGraphFiles();
|
||||
}
|
||||
async function findDependencyGraphFiles(dir) {
|
||||
const globber = await glob.create(`${dir}/dependency-graph-reports/*.json`);
|
||||
async function findDependencyGraphFiles() {
|
||||
const globber = await glob.create(`${getReportDirectory()}/**/*.json`);
|
||||
const allFiles = await globber.glob();
|
||||
const unprocessedFiles = allFiles.filter(file => !isProcessed(file));
|
||||
unprocessedFiles.forEach(markProcessed);
|
||||
core.info(`Found dependency graph files: ${unprocessedFiles.join(', ')}`);
|
||||
return unprocessedFiles;
|
||||
}
|
||||
function getReportDirectory() {
|
||||
return process.env.DEPENDENCY_GRAPH_REPORT_DIR;
|
||||
}
|
||||
function isProcessed(dependencyGraphFile) {
|
||||
const markerFile = `${dependencyGraphFile}.processed`;
|
||||
return fs_1.default.existsSync(markerFile);
|
||||
|
|
2
dist/dependency-submission/main/index.js.map
vendored
2
dist/dependency-submission/main/index.js.map
vendored
File diff suppressed because one or more lines are too long
3
dist/dependency-submission/post/index.js
vendored
3
dist/dependency-submission/post/index.js
vendored
|
@ -95773,6 +95773,9 @@ class DependencyGraphConfig {
|
|||
getJobCorrelator() {
|
||||
return DependencyGraphConfig.constructJobCorrelator(github.context.workflow, github.context.job, getJobMatrix());
|
||||
}
|
||||
getReportDirectory() {
|
||||
return path_1.default.resolve(getWorkspaceDirectory(), 'dependency-graph-reports');
|
||||
}
|
||||
static constructJobCorrelator(workflow, jobId, matrixJson) {
|
||||
const matrixString = this.describeMatrix(matrixJson);
|
||||
const label = matrixString ? `${workflow}-${jobId}-${matrixString}` : `${workflow}-${jobId}`;
|
||||
|
|
2
dist/dependency-submission/post/index.js.map
vendored
2
dist/dependency-submission/post/index.js.map
vendored
File diff suppressed because one or more lines are too long
36
dist/setup-gradle/main/index.js
vendored
36
dist/setup-gradle/main/index.js
vendored
|
@ -144345,6 +144345,9 @@ class DependencyGraphConfig {
|
|||
getJobCorrelator() {
|
||||
return DependencyGraphConfig.constructJobCorrelator(github.context.workflow, github.context.job, getJobMatrix());
|
||||
}
|
||||
getReportDirectory() {
|
||||
return path_1.default.resolve(getWorkspaceDirectory(), 'dependency-graph-reports');
|
||||
}
|
||||
static constructJobCorrelator(workflow, jobId, matrixJson) {
|
||||
const matrixString = this.describeMatrix(matrixJson);
|
||||
const label = matrixString ? `${workflow}-${jobId}-${matrixString}` : `${workflow}-${jobId}`;
|
||||
|
@ -144694,7 +144697,7 @@ async function setup(config) {
|
|||
maybeExportVariable('GITHUB_DEPENDENCY_GRAPH_REF', github.context.ref);
|
||||
maybeExportVariable('GITHUB_DEPENDENCY_GRAPH_SHA', getShaFromContext());
|
||||
maybeExportVariable('GITHUB_DEPENDENCY_GRAPH_WORKSPACE', (0, configuration_1.getWorkspaceDirectory)());
|
||||
maybeExportVariable('DEPENDENCY_GRAPH_REPORT_DIR', path.resolve((0, configuration_1.getWorkspaceDirectory)(), 'dependency-graph-reports'));
|
||||
maybeExportVariable('DEPENDENCY_GRAPH_REPORT_DIR', config.getReportDirectory());
|
||||
if (option === configuration_1.DependencyGraphOption.Clear) {
|
||||
core.exportVariable('DEPENDENCY_GRAPH_INCLUDE_PROJECTS', '');
|
||||
core.exportVariable('DEPENDENCY_GRAPH_INCLUDE_CONFIGURATIONS', '');
|
||||
|
@ -144716,10 +144719,10 @@ async function complete(config) {
|
|||
return;
|
||||
case configuration_1.DependencyGraphOption.GenerateAndSubmit:
|
||||
case configuration_1.DependencyGraphOption.Clear:
|
||||
await submitDependencyGraphs(await findGeneratedDependencyGraphFiles());
|
||||
await submitDependencyGraphs(await findDependencyGraphFiles());
|
||||
return;
|
||||
case configuration_1.DependencyGraphOption.GenerateAndUpload:
|
||||
await uploadDependencyGraphs(await findGeneratedDependencyGraphFiles(), config);
|
||||
await uploadDependencyGraphs(await findDependencyGraphFiles(), config);
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
|
@ -144727,11 +144730,11 @@ async function complete(config) {
|
|||
}
|
||||
}
|
||||
exports.complete = complete;
|
||||
async function findGeneratedDependencyGraphFiles() {
|
||||
const workspaceDirectory = (0, configuration_1.getWorkspaceDirectory)();
|
||||
return await findDependencyGraphFiles(workspaceDirectory);
|
||||
}
|
||||
async function uploadDependencyGraphs(dependencyGraphFiles, config) {
|
||||
if (dependencyGraphFiles.length === 0) {
|
||||
core.info('No dependency graph files found to upload.');
|
||||
return;
|
||||
}
|
||||
if (isRunningInActEnvironment()) {
|
||||
core.info('Dependency graph upload not supported in the ACT environment.');
|
||||
core.info(`Would upload: ${dependencyGraphFiles.join(', ')}`);
|
||||
|
@ -144761,6 +144764,10 @@ async function downloadAndSubmitDependencyGraphs(config) {
|
|||
}
|
||||
}
|
||||
async function submitDependencyGraphs(dependencyGraphFiles) {
|
||||
if (dependencyGraphFiles.length === 0) {
|
||||
core.info('No dependency graph files found to submit.');
|
||||
return;
|
||||
}
|
||||
if (isRunningInActEnvironment()) {
|
||||
core.info('Dependency graph submit not supported in the ACT environment.');
|
||||
core.info(`Would submit: ${dependencyGraphFiles.join(', ')}`);
|
||||
|
@ -144802,7 +144809,6 @@ async function submitDependencyGraphFile(jsonFile) {
|
|||
core.notice(`Submitted ${relativeJsonFile}: ${response.data.message}`);
|
||||
}
|
||||
async function downloadDependencyGraphs() {
|
||||
const workspaceDirectory = (0, configuration_1.getWorkspaceDirectory)();
|
||||
const findBy = github.context.payload.workflow_run
|
||||
? {
|
||||
token: (0, configuration_1.getGithubToken)(),
|
||||
|
@ -144812,27 +144818,29 @@ async function downloadDependencyGraphs() {
|
|||
}
|
||||
: undefined;
|
||||
const artifactClient = new artifact_1.DefaultArtifactClient();
|
||||
const downloadPath = path.resolve(workspaceDirectory, 'dependency-graph');
|
||||
const dependencyGraphArtifacts = (await artifactClient.listArtifacts({
|
||||
latest: true,
|
||||
findBy
|
||||
})).artifacts.filter(candidate => candidate.name.startsWith(DEPENDENCY_GRAPH_PREFIX));
|
||||
})).artifacts.filter(artifact => artifact.name.startsWith(DEPENDENCY_GRAPH_PREFIX));
|
||||
for (const artifact of dependencyGraphArtifacts) {
|
||||
const downloadedArtifact = await artifactClient.downloadArtifact(artifact.id, {
|
||||
path: downloadPath,
|
||||
findBy
|
||||
});
|
||||
core.info(`Downloading dependency-graph artifact ${artifact.name} to ${downloadedArtifact.downloadPath}`);
|
||||
}
|
||||
return findDependencyGraphFiles(downloadPath);
|
||||
return findDependencyGraphFiles();
|
||||
}
|
||||
async function findDependencyGraphFiles(dir) {
|
||||
const globber = await glob.create(`${dir}/dependency-graph-reports/*.json`);
|
||||
async function findDependencyGraphFiles() {
|
||||
const globber = await glob.create(`${getReportDirectory()}/**/*.json`);
|
||||
const allFiles = await globber.glob();
|
||||
const unprocessedFiles = allFiles.filter(file => !isProcessed(file));
|
||||
unprocessedFiles.forEach(markProcessed);
|
||||
core.info(`Found dependency graph files: ${unprocessedFiles.join(', ')}`);
|
||||
return unprocessedFiles;
|
||||
}
|
||||
function getReportDirectory() {
|
||||
return process.env.DEPENDENCY_GRAPH_REPORT_DIR;
|
||||
}
|
||||
function isProcessed(dependencyGraphFile) {
|
||||
const markerFile = `${dependencyGraphFile}.processed`;
|
||||
return fs_1.default.existsSync(markerFile);
|
||||
|
|
2
dist/setup-gradle/main/index.js.map
vendored
2
dist/setup-gradle/main/index.js.map
vendored
File diff suppressed because one or more lines are too long
36
dist/setup-gradle/post/index.js
vendored
36
dist/setup-gradle/post/index.js
vendored
|
@ -141798,6 +141798,9 @@ class DependencyGraphConfig {
|
|||
getJobCorrelator() {
|
||||
return DependencyGraphConfig.constructJobCorrelator(github.context.workflow, github.context.job, getJobMatrix());
|
||||
}
|
||||
getReportDirectory() {
|
||||
return path_1.default.resolve(getWorkspaceDirectory(), 'dependency-graph-reports');
|
||||
}
|
||||
static constructJobCorrelator(workflow, jobId, matrixJson) {
|
||||
const matrixString = this.describeMatrix(matrixJson);
|
||||
const label = matrixString ? `${workflow}-${jobId}-${matrixString}` : `${workflow}-${jobId}`;
|
||||
|
@ -142147,7 +142150,7 @@ async function setup(config) {
|
|||
maybeExportVariable('GITHUB_DEPENDENCY_GRAPH_REF', github.context.ref);
|
||||
maybeExportVariable('GITHUB_DEPENDENCY_GRAPH_SHA', getShaFromContext());
|
||||
maybeExportVariable('GITHUB_DEPENDENCY_GRAPH_WORKSPACE', (0, configuration_1.getWorkspaceDirectory)());
|
||||
maybeExportVariable('DEPENDENCY_GRAPH_REPORT_DIR', path.resolve((0, configuration_1.getWorkspaceDirectory)(), 'dependency-graph-reports'));
|
||||
maybeExportVariable('DEPENDENCY_GRAPH_REPORT_DIR', config.getReportDirectory());
|
||||
if (option === configuration_1.DependencyGraphOption.Clear) {
|
||||
core.exportVariable('DEPENDENCY_GRAPH_INCLUDE_PROJECTS', '');
|
||||
core.exportVariable('DEPENDENCY_GRAPH_INCLUDE_CONFIGURATIONS', '');
|
||||
|
@ -142169,10 +142172,10 @@ async function complete(config) {
|
|||
return;
|
||||
case configuration_1.DependencyGraphOption.GenerateAndSubmit:
|
||||
case configuration_1.DependencyGraphOption.Clear:
|
||||
await submitDependencyGraphs(await findGeneratedDependencyGraphFiles());
|
||||
await submitDependencyGraphs(await findDependencyGraphFiles());
|
||||
return;
|
||||
case configuration_1.DependencyGraphOption.GenerateAndUpload:
|
||||
await uploadDependencyGraphs(await findGeneratedDependencyGraphFiles(), config);
|
||||
await uploadDependencyGraphs(await findDependencyGraphFiles(), config);
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
|
@ -142180,11 +142183,11 @@ async function complete(config) {
|
|||
}
|
||||
}
|
||||
exports.complete = complete;
|
||||
async function findGeneratedDependencyGraphFiles() {
|
||||
const workspaceDirectory = (0, configuration_1.getWorkspaceDirectory)();
|
||||
return await findDependencyGraphFiles(workspaceDirectory);
|
||||
}
|
||||
async function uploadDependencyGraphs(dependencyGraphFiles, config) {
|
||||
if (dependencyGraphFiles.length === 0) {
|
||||
core.info('No dependency graph files found to upload.');
|
||||
return;
|
||||
}
|
||||
if (isRunningInActEnvironment()) {
|
||||
core.info('Dependency graph upload not supported in the ACT environment.');
|
||||
core.info(`Would upload: ${dependencyGraphFiles.join(', ')}`);
|
||||
|
@ -142214,6 +142217,10 @@ async function downloadAndSubmitDependencyGraphs(config) {
|
|||
}
|
||||
}
|
||||
async function submitDependencyGraphs(dependencyGraphFiles) {
|
||||
if (dependencyGraphFiles.length === 0) {
|
||||
core.info('No dependency graph files found to submit.');
|
||||
return;
|
||||
}
|
||||
if (isRunningInActEnvironment()) {
|
||||
core.info('Dependency graph submit not supported in the ACT environment.');
|
||||
core.info(`Would submit: ${dependencyGraphFiles.join(', ')}`);
|
||||
|
@ -142255,7 +142262,6 @@ async function submitDependencyGraphFile(jsonFile) {
|
|||
core.notice(`Submitted ${relativeJsonFile}: ${response.data.message}`);
|
||||
}
|
||||
async function downloadDependencyGraphs() {
|
||||
const workspaceDirectory = (0, configuration_1.getWorkspaceDirectory)();
|
||||
const findBy = github.context.payload.workflow_run
|
||||
? {
|
||||
token: (0, configuration_1.getGithubToken)(),
|
||||
|
@ -142265,27 +142271,29 @@ async function downloadDependencyGraphs() {
|
|||
}
|
||||
: undefined;
|
||||
const artifactClient = new artifact_1.DefaultArtifactClient();
|
||||
const downloadPath = path.resolve(workspaceDirectory, 'dependency-graph');
|
||||
const dependencyGraphArtifacts = (await artifactClient.listArtifacts({
|
||||
latest: true,
|
||||
findBy
|
||||
})).artifacts.filter(candidate => candidate.name.startsWith(DEPENDENCY_GRAPH_PREFIX));
|
||||
})).artifacts.filter(artifact => artifact.name.startsWith(DEPENDENCY_GRAPH_PREFIX));
|
||||
for (const artifact of dependencyGraphArtifacts) {
|
||||
const downloadedArtifact = await artifactClient.downloadArtifact(artifact.id, {
|
||||
path: downloadPath,
|
||||
findBy
|
||||
});
|
||||
core.info(`Downloading dependency-graph artifact ${artifact.name} to ${downloadedArtifact.downloadPath}`);
|
||||
}
|
||||
return findDependencyGraphFiles(downloadPath);
|
||||
return findDependencyGraphFiles();
|
||||
}
|
||||
async function findDependencyGraphFiles(dir) {
|
||||
const globber = await glob.create(`${dir}/dependency-graph-reports/*.json`);
|
||||
async function findDependencyGraphFiles() {
|
||||
const globber = await glob.create(`${getReportDirectory()}/**/*.json`);
|
||||
const allFiles = await globber.glob();
|
||||
const unprocessedFiles = allFiles.filter(file => !isProcessed(file));
|
||||
unprocessedFiles.forEach(markProcessed);
|
||||
core.info(`Found dependency graph files: ${unprocessedFiles.join(', ')}`);
|
||||
return unprocessedFiles;
|
||||
}
|
||||
function getReportDirectory() {
|
||||
return process.env.DEPENDENCY_GRAPH_REPORT_DIR;
|
||||
}
|
||||
function isProcessed(dependencyGraphFile) {
|
||||
const markerFile = `${dependencyGraphFile}.processed`;
|
||||
return fs_1.default.existsSync(markerFile);
|
||||
|
|
2
dist/setup-gradle/post/index.js.map
vendored
2
dist/setup-gradle/post/index.js.map
vendored
File diff suppressed because one or more lines are too long
3
dist/wrapper-validation/main/index.js
vendored
3
dist/wrapper-validation/main/index.js
vendored
|
@ -89925,6 +89925,9 @@ class DependencyGraphConfig {
|
|||
getJobCorrelator() {
|
||||
return DependencyGraphConfig.constructJobCorrelator(github.context.workflow, github.context.job, getJobMatrix());
|
||||
}
|
||||
getReportDirectory() {
|
||||
return path_1.default.resolve(getWorkspaceDirectory(), 'dependency-graph-reports');
|
||||
}
|
||||
static constructJobCorrelator(workflow, jobId, matrixJson) {
|
||||
const matrixString = this.describeMatrix(matrixJson);
|
||||
const label = matrixString ? `${workflow}-${jobId}-${matrixString}` : `${workflow}-${jobId}`;
|
||||
|
|
2
dist/wrapper-validation/main/index.js.map
vendored
2
dist/wrapper-validation/main/index.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue