Skip to content

fix: I don't understand which images happy chooses to push/build #279

@jakeyheath

Description

@jakeyheath

Here is an example workflow for pushing to staging https://github.com/chanzuckerberg/eng-portal/runs/6327429188?check_suite_focus=true. Specifically this line. When happy does a build and push, it uses this command:

/usr/bin/docker compose --file /home/runner/work/eng-portal/eng-portal/docker-compose.yml --profile * build

Looking at my docker-compose file, this means it should build two images: eng-portal-local-dev and eng-portal:

version: "3.8"

services:
  eng-portal-local-dev:
    build:
      context: .
      target: devenv
    restart: always
    ports:
      - 3000:3000
      - 7007:7007
    volumes:
      - ./backstage:/app/backstage
      - /app/backstage/node_modules/
      - /app/backstage/packages/app/node_modules/
      - /app/backstage/packages/backend/node_modules/
    profiles:
      - local-dev
    depends_on:
      - db
    environment:
      - AWS_PROFILE=czi-si-readonly 
      - CHAMBER_SERVICE=happy-ldev-ep
      - AWS_DEFAULT_REGION
      - AWS_DEFAULT_OUTPUT
      - AWS_ACCESS_KEY_ID
      - AWS_SECRET_ACCESS_KEY
      - AWS_SESSION_TOKEN
  db:
    image: postgres
    profiles:
      - local-dev
      - prod-builder
    restart: always
    ports:
      - 5432:5432
    environment:
      - POSTGRES_USER
      - POSTGRES_PASSWORD
  eng-portal:
      build:
        context: .
        target: prodenv
      restart: always
      profiles:
        - prod-builder
      depends_on:
        - db
      ports:
      - 7007:7007
      environment:
        - AWS_PROFILE=czi-si-readonly 
        - CHAMBER_SERVICE=happy-ldev-ep
        - AWS_DEFAULT_REGION
        - AWS_DEFAULT_OUTPUT
        - AWS_ACCESS_KEY_ID
        - AWS_SECRET_ACCESS_KEY
        - AWS_SESSION_TOKEN

And when it pushes, I would expect only the eng-portal service image to make it into ECR. However, looking at this workflow logs, it only builds the eng-portal-local-dev container and pushes that to ECR. Does anyone know why eng-portal-local-dev is making it into ECR? Based on #238 it should only push images that have the same name as the ones defined in the happy environment (in this case "eng-portal").

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions