Skip to content

Commit

Permalink
Fix Windows image entrypoint paths for parity with Linux
Browse files Browse the repository at this point in the history
Tekton expects to find the entrypoint binary in '/ko-app/entrypoint'
which is equivalent to 'C:\ko-app\entrypoint' on Windows. See
'pkg/pod/entrypoint.go:orderContainers()'. Currently entrypoint is
stored in 'C:\ProgramData\tektoncd\pipeline\entrypoint.exe' causing
this to break on Windows. To avoid the need for platform-specific
logic in the controller, and for parity with Linux, this change
updates 'entrypoint' and 'nop' images for Windows to store binaries
in 'C:\ko-app\'.
  • Loading branch information
aiden-deloryn authored and tekton-robot committed Jun 10, 2021
1 parent 4307afc commit ff0fbc8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions images/windows/entrypoint/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ COPY . c:/gopath/src/github.com/tektoncd/pipeline

WORKDIR c:/gopath/src/github.com/tektoncd/pipeline

RUN go build -o c:/gopath/bin/entrypoint.exe ./cmd/entrypoint
RUN go build -o c:/gopath/bin/entrypoint ./cmd/entrypoint

FROM ${BASE_IMAGE}

COPY --from=builder c:/gopath/bin/entrypoint.exe c:/ProgramData/tektoncd/pipeline/entrypoint.exe
COPY --from=builder c:/gopath/bin/entrypoint c:/ko-app/entrypoint

# Copy kodata into the image
# NOTE: The COPY instruction does not follow symbolic links
Expand All @@ -20,4 +20,4 @@ COPY ./.git/refs c:/ProgramData/tektoncd/pipeline/data/refs/

COPY ./third_party c:/ProgramData/tektoncd/pipeline/data/third-party/

ENTRYPOINT ["c:/ProgramData/tektoncd/pipeline/entrypoint.exe"]
ENTRYPOINT ["c:/ko-app/entrypoint"]
6 changes: 3 additions & 3 deletions images/windows/nop/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ COPY . c:/gopath/src/github.com/tektoncd/pipeline

WORKDIR c:/gopath/src/github.com/tektoncd/pipeline

RUN go build -o c:/gopath/bin/nop.exe ./cmd/nop
RUN go build -o c:/gopath/bin/nop ./cmd/nop

FROM ${BASE_IMAGE}

COPY --from=builder c:/gopath/bin/nop.exe c:/ProgramData/tektoncd/pipeline/nop.exe
COPY --from=builder c:/gopath/bin/nop c:/ko-app/nop

# Copy kodata into the image
# NOTE: The COPY instruction does not follow symbolic links
Expand All @@ -20,4 +20,4 @@ COPY ./.git/refs c:/ProgramData/tektoncd/pipeline/data/refs/

COPY ./third_party c:/ProgramData/tektoncd/pipeline/data/third-party/

ENTRYPOINT ["c:/ProgramData/tektoncd/pipeline/nop.exe"]
ENTRYPOINT ["c:/ko-app/nop"]

0 comments on commit ff0fbc8

Please sign in to comment.