1

I use npm to build in Jenkins and in Skaffold :


build:
  artifacts:
    - image: containerregistry-ssss.net/container-sandbox/my-docs
      docker : dockerFile
      kaniko:
        buildContext:
          localDir: {}

In docker : the following folders are never found as two different projects exist under packages monorepo and only one of them need it but it's never created.


# Copy application to container's /app folder
WORKDIR /app
COPY .next/standalone ./.next/standalone
COPY .next/static ./.next/static
COPY public ./public

changed docker file location and relative path of the .next folders.

Smart Coder
  • 1,435
  • 19
  • 19

1 Answers1

0

I had to add the 'context: packages/mydocs' in the skaffold.xml to point to mydocs folder. Also, npm ci and npm run build --workspace=mydocs command was added in jenkins. Changed the Kustomize folder location to point to mydocs folder.

Smart Coder
  • 1,435
  • 19
  • 19