How to use the ern-container-publisher.publishContainer function in ern-container-publisher

To help you get started, we’ve selected a few ern-container-publisher examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github electrode-io / electrode-native / ern-orchestrator / src / performContainerStateUpdateInCauldron.ts View on Github external
await cauldron.updateContainerVersion(
      napDescriptor,
      cauldronContainerNewVersion
    )

    // Update version of ern used to generate this Container
    await cauldron.updateContainerErnVersion(
      napDescriptor,
      Platform.currentVersion
    )

    // If there is a git publisher, now is the time to publish
    // the raw (untransformed) container version, before running the transformers
    if (gitPublisher) {
      await kax.task('Publishing raw Container to git').run(
        publishContainer({
          containerPath: outDir,
          containerVersion: `${cauldronContainerNewVersion}-raw`,
          extra: {
            branch: 'raw',
          },
          platform: napDescriptor.platform!,
          publisher: 'git',
          url: gitPublisher.url,
        })
      )
    }

    // Update yarn lock and run Container transformers sequentially
    if (!publishOnly) {
      const pathToNewYarnLock = path.join(compositeMiniAppDir, 'yarn.lock')
      await cauldron.addOrUpdateYarnLock(
github electrode-io / electrode-native / ern-orchestrator / src / runContainerPublishers.ts View on Github external
}

      // ==================================================================
      // Legacy code. To be deprecated
      let publisherName = publisherFromCauldron.name
      if (publisherName === 'github') {
        log.warn(
          `Your Cauldron is using the 'github' publisher which has been deprecated.
Please rename 'github' publisher name to 'git' in your Cauldron to get rid of this warning.`
        )
        publisherName = 'git'
      }
      // ==================================================================

      await kax.task(`Running Container Publisher ${publisherName}`).run(
        publishContainer({
          containerPath,
          containerVersion,
          extra,
          platform: napDescriptor.platform,
          publisher: publisherName,
          url: publisherFromCauldron.url,
        })
      )
    }
    log.info(
      `Published new Container version ${containerVersion} for ${napDescriptor.toString()}`
    )
  }
}
github electrode-io / electrode-native / ern-orchestrator / src / runContainerPipeline.ts View on Github external
typeof extra === 'string' &&
      extra.startsWith(cauldronFileUriScheme)
    ) {
      if (!(await cauldron.hasFile({ cauldronFilePath: extra }))) {
        throw new Error(`Cannot find extra config file ${extra} in Cauldron`)
      }
      const extraFile = await cauldron.getFile({ cauldronFilePath: extra })
      extra = parseJsonFromStringOrFile(extraFile.toString())
    }
    await kax
      .task(
        `[${curIdx}/${pipeline.length}] Running Container ${pipelineEltType} ${pipelineEltPackage.basePath}`
      )
      .run(
        isPublisher(pipelineEltPackage)
          ? publishContainer({
              containerPath,
              containerVersion,
              extra,
              platform,
              publisher: PackagePath.fromString(pipelineElt.name),
              url: pipelineElt.url,
            })
          : transformContainer({
              containerPath,
              extra,
              platform,
              transformer: PackagePath.fromString(pipelineElt.name),
            })
      )
  }
}
github electrode-io / electrode-native / ern-orchestrator / src / runMiniApp.ts View on Github external
}
    extra = extra || {}
    extra.androidConfig = {
      ...(extra && extra.androidConfig),
      artifactId: oldAndroidRunner
        ? `runner-ern-container`
        : `runner-ern-container-${entryMiniAppName.toLowerCase()}`,
      groupId: 'com.walmartlabs.ern',
      packageFilePath: oldAndroidRunner
        ? 'com/walmartlabs/ern'
        : `com/walmartlabs/ern/${entryMiniAppName.toLowerCase()}`,
      packageName: oldAndroidRunner
        ? `com.walmartlabs.ern`
        : `com.walmartlabs.ern.${entryMiniAppName.toLowerCase()}`,
    }
    await publishContainer({
      containerPath: outDir,
      containerVersion: '1.0.0',
      extra: extra.androidConfig,
      platform: 'android',
      publisher: PackagePath.fromString('ern-container-publisher-maven'),
      url: getDefaultMavenLocalDirectory(),
    })
  }

  const compositeNativeDeps = await containerGenResult.config.composite.getNativeDependencies()
  const reactNativeDep = _.find(
    compositeNativeDeps.all,
    p => p.packagePath.basePath === 'react-native'
  )

  const hasErnNavigation =

ern-container-publisher

Electrode Native Container Publisher

Apache-2.0
Latest version published 3 months ago

Package Health Score

64 / 100
Full package analysis