Skip to content

Commit c97190e

Browse files
OCI push (#99)
* First commit * After testing changes * Fix * Obtain a ghcr.io token for pulling. * PR comments. * Simplify authentication * Extra validation * generate tgz layer * calculate content digest * refactor auth to always pass the registry token, and accept digest in GET /manifest * uncomment tests * service=${registry} * HEAD request to check existance of blobs * some codespace funniness * fix codespace funniness * split push into different file * remove push for now (in oci-push branch) * revert new http * add push work * sync tests * update test * done and untested * it works * comment test code * comment ] * package type * remove temporary code and registry detection * update test * new test file to tabs * update test names * implement entrypoint for pushing devcontainer-collection.json * remove test code Co-authored-by: Edmundo Gonzalez <[email protected]>
1 parent 59516b3 commit c97190e

9 files changed

+715
-226
lines changed

src/spec-configuration/containerFeaturesConfiguration.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { mkdirpLocal, readLocalFile, rmLocal, writeLocalFile, cpDirectoryLocal,
1212
import { Log, LogLevel } from '../spec-utils/log';
1313
import { request } from '../spec-utils/httpRequest';
1414
import { computeFeatureInstallationOrder } from './containerFeaturesOrder';
15-
import { fetchOCIFeature, getOCIFeatureSet, OCIFeatureRef, fetchOCIFeatureManifestIfExists, OCIManifest } from './containerFeaturesOCI';
15+
import { fetchOCIFeature, getOCIFeatureSet, OCIFeatureRef, fetchOCIFeatureManifestIfExistsFromUserIdentifier, OCIManifest } from './containerFeaturesOCI';
1616

1717
// v1
1818
const V1_ASSET_NAME = 'devcontainer-features.tgz';
@@ -505,7 +505,7 @@ export async function getFeatureIdType(output: Log, env: NodeJS.ProcessEnv, user
505505
return { type: 'github-repo', manifest: undefined };
506506
}
507507

508-
const manifest = await fetchOCIFeatureManifestIfExists(output, env, userFeatureId);
508+
const manifest = await fetchOCIFeatureManifestIfExistsFromUserIdentifier(output, env, userFeatureId);
509509
if (manifest) {
510510
return { type: 'oci', manifest: manifest };
511511
} else {
@@ -1022,4 +1022,3 @@ function getFeatureValueDefaults(feature: Feature) {
10221022
return defaults;
10231023
}, {} as Record<string, string | boolean | undefined>);
10241024
}
1025-

0 commit comments

Comments
 (0)