Skip to content
This repository has been archived by the owner on Jul 16, 2024. It is now read-only.

Commit

Permalink
Merge pull request #162 from justinsb/add_etcd_manager
Browse files Browse the repository at this point in the history
Add etcd-manager under etcd-manager/ subdirectory
  • Loading branch information
k8s-ci-robot committed Sep 4, 2020
2 parents faa3b92 + 2591372 commit 1138060
Show file tree
Hide file tree
Showing 2,644 changed files with 994,749 additions and 0 deletions.
1 change: 1 addition & 0 deletions etcd-manager/.bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build --workspace_status_command=./tools/get_workspace_status.sh
1 change: 1 addition & 0 deletions etcd-manager/.bazelversion
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.2.0
5 changes: 5 additions & 0 deletions etcd-manager/.gcloudignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.git

bazel-*

#!include:.gitignore
50 changes: 50 additions & 0 deletions etcd-manager/.github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# This is a basic workflow to help you get started with Actions

name: Bazel

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

- name: Install bazelisk
run: |
curl -LO "https://github.com/bazelbuild/bazelisk/releases/download/v1.4.0/bazelisk-linux-amd64"
mkdir -p "${GITHUB_WORKSPACE}/bin/"
mv bazelisk-linux-amd64 "${GITHUB_WORKSPACE}/bin/bazelisk"
chmod +x "${GITHUB_WORKSPACE}/bin/bazelisk"
- name: Build
run: |
"${GITHUB_WORKSPACE}/bin/bazelisk" build //...
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Install bazelisk
run: |
curl -LO "https://github.com/bazelbuild/bazelisk/releases/download/v1.4.0/bazelisk-linux-amd64"
mkdir -p "${GITHUB_WORKSPACE}/bin/"
mv bazelisk-linux-amd64 "${GITHUB_WORKSPACE}/bin/bazelisk"
chmod +x "${GITHUB_WORKSPACE}/bin/bazelisk"
- name: Test
run: |
"${GITHUB_WORKSPACE}/bin/bazelisk" test //... --test_output=streamed
19 changes: 19 additions & 0 deletions etcd-manager/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Common IDEs
.idea/
*.iml
.vscode/
*~

# Bazel stuff
bazel-bin
bazel-etcd-manager
bazel-genfiles
bazel-out
bazel-testlogs

# We often create some local symlinks
/etcd-manager
/etcd-manager-ctl

# Release assets
dist/
15 changes: 15 additions & 0 deletions etcd-manager/.shipbot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
owner: kopeio
repo: etcd-manager
assets:
- source: dist/etcd-manager-ctl-windows-amd64
githubName: etcd-manager-ctl-windows-amd64
- source: dist/etcd-manager-ctl-windows-amd64-sha-256
githubName: etcd-manager-ctl-windows-amd64-sha256
- source: dist/etcd-manager-ctl-darwin-amd64
githubName: etcd-manager-ctl-darwin-amd64
- source: dist/etcd-manager-ctl-darwin-amd64-sha-256
githubName: etcd-manager-ctl-darwin-amd64-sha256
- source: dist/etcd-manager-ctl-linux-amd64
githubName: etcd-manager-ctl-linux-amd64
- source: dist/etcd-manager-ctl-linux-amd64-sha-256
githubName: etcd-manager-ctl-linux-amd64-sha256
41 changes: 41 additions & 0 deletions etcd-manager/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
dist: trusty
sudo: required
#osx_image: xcode8
language: java

os:
- linux
# - osx

env:
- BAZEL_VERSION=1.2.1
- BAZEL_VERSION=2.2.0

before_install:
- pwd
- OS=linux
- ARCH=x86_64
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then OS=darwin; fi
- GH_BASE="https://github.com/bazelbuild/bazel/releases/download/$BAZEL_VERSION"
- GH_ARTIFACT="bazel-$BAZEL_VERSION-installer-$OS-$ARCH.sh"
- CI_BASE="http://ci.bazel.io/job/Bazel/JAVA_VERSION=1.8,PLATFORM_NAME=$OS-$ARCH/lastSuccessfulBuild/artifact/output/ci"
- CI_ARTIFACT="bazel--installer.sh"
- URL="$GH_BASE/$GH_ARTIFACT"
- if [[ "$BAZEL_VERSION" == "HEAD" ]]; then CI_ARTIFACT="`wget -qO- $CI_BASE | grep -o 'bazel-[-_a-zA-Z0-9\.]*-installer.sh' | uniq`"; fi
- if [[ "$BAZEL_VERSION" == "HEAD" ]]; then URL="$CI_BASE/$CI_ARTIFACT"; fi
- echo $URL
- wget -O install.sh $URL
- chmod +x install.sh
- ./install.sh --user
- rm -f install.sh

script:
- cd ${TRAVIS_BUILD_DIR}
- bazel build //cmd/...
# Tests log too much output for travis
#- bazel test //test/... --test_output=streamed --local_test_jobs=1
- bazel test //... --test_output=errors --local_test_jobs=1

notifications:
email: false

96 changes: 96 additions & 0 deletions etcd-manager/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
load("@bazel_gazelle//:def.bzl", "gazelle")

# gazelle:proto disable_global
gazelle(
name = "gazelle",
external = "vendored",
prefix = "sigs.k8s.io/etcdadm/etcd-manager",
)

[genrule(
name = "etcd-v2.2.1-linux-amd64_%s" % c,
srcs = ["@etcd_2_2_1_tar//file"],
outs = ["etcd-v2.2.1-linux-amd64/%s" % c],
cmd = "tar -x -z --no-same-owner -f ./$(location @etcd_2_2_1_tar//file) etcd-v2.2.1-linux-amd64/%s && mv etcd-v2.2.1-linux-amd64/%s \"$@\"" % (c, c),
visibility = ["//visibility:public"],
) for c in [
"etcd",
"etcdctl",
]]

[genrule(
name = "etcd-v3.1.12-linux-amd64_%s" % c,
srcs = ["@etcd_3_1_12_tar//file"],
outs = ["etcd-v3.1.12-linux-amd64/%s" % c],
cmd = "tar -x -z --no-same-owner -f ./$(location @etcd_3_1_12_tar//file) etcd-v3.1.12-linux-amd64/%s && mv etcd-v3.1.12-linux-amd64/%s \"$@\"" % (c, c),
visibility = ["//visibility:public"],
) for c in [
"etcd",
"etcdctl",
]]

[genrule(
name = "etcd-v3.2.18-linux-amd64_%s" % c,
srcs = ["@etcd_3_2_18_tar//file"],
outs = ["etcd-v3.2.18-linux-amd64/%s" % c],
cmd = "tar -x -z --no-same-owner -f ./$(location @etcd_3_2_18_tar//file) etcd-v3.2.18-linux-amd64/%s && mv etcd-v3.2.18-linux-amd64/%s \"$@\"" % (c, c),
visibility = ["//visibility:public"],
) for c in [
"etcd",
"etcdctl",
]]

[genrule(
name = "etcd-v3.2.24-linux-amd64_%s" % c,
srcs = ["@etcd_3_2_24_tar//file"],
outs = ["etcd-v3.2.24-linux-amd64/%s" % c],
cmd = "tar -x -z --no-same-owner -f ./$(location @etcd_3_2_24_tar//file) etcd-v3.2.24-linux-amd64/%s && mv etcd-v3.2.24-linux-amd64/%s \"$@\"" % (c, c),
visibility = ["//visibility:public"],
) for c in [
"etcd",
"etcdctl",
]]

[genrule(
name = "etcd-v3.3.10-linux-amd64_%s" % c,
srcs = ["@etcd_3_3_10_tar//file"],
outs = ["etcd-v3.3.10-linux-amd64/%s" % c],
cmd = "tar -x -z --no-same-owner -f ./$(location @etcd_3_3_10_tar//file) etcd-v3.3.10-linux-amd64/%s && mv etcd-v3.3.10-linux-amd64/%s \"$@\"" % (c, c),
visibility = ["//visibility:public"],
) for c in [
"etcd",
"etcdctl",
]]

[genrule(
name = "etcd-v3.3.13-linux-amd64_%s" % c,
srcs = ["@etcd_3_3_13_tar//file"],
outs = ["etcd-v3.3.13-linux-amd64/%s" % c],
cmd = "tar -x -z --no-same-owner -f ./$(location @etcd_3_3_13_tar//file) etcd-v3.3.13-linux-amd64/%s && mv etcd-v3.3.13-linux-amd64/%s \"$@\"" % (c, c),
visibility = ["//visibility:public"],
) for c in [
"etcd",
"etcdctl",
]]

[genrule(
name = "etcd-v3.3.17-linux-amd64_%s" % c,
srcs = ["@etcd_3_3_17_tar//file"],
outs = ["etcd-v3.3.17-linux-amd64/%s" % c],
cmd = "tar -x -z --no-same-owner -f ./$(location @etcd_3_3_17_tar//file) etcd-v3.3.17-linux-amd64/%s && mv etcd-v3.3.17-linux-amd64/%s \"$@\"" % (c, c),
visibility = ["//visibility:public"],
) for c in [
"etcd",
"etcdctl",
]]

[genrule(
name = "etcd-v3.4.3-linux-amd64_%s" % c,
srcs = ["@etcd_3_4_3_tar//file"],
outs = ["etcd-v3.4.3-linux-amd64/%s" % c],
cmd = "tar -x -z --no-same-owner -f ./$(location @etcd_3_4_3_tar//file) etcd-v3.4.3-linux-amd64/%s && mv etcd-v3.4.3-linux-amd64/%s \"$@\"" % (c, c),
visibility = ["//visibility:public"],
) for c in [
"etcd",
"etcdctl",
]]
Loading

0 comments on commit 1138060

Please sign in to comment.