Skip to content

Commit

Permalink
Merge upstream master
Browse files Browse the repository at this point in the history
Signed-off-by: Aylei <[email protected]>
  • Loading branch information
aylei committed Nov 25, 2019
2 parents d109f36 + e7f3144 commit 9d3df34
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 6 deletions.
4 changes: 2 additions & 2 deletions ci/pingcap_tidb_operator_build_kind.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def call(BUILD_BRANCH, CREDENTIALS_ID, CODECOV_CREDENTIALS_ID) {
}
}

if ( BUILD_BRANCH !=~ /[a-z0-9]{40}/) {
if ( !(BUILD_BRANCH ==~ /[a-z0-9]{40}/) ) {
stage('upload tidb-operator binary and charts'){
//upload binary and charts
sh """
Expand Down Expand Up @@ -177,7 +177,7 @@ def call(BUILD_BRANCH, CREDENTIALS_ID, CODECOV_CREDENTIALS_ID) {
return
}

if ( BUILD_BRANCH !=~ /[a-z0-9]{40}/ ){
if ( !(BUILD_BRANCH ==~ /[a-z0-9]{40}/) ){
slackmsg = "${slackmsg}" + "\n" +
"Binary Download URL:" + "\n" +
"${UCLOUD_OSS_URL}/builds/pingcap/operator/${GITHASH}/centos7/tidb-operator.tar.gz"
Expand Down
31 changes: 27 additions & 4 deletions tests/actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -1320,7 +1320,15 @@ func (oa *operatorActions) pdMembersReadyFn(tc *v1alpha1.TidbCluster) (bool, err
ns, pdSetName, pdSet.Status.ReadyReplicas, pdSet.Status.Replicas)
return false, nil
}
if c, ok := getMemberContainer(oa.kubeCli, ns, pdSetName); !ok || tc.BasePDSpec().Image() != c.Image {

c, found := getMemberContainer(oa.kubeCli, ns, pdSetName)
if !found {
glog.Infof("statefulset: %s/%s not found containers[name=pd] or pod %s-0",
ns, pdSetName, pdSetName)
return false, nil
}

if tc.Spec.PD.Image != c.Image {
glog.Infof("statefulset: %s/%s .spec.template.spec.containers[name=pd].image(%s) != %s",
ns, pdSetName, c.Image, tc.BasePDSpec().Image())
return false, nil
Expand Down Expand Up @@ -1385,7 +1393,15 @@ func (oa *operatorActions) tikvMembersReadyFn(tc *v1alpha1.TidbCluster) (bool, e
ns, tikvSetName, tikvSet.Status.ReadyReplicas, tikvSet.Status.Replicas)
return false, nil
}
if c, ok := getMemberContainer(oa.kubeCli, ns, tikvSetName); !ok || tc.BaseTiKVSpec().Image() != c.Image {

c, found := getMemberContainer(oa.kubeCli, ns, tikvSetName)
if !found {
glog.Infof("statefulset: %s/%s not found containers[name=tikv] or pod %s-0",
ns, tikvSetName, tikvSetName)
return false, nil
}

if tc.Spec.TiKV.Image != c.Image {
glog.Infof("statefulset: %s/%s .spec.template.spec.containers[name=tikv].image(%s) != %s",
ns, tikvSetName, c.Image, tc.BaseTiKVSpec().Image())
return false, nil
Expand Down Expand Up @@ -1445,7 +1461,14 @@ func (oa *operatorActions) tidbMembersReadyFn(tc *v1alpha1.TidbCluster) (bool, e
return false, nil
}

if c, ok := getMemberContainer(oa.kubeCli, ns, tidbSetName); !ok || tc.BaseTiDBSpec().Image() != c.Image {
c, found := getMemberContainer(oa.kubeCli, ns, tidbSetName)
if !found {
glog.Infof("statefulset: %s/%s not found containers[name=tidb] or pod %s-0",
ns, tidbSetName, tidbSetName)
return false, nil
}

if tc.Spec.TiDB.Image != c.Image {
glog.Infof("statefulset: %s/%s .spec.template.spec.containers[name=tidb].image(%s) != %s",
ns, tidbSetName, c.Image, tc.BaseTiDBSpec().Image())
return false, nil
Expand Down Expand Up @@ -1821,7 +1844,7 @@ func (oa *operatorActions) getComponentPVList(tc *v1alpha1.TidbCluster, componen

listOptions := metav1.ListOptions{
LabelSelector: labels.SelectorFromSet(
label.New().Instance(tcName).Component(component).Labels()).String(),
label.New().Instance(tcName).Component(component).Namespace(ns).Labels()).String(),
}

pvList, err := oa.kubeCli.CoreV1().PersistentVolumes().List(listOptions)
Expand Down

0 comments on commit 9d3df34

Please sign in to comment.