Openshift:构建永无止境

时间:2018-07-23 09:34:16

标签: openshift fabric8

我正面临一个问题。

我正在表演:

mvn -Dfabric8.namespace=t-devhub-dev \
  -Dfabric8.openshift.trimImageInContainerSpec=true \
  -Dmaven.test.skip=true \
  clean package fabric8:resource fabric8:build

此过程正在等待fabric8:build结束:

[INFO] --- fabric8-maven-plugin:3.5.38:build (default-cli) @ tdev-forum-service ---
[INFO] F8: Using OpenShift build with strategy Docker
[INFO] Copying files to /home/jcabre/projects/tdevhub/application-src/t-devhub/tdev-forum-service/target/docker/forum/0.0.1-SNAPSHOT/build/maven
[INFO] Building tar: /home/jcabre/projects/tdevhub/application-src/t-devhub/tdev-forum-service/target/docker/forum/0.0.1-SNAPSHOT/tmp/docker-build.tar
[INFO] F8: [forum:0.0.1-SNAPSHOT]: Created docker source tar /home/jcabre/projects/tdevhub/application-src/t-devhub/tdev-forum-service/target/docker/forum/0.0.1-SNAPSHOT/tmp/docker-build.tar
[INFO] F8: Updating BuildServiceConfig forum-s2i for Docker strategy
[INFO] F8: Adding to ImageStream forum
[INFO] F8: Starting Build forum-s2i

docker-build.tar实在太笨拙了:

├── Dockerfile
├── maven
│   └── tdev-forum-service-0.0.1-SNAPSHOT.jar
└── .s2i
    └── environment

其中Dockerfile是:

FROM docker.io/fabric8/java-jboss-openjdk8-jdk:1.2
ENV JAVA_APP_JAR=tdev-forum-service-0.0.1-SNAPSHOT.jar
COPY maven /deployments/

.s2i/environment

JAVA_APP_JAR=tdev-forum-service-0.0.1-SNAPSHOT.jar

此外,我尝试使用oc客户端:

cat docker-build.tar | oc start-build --from-dir=- --loglevel=10 forum-s2i --follow

它还可以处理:

I0723 12:17:06.770656    3403 loader.go:357] Config loaded from file /home/jcabre/.kube/config
Uploading archive file from STDIN as binary input for the build ...
round_trippers.go:417] curl -k -v -XPOST  -H "Accept: application/json, */*" -H "User-Agent: oc/v1.9.1+a0ce1bc657 (linux/amd64) kubernetes/a0ce1bc" -H "Authorization: Bearer cQFjgh_mjoAkbjYRhyz0sYCr8SaeauIpi4cjYL2UzDY" https://<cluster-url>/v1/namespaces/t-devhub-dev/buildconfigs/forum-s2i/instantiatebinary?name=forum-s2i&namespace=t-devhub-dev

有什么想法吗?

0 个答案:

没有答案