Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
5a0d01f6
Commit
5a0d01f6
authored
Nov 19, 2015
by
Karl Isenberg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add mesos/docker CI scripts
parent
742243bb
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
353 additions
and
0 deletions
+353
-0
build-release.sh
contrib/mesos/ci/build-release.sh
+38
-0
build.sh
contrib/mesos/ci/build.sh
+36
-0
run-with-cluster.sh
contrib/mesos/ci/run-with-cluster.sh
+85
-0
run.sh
contrib/mesos/ci/run.sh
+56
-0
test-e2e.sh
contrib/mesos/ci/test-e2e.sh
+35
-0
test-integration.sh
contrib/mesos/ci/test-integration.sh
+34
-0
test-smoke.sh
contrib/mesos/ci/test-smoke.sh
+35
-0
test-unit.sh
contrib/mesos/ci/test-unit.sh
+34
-0
No files found.
contrib/mesos/ci/build-release.sh
0 → 100755
View file @
5a0d01f6
#!/bin/bash
# Copyright 2015 The Kubernetes Authors All rights reserved.
#
# 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.
# Cleans output files/images and builds a full release from scratch
#
# Prerequisite:
# ./cluster/mesos/docker/test/build.sh
#
# Example Usage:
# ./contrib/mesos/ci/build-release.sh
set
-o
errexit
set
-o
nounset
set
-o
pipefail
set
-o
errtrace
KUBE_ROOT
=
$(
cd
"
$(
dirname
"
${
BASH_SOURCE
}
"
)
/../../.."
&&
pwd
)
"
${
KUBE_ROOT
}
/contrib/mesos/ci/run.sh"
make clean
export
KUBERNETES_CONTRIB
=
mesos
export
KUBE_RELEASE_RUN_TESTS
=
"
${
KUBE_RELEASE_RUN_TESTS
:-
N
}
"
export
KUBE_SKIP_CONFIRMATIONS
=
Y
"
${
KUBE_ROOT
}
/build/release.sh"
contrib/mesos/ci/build.sh
0 → 100755
View file @
5a0d01f6
#!/bin/bash
# Copyright 2015 The Kubernetes Authors All rights reserved.
#
# 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.
# Cleans output files/images and builds linux binaries from scratch
#
# Prerequisite:
# ./cluster/mesos/docker/test/build.sh
#
# Example Usage:
# ./contrib/mesos/ci/build.sh
set
-o
errexit
set
-o
nounset
set
-o
pipefail
set
-o
errtrace
TEST_ARGS
=
"
$@
"
KUBE_ROOT
=
$(
cd
"
$(
dirname
"
${
BASH_SOURCE
}
"
)
/../../.."
&&
pwd
)
export
KUBERNETES_CONTRIB
=
mesos
"
${
KUBE_ROOT
}
/contrib/mesos/ci/run.sh"
make clean all
${
TEST_ARGS
}
contrib/mesos/ci/run-with-cluster.sh
0 → 100755
View file @
5a0d01f6
#!/bin/bash
# Copyright 2015 The Kubernetes Authors All rights reserved.
#
# 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.
# Deploys a test cluster, runs the specified command, and destroys the test cluster.
# Runs all commands inside the mesosphere/kubernetes-mesos-test docker image (built on demand).
# Uses the mesos/docker cluster provider.
#
# Prerequisite:
# ./cluster/mesos/docker/test/build.sh
#
# Example Usage:
# ./contrib/mesos/ci/run-with-cluster.sh ./cluster/test-smoke.sh -v=2
set
-o
errexit
set
-o
nounset
set
-o
pipefail
set
-o
errtrace
RUN_CMD
=
"
$@
"
[
-z
"
${
RUN_CMD
:-}
"
]
&&
echo
"No command supplied"
&&
exit
1
KUBERNETES_PROVIDER
=
"mesos/docker"
MESOS_DOCKER_WORK_DIR
=
"
${
MESOS_DOCKER_WORK_DIR
:-${
HOME
}
/tmp/kubernetes
}
"
KUBE_ROOT
=
$(
cd
"
$(
dirname
"
${
BASH_SOURCE
}
"
)
/../../.."
&&
pwd
)
# Clean (test artifacts)
echo
"Cleaning work dir"
echo
"
${
MESOS_DOCKER_WORK_DIR
}
"
rm
-rf
"
${
MESOS_DOCKER_WORK_DIR
}
"
mkdir
-p
"
${
MESOS_DOCKER_WORK_DIR
}
"
echo
"Detecting docker client"
# Mount docker client binary to avoid client/compose/daemon version conflicts
if
[
-n
"
${
DOCKER_MACHINE_NAME
:-}
"
]
&&
which docker-machine
;
then
# On a Mac with docker-machine, use the binary in the VM, not the host binary
DOCKER_BIN_PATH
=
"
$(
docker-machine ssh
"
${
DOCKER_MACHINE_NAME
}
"
which docker
)
"
else
DOCKER_BIN_PATH
=
"
$(
which docker
)
"
fi
echo
"
${
DOCKER_BIN_PATH
}
"
# Clean (k8s output & images), Build, Kube-Up, Test, Kube-Down
cd
"
${
KUBE_ROOT
}
"
exec
docker run
\
--rm
\
-v
"
${
KUBE_ROOT
}
:/go/src/github.com/GoogleCloudPlatform/kubernetes"
\
-v
"/var/run/docker.sock:/var/run/docker.sock"
\
-v
"
${
DOCKER_BIN_PATH
}
:/usr/bin/docker"
\
-v
"
${
MESOS_DOCKER_WORK_DIR
}
/auth:
${
MESOS_DOCKER_WORK_DIR
}
/auth"
\
-v
"
${
MESOS_DOCKER_WORK_DIR
}
/log:
${
MESOS_DOCKER_WORK_DIR
}
/log"
\
-v
"
${
MESOS_DOCKER_WORK_DIR
}
/mesosslave1/mesos:
${
MESOS_DOCKER_WORK_DIR
}
/mesosslave1/mesos"
\
-v
"
${
MESOS_DOCKER_WORK_DIR
}
/mesosslave2/mesos:
${
MESOS_DOCKER_WORK_DIR
}
/mesosslave2/mesos"
\
-v
"
${
MESOS_DOCKER_WORK_DIR
}
/overlay:
${
MESOS_DOCKER_WORK_DIR
}
/overlay"
\
-v
"
${
MESOS_DOCKER_WORK_DIR
}
/reports:
${
MESOS_DOCKER_WORK_DIR
}
/reports"
\
-e
"MESOS_DOCKER_WORK_DIR=
${
MESOS_DOCKER_WORK_DIR
}
"
\
-e
"MESOS_DOCKER_IMAGE_DIR=/var/tmp/kubernetes"
\
-e
"MESOS_DOCKER_OVERLAY_DIR=
${
MESOS_DOCKER_WORK_DIR
}
/overlay"
\
-e
"KUBERNETES_CONTRIB=mesos"
\
-e
"KUBERNETES_PROVIDER=mesos/docker"
\
-e
"TERM=ansi"
\
-e
"USER=root"
\
-e
"E2E_REPORT_DIR=
${
MESOS_DOCKER_WORK_DIR
}
/reports"
\
mesosphere/kubernetes-mesos-test
\
-ceux
"
\
make clean all &&
\
trap 'timeout 5m ./cluster/kube-down.sh' EXIT &&
\
./cluster/kube-up.sh &&
\
trap 'test
\$
? != 0 && export MESOS_DOCKER_DUMP_LOGS=true; timeout 5m ./cluster/kube-down.sh' EXIT &&
\
${
RUN_CMD
}
"
contrib/mesos/ci/run.sh
0 → 100755
View file @
5a0d01f6
#!/bin/bash
# Copyright 2015 The Kubernetes Authors All rights reserved.
#
# 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.
# Runs the specified command in the test container (mesosphere/kubernetes-mesos-test).
#
# Prerequisite:
# ./cluster/mesos/docker/test/build.sh
#
# Example Usage:
# ./contrib/mesos/ci/run.sh make test
set
-o
errexit
set
-o
nounset
set
-o
pipefail
set
-o
errtrace
RUN_CMD
=
"
$@
"
[
-z
"
${
RUN_CMD
:-}
"
]
&&
echo
"No command supplied"
&&
exit
1
KUBE_ROOT
=
$(
cd
"
$(
dirname
"
${
BASH_SOURCE
}
"
)
/../../.."
&&
pwd
)
echo
"Detecting docker client"
# Mount docker client binary to avoid client/compose/daemon version conflicts
if
[
-n
"
${
DOCKER_MACHINE_NAME
:-}
"
]
&&
which docker-machine
;
then
# On a Mac with docker-machine, use the binary in the VM, not the host binary
DOCKER_BIN_PATH
=
"
$(
docker-machine ssh
"
${
DOCKER_MACHINE_NAME
}
"
which docker
)
"
else
DOCKER_BIN_PATH
=
"
$(
which docker
)
"
fi
echo
"
${
DOCKER_BIN_PATH
}
"
# Clean (k8s output & images) & Build
cd
"
${
KUBE_ROOT
}
"
exec
docker run
\
--rm
\
-v
"
${
KUBE_ROOT
}
:/go/src/github.com/GoogleCloudPlatform/kubernetes"
\
-v
"/var/run/docker.sock:/var/run/docker.sock"
\
-v
"
${
DOCKER_BIN_PATH
}
:/usr/bin/docker"
\
-e
"KUBERNETES_CONTRIB=mesos"
\
-e
"TERM=ansi"
\
-e
"USER=root"
\
mesosphere/kubernetes-mesos-test
\
-ceux
"
${
RUN_CMD
}
"
contrib/mesos/ci/test-e2e.sh
0 → 100755
View file @
5a0d01f6
#!/bin/bash
# Copyright 2015 The Kubernetes Authors All rights reserved.
#
# 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.
# Deploys a test cluster, runs the e2e tests, and destroys the test cluster.
#
# Prerequisite:
# ./cluster/mesos/docker/test/build.sh
#
# Example Usage:
# ./contrib/mesos/ci/test-e2e.sh -v=2
set
-o
errexit
set
-o
nounset
set
-o
pipefail
set
-o
errtrace
TEST_ARGS
=
"
$@
"
KUBE_ROOT
=
$(
cd
"
$(
dirname
"
${
BASH_SOURCE
}
"
)
/../../.."
&&
pwd
)
"
${
KUBE_ROOT
}
/contrib/mesos/ci/run-with-cluster.sh"
./cluster/test-e2e.sh
${
TEST_ARGS
}
\ No newline at end of file
contrib/mesos/ci/test-integration.sh
0 → 100755
View file @
5a0d01f6
#!/bin/bash
# Copyright 2015 The Kubernetes Authors All rights reserved.
#
# 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.
# Cleans & runs the integration tests in the test container (mesosphere/kubernetes-mesos-test).
#
# Prerequisite:
# ./cluster/mesos/docker/test/build.sh
#
# Example Usage:
# ./contrib/mesos/ci/test-integration.sh
set
-o
errexit
set
-o
nounset
set
-o
pipefail
set
-o
errtrace
TEST_ARGS
=
"
$@
"
KUBE_ROOT
=
$(
cd
"
$(
dirname
"
${
BASH_SOURCE
}
"
)
/../../.."
&&
pwd
)
"
${
KUBE_ROOT
}
/contrib/mesos/ci/run.sh"
make clean test_integration
${
TEST_ARGS
}
contrib/mesos/ci/test-smoke.sh
0 → 100755
View file @
5a0d01f6
#!/bin/bash
# Copyright 2015 The Kubernetes Authors All rights reserved.
#
# 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.
# Deploys a test cluster, runs the smoke tests, and destroys the test cluster.
#
# Prerequisite:
# ./cluster/mesos/docker/test/build.sh
#
# Example Usage:
# ./contrib/mesos/ci/test-smoke.sh -v=2
set
-o
errexit
set
-o
nounset
set
-o
pipefail
set
-o
errtrace
TEST_ARGS
=
"
$@
"
KUBE_ROOT
=
$(
cd
"
$(
dirname
"
${
BASH_SOURCE
}
"
)
/../../.."
&&
pwd
)
"
${
KUBE_ROOT
}
/contrib/mesos/ci/run-with-cluster.sh"
./cluster/test-smoke.sh
${
TEST_ARGS
}
\ No newline at end of file
contrib/mesos/ci/test-unit.sh
0 → 100755
View file @
5a0d01f6
#!/bin/bash
# Copyright 2015 The Kubernetes Authors All rights reserved.
#
# 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.
# Cleans & runs the unit tests in the test container (mesosphere/kubernetes-mesos-test).
#
# Prerequisite:
# ./cluster/mesos/docker/test/build.sh
#
# Example Usage:
# ./contrib/mesos/ci/test-unit.sh
set
-o
errexit
set
-o
nounset
set
-o
pipefail
set
-o
errtrace
TEST_ARGS
=
"
$@
"
KUBE_ROOT
=
$(
cd
"
$(
dirname
"
${
BASH_SOURCE
}
"
)
/../../.."
&&
pwd
)
"
${
KUBE_ROOT
}
/contrib/mesos/ci/run.sh"
make clean
test
${
TEST_ARGS
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment