我无法解决初学者教程中遇到的问题。当我尝试从Jenkins在Kubernetes上创建部署时,收到错误消息。
根据我的研究,Jackson 2 API v2.10.0,Kubernetes v1.21.3,Kubernetes Client API v4.6.3-1,Kubernetes Continuous Deploy v2.1.2, 而且我需要使用Kubernetes Credentials v0.5.0插件。我不知道该怎么办?
如何解决此问题?有人可以帮助我吗?
错误
From mathcomp Require Import all_ssreflect.
Set Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.
Section some_context.
Definition byte := nat.
Variables x00 x01 : byte.
Lemma Dan_problem : (forall (a_len b_len : nat)
(a b : seq byte)
(H : Datatypes.length a = a_len /\
Datatypes.length b = b_len /\
List.nth_error a 0 = Some x00 /\
(forall i : nat,
is_true (0 < i) /\ is_true (i < a_len - b_len - 1) ->
List.nth_error a i = Some x01) /\
List.nth_error a (a_len - b_len - 1) = Some x00 /\
(forall j : nat,
is_true (0 <= j) /\ is_true (j < b_len) ->
List.nth_error a (a_len - b_len + j) = List.nth_error b j)),
a = [:: x00] ++ List.repeat x01 (a_len - b_len - 2) ++ [:: x00] ++ b) ->
False.
Proof.
intros abs.
assert (cnd1 : forall i, 0 < i /\ i < 1 - 0 -1 ->
List.nth_error [:: x00] i = Some x01).
by move=> i [igt0 ilt0].
assert (cnd2 : forall j : nat,
0 <= j /\ j < 0 ->
List.nth_error [:: x00] (1 - 0 + j) = List.nth_error [::] j).
by move=> j [jge0 glt0].
generalize (abs 1 0 (x00::nil) nil (conj erefl
(conj erefl (conj erefl (conj cnd1 (conj erefl cnd2)))))).
by rewrite /=.
Qed.
我的管道
Starting Kubernetes deployment
Loading configuration: /var/lib/jenkins/workspace/k8sdeploy/k8sdeploy.yml
ERROR: ERROR: Can't construct a java object for tag:yaml.org,2002:io.kubernetes.client.openapi.models.V1Deployment; exception=Class not found: io.kubernetes.client.openapi.models.V1Deployment
in 'reader', line 1, column 1:
apiVersion: apps/v1
^
hudson.remoting.ProxyException: Can't construct a java object for tag:yaml.org,2002:io.kubernetes.client.openapi.models.V1Deployment; exception=Class not found: io.kubernetes.client.openapi.models.V1Deployment
in 'reader', line 1, column 1:
apiVersion: apps/v1
^
我来自Github的部署Yaml(已测试-在Kuberentes上工作)
pipeline {
agent any
stages {
stage('Clone App from Github') {
steps {
git credentialsId: 'github', url: 'https://github.com/eneslanpir/k8sdeploy'
}
}
stage("Wait For 5 Seconds"){
steps {
sleep 5
}
}
stage("Kubernetes Create Deployment"){
steps{
script {
kubernetesDeploy(configs: "k8sdeploy.yml", kubeconfigId: "kubeconfig")
}
}
}
}
}
降级到Jackson 2 API v2.10.0时,一切都出错了。