Update deployment request config value if not env variables are set
This commit is contained in:
parent
22bb409617
commit
ced815802e
@ -265,12 +265,15 @@ export class Registry {
|
|||||||
throw new Error(`No record found for ${lrn}`);
|
throw new Error(`No record found for ${lrn}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
const hash = await this.generateConfigHash(
|
let hash;
|
||||||
data.environmentVariables,
|
if (Object.keys(data.environmentVariables).length !== 0) {
|
||||||
data.requesterAddress,
|
hash = await this.generateConfigHash(
|
||||||
data.publicKey,
|
data.environmentVariables,
|
||||||
data.apiUrl,
|
data.requesterAddress,
|
||||||
);
|
data.publicKey,
|
||||||
|
data.apiUrl,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// Create record of type ApplicationDeploymentRequest and publish
|
// Create record of type ApplicationDeploymentRequest and publish
|
||||||
const applicationDeploymentRequest = {
|
const applicationDeploymentRequest = {
|
||||||
@ -281,9 +284,7 @@ export class Registry {
|
|||||||
dns: data.dns,
|
dns: data.dns,
|
||||||
|
|
||||||
// https://git.vdb.to/cerc-io/laconic-registry-cli/commit/129019105dfb93bebcea02fde0ed64d0f8e5983b
|
// https://git.vdb.to/cerc-io/laconic-registry-cli/commit/129019105dfb93bebcea02fde0ed64d0f8e5983b
|
||||||
config: JSON.stringify({
|
config: JSON.stringify(hash ? { ref: hash } : {}),
|
||||||
ref: hash,
|
|
||||||
}),
|
|
||||||
meta: JSON.stringify({
|
meta: JSON.stringify({
|
||||||
note: `Added by Snowball @ ${DateTime.utc().toFormat(
|
note: `Added by Snowball @ ${DateTime.utc().toFormat(
|
||||||
"EEE LLL dd HH:mm:ss 'UTC' yyyy"
|
"EEE LLL dd HH:mm:ss 'UTC' yyyy"
|
||||||
|
@ -243,7 +243,7 @@ export class Service {
|
|||||||
|
|
||||||
if (oldDNSDeployment) {
|
if (oldDNSDeployment) {
|
||||||
// Send removal request for the previous DNS deployment and delete DB entry
|
// Send removal request for the previous DNS deployment and delete DB entry
|
||||||
if (oldDNSDeployment.url === deployment.url) {
|
if (oldDNSDeployment.url !== deployment.url) {
|
||||||
await this.laconicRegistry.createApplicationDeploymentRemovalRequest({
|
await this.laconicRegistry.createApplicationDeploymentRemovalRequest({
|
||||||
deploymentId: oldDNSDeployment.applicationDeploymentRecordId!,
|
deploymentId: oldDNSDeployment.applicationDeploymentRecordId!,
|
||||||
deployerLrn: oldDNSDeployment.deployer.deployerLrn,
|
deployerLrn: oldDNSDeployment.deployer.deployerLrn,
|
||||||
|
Loading…
Reference in New Issue
Block a user