Skip to content

Commit

Permalink
Merge pull request #373 from asifdxtreme/generateyaml
Browse files Browse the repository at this point in the history
Add Verify Job to check consistency between generate yaml and the yam…
  • Loading branch information
volcano-sh-bot authored Jul 23, 2019
2 parents c833efc + 8140cfa commit f9f1724
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 12 deletions.
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ jobs:
- go get -u golang.org/x/lint/golint
script:
- make verify
- stage: Verify Deployment Yaml
script:
- echo "Verifying contents of installer/development.yaml with generated yaml"
- make TAG=latest generate-yaml
- make verify-generated-yaml
- stage: UT Tests
before_script:
- go get github.com/mattn/goveralls
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,7 @@ verify: generate-code
hack/verify-gofmt.sh
hack/verify-golint.sh
hack/verify-gencode.sh

verify-generated-yaml:
./hack/check-generated-yaml.sh

33 changes: 33 additions & 0 deletions hack/check-generated-yaml.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/bash

# Copyright 2019 The Volcano Authors.

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at

# http://www.apache.org/licenses/LICENSE-2.0

# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -o errexit
set -o nounset
set -o pipefail

VK_ROOT=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/..
export RELEASE_FOLDER=${VK_ROOT}/${RELEASE_DIR}


if ! diff ${VK_ROOT}/installer/volcano-development.yaml ${RELEASE_FOLDER}/volcano-latest.yaml ; then
{
echo
echo "The Generated yaml is different from the one in installer/volcano-development.yaml"
echo "Suggest to sync both the files"
echo
} >&2
false
fi
25 changes: 13 additions & 12 deletions installer/volcano-development.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ data:
- name: predicates
- name: proportion
- name: nodeorder
---
apiVersion: v1
kind: ServiceAccount
Expand Down Expand Up @@ -134,13 +134,13 @@ spec:
app: volcano-scheduler
spec:
serviceAccount: volcano-scheduler

containers:
- name: volcano-scheduler
image: volcanosh/vc-scheduler:latest
args:
- --alsologtostderr
- --scheduler-conf=/volcano.scheduler/volcano-scheduler-ci.conf
- --scheduler-conf=/volcano.scheduler/volcano-scheduler.conf
- -v=3
- 2>&1
imagePullPolicy: "IfNotPresent"
Expand Down Expand Up @@ -223,7 +223,7 @@ spec:
app: volcano-admission
spec:
serviceAccount: volcano-admission

containers:
- args:
- --tls-cert-file=/admission.local.config/certificates/tls.crt
Expand Down Expand Up @@ -372,15 +372,15 @@ spec:
app: volcano-controller
spec:
serviceAccount: volcano-controllers

containers:
- name: volcano-controllers
image: volcanosh/vc-controllers:latest
args:
- --alsologtostderr
- -v=4
- 2>&1
imagePullPolicy: "IfNotPresent"
- name: volcano-controllers
image: volcanosh/vc-controllers:latest
args:
- --alsologtostderr
- -v=4
- 2>&1
imagePullPolicy: "IfNotPresent"

---
# Source: volcano/templates/batch_v1alpha1_job.yaml
Expand Down Expand Up @@ -800,3 +800,4 @@ spec:
type: object
type: object
version: v1alpha2

0 comments on commit f9f1724

Please sign in to comment.