Environment variable not being updated or read

I am facing two related issues.

  1. The existing environment variable in the global context, when updated, is not reflected in the machine when I run the job. I tried to restart the machine and it still didn’t work.
  2. I tried adding a new environment variable in the same context and it is still not being reflected in the machine.
    My CI is broken. Please help!!
version: 2.1
jobs:
  build:
    machine:
      image: ubuntu-1604:201903-01
      docker_layer_caching: true
    steps:
      - checkout
      - restore_cache:
          keys:
            - v1-dependencies-{{ checksum "package-lock.json" }}
            - v1-dependencies-
      - run:
          command: npm install
      - save_cache:
          paths:
            - node_modules
          key: v1-dependencies-{{ checksum "package-lock.json" }}
      - run:
          command: |
            docker-compose -f docker-compose-unittest.yaml up --build --exit-code-from e2e
      - run:
          name: 'Build production image'
          command: |
            docker build --target prod -t frontend --build-arg NPM_TOKEN=${NPM_TOKEN} .
      - run:
          name: Push to Docker
          command: |
            echo "$DOCKERHUB_PASSWORD_2" | docker login -u $DOCKERHUB_USERNAME --password-stdin
            IMAGE_NAME=kollate/frontend:${CIRCLE_BRANCH}-${CIRCLE_BUILD_NUM}
            docker tag frontend $IMAGE_NAME
            docker push $IMAGE_NAME
workflows:
  version: 2
  build_and_test:
    jobs:
      - build:
          context: kollate-global

Any suggestion guys? I’m stuck!!

Moving to Jenkins!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.