update to deno
This commit is contained in:
@@ -11,7 +11,7 @@ import { RegistryStorage } from './mod.classes.registrystorage.ts';
|
||||
|
||||
export class SzciDockerManager {
|
||||
public szciRef: Szci;
|
||||
public npmciRegistryStorage = new RegistryStorage();
|
||||
public szciRegistryStorage = new RegistryStorage();
|
||||
|
||||
constructor(szciArg: Szci) {
|
||||
this.szciRef = szciArg;
|
||||
@@ -42,12 +42,12 @@ export class SzciDockerManager {
|
||||
await this.pull(argvArg);
|
||||
break;
|
||||
default:
|
||||
logger.log('error', `>>npmci docker ...<< action >>${action}<< not supported`);
|
||||
logger.log('error', `>>szci docker ...<< action >>${action}<< not supported`);
|
||||
}
|
||||
} else {
|
||||
logger.log(
|
||||
'info',
|
||||
`>>npmci docker ...<< cli arguments invalid... Please read the documentation.`
|
||||
`>>szci docker ...<< cli arguments invalid... Please read the documentation.`
|
||||
);
|
||||
}
|
||||
};
|
||||
@@ -69,7 +69,7 @@ export class SzciDockerManager {
|
||||
*/
|
||||
public login = async () => {
|
||||
await this.prepare();
|
||||
await this.npmciRegistryStorage.loginAll();
|
||||
await this.szciRegistryStorage.loginAll();
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -83,11 +83,11 @@ export class SzciDockerManager {
|
||||
logger.log('error', 'Running in Gitlab CI, but no registry token specified by gitlab!');
|
||||
Deno.exit(1);
|
||||
}
|
||||
this.npmciRegistryStorage.addRegistry(
|
||||
this.szciRegistryStorage.addRegistry(
|
||||
new DockerRegistry({
|
||||
registryUrl: 'registry.gitlab.com',
|
||||
username: 'gitlab-ci-token',
|
||||
password: Deno.env.get("CI_JOB_TOKEN"),
|
||||
password: Deno.env.get("CI_JOB_TOKEN")!,
|
||||
})
|
||||
);
|
||||
}
|
||||
@@ -95,9 +95,9 @@ export class SzciDockerManager {
|
||||
// handle registries
|
||||
await plugins.smartobject.forEachMinimatch(
|
||||
Deno.env.toObject(),
|
||||
'NPMCI_LOGIN_DOCKER*',
|
||||
'SZCI_LOGIN_DOCKER*',
|
||||
async (envString: string) => {
|
||||
this.npmciRegistryStorage.addRegistry(DockerRegistry.fromEnvString(envString));
|
||||
this.szciRegistryStorage.addRegistry(DockerRegistry.fromEnvString(envString));
|
||||
}
|
||||
);
|
||||
return;
|
||||
@@ -115,14 +115,14 @@ export class SzciDockerManager {
|
||||
if (argvArg._.length >= 3 && argvArg._[2] !== 'npmextra') {
|
||||
dockerRegistryUrls.push(argvArg._[2]);
|
||||
} else {
|
||||
if (this.szciRef.npmciConfig.getConfig().dockerRegistries.length === 0) {
|
||||
if (this.szciRef.szciConfig.getConfig().dockerRegistries.length === 0) {
|
||||
logger.log(
|
||||
'warn',
|
||||
`There are no docker registries listed in npmextra.json! This is strange!`
|
||||
);
|
||||
}
|
||||
dockerRegistryUrls = dockerRegistryUrls.concat(
|
||||
this.szciRef.npmciConfig.getConfig().dockerRegistries
|
||||
this.szciRef.szciConfig.getConfig().dockerRegistries
|
||||
);
|
||||
}
|
||||
|
||||
@@ -137,7 +137,7 @@ export class SzciDockerManager {
|
||||
const dockerfileArray = await Dockerfile.readDockerfiles(this)
|
||||
.then(Dockerfile.sortDockerfiles)
|
||||
.then(Dockerfile.mapDockerfiles);
|
||||
const dockerRegistryToPushTo = await this.npmciRegistryStorage.getRegistryByUrl(
|
||||
const dockerRegistryToPushTo = await this.szciRegistryStorage.getRegistryByUrl(
|
||||
dockerRegistryUrl
|
||||
);
|
||||
if (!dockerRegistryToPushTo) {
|
||||
@@ -163,7 +163,7 @@ export class SzciDockerManager {
|
||||
if (argvArg._.length >= 4) {
|
||||
suffix = argvArg._[3];
|
||||
}
|
||||
const localDockerRegistry = await this.npmciRegistryStorage.getRegistryByUrl(registryUrlArg);
|
||||
const localDockerRegistry = await this.szciRegistryStorage.getRegistryByUrl(registryUrlArg);
|
||||
const dockerfileArray = await Dockerfile.readDockerfiles(this)
|
||||
.then(Dockerfile.sortDockerfiles)
|
||||
.then(Dockerfile.mapDockerfiles);
|
||||
|
||||
Reference in New Issue
Block a user