Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jakeyheath opened this issue May 6, 2022 · 0 comments
Open

Comments

@jakeyheath
Copy link
Contributor

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").

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant