Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions Dockerfile-argocd
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,15 @@ ARG MAKE_TARGET
WORKDIR /root/go/src/github.com/argoproj/argo-cd
COPY . .
RUN make ${MAKE_TARGET}
RUN rm -rf /root/go/src/github.com/ksonnet/ksonnet && \
go get -u github.com/ksonnet/ksonnet
RUN wget https://github.com/ksonnet/ksonnet/releases/download/v0.9.1/ks_0.9.1_linux_amd64.tar.gz && tar -C /tmp/ -xf ks_0.9.1_linux_amd64.tar.gz

FROM debian:9.3
RUN apt-get update && apt-get install -y git && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ARG BINARY
COPY --from=builder /root/go/src/github.com/argoproj/argo-cd/dist/${BINARY} /${BINARY}
COPY --from=builder /root/go/bin/ksonnet /usr/local/bin/ks
COPY --from=builder /tmp/ks_0.9.1_linux_amd64/ks /usr/local/bin/ks
# workaround ksonnet issue https://github.com/ksonnet/ksonnet/issues/298
ENV USER=root
ENV BINARY=$BINARY
Expand Down
5 changes: 3 additions & 2 deletions reposerver/repository/repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,11 @@ func (s *Service) createTempRepo(appRepoPath string, appPath string, sourceEnv s
if err != nil {
return "", err
}
_, err = exec.Command("cp", "-r", appRepoPath+"/", tmpRepoPath).Output()
_, err = exec.Command("cp", "-r", appRepoPath, tmpRepoPath).Output()
if err != nil {
return "", err
}
tmpRepoPath = path.Join(tmpRepoPath, path.Base(appRepoPath))
for file, content := range files {
err = ioutil.WriteFile(path.Join(tmpRepoPath, appPath, "environments", sourceEnv, file), []byte(content), 0644)
if err != nil {
Expand Down Expand Up @@ -84,7 +85,7 @@ func (s *Service) GenerateManifest(c context.Context, q *ManifestRequest) (*Mani
}
ksApp, err := ksutil.NewKsonnetApp(appPath)
if err != nil {
return nil, err
return nil, fmt.Errorf("unable to load application from %s: %v", appPath, err)
}
appSpec := ksApp.App()
env, err := appSpec.Environment(q.Environment)
Expand Down