Skip to content

Commit db21c90

Browse files
authored
Deploy with yaml (sourcegraph#58)
1 parent f20468b commit db21c90

File tree

711 files changed

+2548
-23826
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

711 files changed

+2548
-23826
lines changed

.buildkite/install-helm.sh

Lines changed: 0 additions & 10 deletions
This file was deleted.

.buildkite/install-yj.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
3+
VERSION=1.0.0
4+
5+
if [ ! $(which yj) ]; then
6+
echo "Installing yj to /usr/local/bin"
7+
wget https://github.com/sourcegraph/yj/releases/download/v${VERSION}/yj-${VERSION}-linux-amd64 -O /usr/local/bin/yj
8+
chmod a+x /usr/local/bin/yj
9+
fi

.buildkite/pipeline.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
steps:
2-
- label: ":helm:"
3-
command: .buildkite/verify-generated.sh
42
- label: ":k8s:"
5-
command: .buildkite/verify-valid.sh
3+
command: .buildkite/verify-yaml.sh
4+
- label: ":k8s:"
5+
command: .buildkite/verify-label.sh

.buildkite/verify-generated.sh

Lines changed: 0 additions & 25 deletions
This file was deleted.

.buildkite/verify-label.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
set -ex
4+
5+
cd "$(dirname "${BASH_SOURCE[0]}")/.."
6+
7+
.buildkite/install-yj.sh
8+
9+
if find base -name "*.yaml" -exec sh -c "cat {} | yj | jq --raw-output '.metadata.labels.deploy'" \; | tee /tmp/deploy-label | grep -v sourcegraph; then
10+
echo "> There exists a yaml file in base/ that does not contain .metadata.labels.deploy == sourcegraph"
11+
echo "> Run the following command to fix:"
12+
echo "find base/ -name \"*.yaml\" -exec sh -c \"cat {} | yj | jq '.metadata.labels.deploy = \\\"sourcegraph\\\"' | jy -o {}\" \;"
13+
14+
exit 1
15+
fi

.buildkite/verify-valid.sh

Lines changed: 0 additions & 11 deletions
This file was deleted.

.buildkite/verify-yaml.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
3+
set -ex
4+
cd "$(dirname "${BASH_SOURCE[0]}")/.."
5+
6+
.buildkite/install-kubeval.sh
7+
8+
find base -name '*.yaml' -exec kubeval {} +
9+
find configure -name '*.yaml' -exec kubeval {} +
10+
11+
.buildkite/verify-label.sh

.gitattributes

Lines changed: 0 additions & 2 deletions
This file was deleted.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
generated/
2+

.helmignore

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)