How to use env-ci - 4 common examples

To help you get started, we’ve selected a few env-ci 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 apollographql / apollo-tooling / packages / apollo / src / commands / service / check.ts View on Github external
async run() {
    // @ts-ignore we're going to populate `taskOutput` later
    const taskOutput: TasksOutput = {};

    // Define this constant so we can throw it and compare against the same value.
    const breakingChangesErrorMessage = "breaking changes found";
    const federatedServiceCompositionUnsuccessfulErrorMessage =
      "Federated service composition was unsuccessful. Please see the reasons below.";

    const { isCi } = envCi();

    let schema: GraphQLSchema | undefined;
    let graphID: string | undefined;
    let graphVariant: string | undefined;
    try {
      await this.runTasks(
        ({ config, flags, project }) => {
          /**
           * Name of the graph being checked. `engine` is an example of a graph.
           *
           * A graph can be either a monolithic schema or the result of composition a federated schema.
           */
          graphID = config.name;
          graphVariant = flags.tag || config.tag || "current";

          /**
github intuit / auto / packages / core / src / auto.ts View on Github external
import Release, {
  getVersionMap,
  IAutoConfig,
  ILabelDefinition
} from './release';
import SEMVER, { calculateSemVerBump, IVersionLabels } from './semver';
import execPromise from './utils/exec-promise';
import loadPlugin, { IPlugin } from './utils/load-plugins';
import createLog, { ILogger } from './utils/logger';
import { makeHooks } from './utils/make-hooks';
import { IAuthorOptions, IRepoOptions } from './auto-args';
import { execSync } from 'child_process';
import { buildSearchQuery, ISearchResult } from './match-sha-to-pr';

const proxyUrl = process.env.https_proxy || process.env.http_proxy;
const env = envCi();

interface ChangelogLifecycle {
  /** The bump being applied to the version */
  bump: SEMVER;
  /** The commits included in the changelog */
  commits: IExtendedCommit[];
  /** The generated release notes for the commits */
  releaseNotes: string;
  /** The current version of the project */
  currentVersion: string;
  /** The last version of the project */
  lastRelease: string;
}

interface TestingToken {
  /** A token used for testing */
github apollographql / apollo-tooling / packages / apollo / src / commands / client / check.ts View on Github external
async run() {
    const { isCi } = envCi();

    const { validationResults, operations } = await this.runTasks<{
      operations: Operation[];
      validationResults: ValidationResult[];
    }>(
      ({ project, config }) => [
        {
          title: "Checking client compatibility with service",
          task: async ctx => {
            if (!config.name) {
              throw new Error(
                "No service found to link to Apollo Graph Manager. Graph Manager is required for this command."
              );
            }
            ctx.gitContext = await gitInfo(this.log);

env-ci

Get environment variables exposed by CI services

MIT
Latest version published 2 months ago

Package Health Score

92 / 100
Full package analysis

Popular env-ci functions