Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to GitHub workflows for CI #437

Merged
merged 54 commits into from
Jan 28, 2020
Merged
Show file tree
Hide file tree
Changes from 47 commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
b81efc8
Create ci.yml
ruben-baez-seagull-com Jan 14, 2020
2ea4312
Change Workflow name
ruben-baez-seagull-com Jan 14, 2020
246e304
rename some labels
ruben-baez-seagull-com Jan 15, 2020
ce03841
change env var && add pipefail
ruben-baez-seagull-com Jan 16, 2020
165d5d3
Update ci.yml
ruben-baez-seagull-com Jan 16, 2020
651ea55
Update ci.yml
ruben-baez-seagull-com Jan 16, 2020
6af4c75
print env vars
ruben-baez-seagull-com Jan 16, 2020
64e7042
update GITHUB_REF env var
ruben-baez-seagull-com Jan 16, 2020
f390fba
Update ci.yml
ruben-baez-seagull-com Jan 16, 2020
6223e49
Update ci.yml
ruben-baez-seagull-com Jan 16, 2020
7c96026
remove echo & add bash shell
ruben-baez-seagull-com Jan 16, 2020
2db5599
test pipe with pipefail
ruben-baez-seagull-com Jan 16, 2020
9a137b8
remove pipefail in last stage
ruben-baez-seagull-com Jan 16, 2020
7e4f3cb
add set -u to last stage
ruben-baez-seagull-com Jan 17, 2020
19f108e
add set -euo pipefail in all scripts
ruben-baez-seagull-com Jan 18, 2020
1a1746d
delete an empty line
ruben-baez-seagull-com Jan 18, 2020
24c7117
verify if home/bin exist
ruben-baez-seagull-com Jan 18, 2020
ca4c545
add GOBIN env var
ruben-baez-seagull-com Jan 18, 2020
4d7b1a3
change GOBIN position
ruben-baez-seagull-com Jan 18, 2020
b0348e1
add .krew to PATH
ruben-baez-seagull-com Jan 18, 2020
e822b89
make GOBIN global
ruben-baez-seagull-com Jan 18, 2020
4ce6bff
add new stage to download validate-krew-manifest
ruben-baez-seagull-com Jan 18, 2020
15bf817
fix run command
ruben-baez-seagull-com Jan 18, 2020
641263f
change way to set GOBIN
ruben-baez-seagull-com Jan 18, 2020
d530a2e
remove ls command
ruben-baez-seagull-com Jan 18, 2020
713462a
Update ci.yml
ruben-baez-seagull-com Jan 18, 2020
5d93a5b
Update ci.yml
ruben-baez-seagull-com Jan 18, 2020
b1ce998
add GOBIN in last stage
ruben-baez-seagull-com Jan 18, 2020
b38ddbb
add new PATH
ruben-baez-seagull-com Jan 18, 2020
b418e77
Update ci.yml
ruben-baez-seagull-com Jan 18, 2020
dc7c215
delete validate-krew-manifest step
ruben-baez-seagull-com Jan 18, 2020
472d555
check GOBIN content
ruben-baez-seagull-com Jan 18, 2020
a6c6d01
clean pipeline
ruben-baez-seagull-com Jan 18, 2020
f406ac9
add empty line
ruben-baez-seagull-com Jan 18, 2020
5c8e4e6
check home/bin content
ruben-baez-seagull-com Jan 18, 2020
f35bf8f
add kubectl krew to path
ruben-baez-seagull-com Jan 19, 2020
cbdcf26
delete an empty line
ruben-baez-seagull-com Jan 19, 2020
db45a84
try with other PATH
ruben-baez-seagull-com Jan 19, 2020
b50c479
fix identation
ruben-baez-seagull-com Jan 19, 2020
71cd1c4
delete an empty line
ruben-baez-seagull-com Jan 19, 2020
281f135
add echo to find the error
ruben-baez-seagull-com Jan 19, 2020
8dcf1d0
remove empty line
ruben-baez-seagull-com Jan 19, 2020
5b69c61
Merge branch 'add-github-workflow' of github.com:alonyb/krew-index in…
ruben-baez-seagull-com Jan 19, 2020
0559e0d
add empty line
ruben-baez-seagull-com Jan 19, 2020
6206ea7
more prints
ruben-baez-seagull-com Jan 19, 2020
f80660e
remove empty line
ruben-baez-seagull-com Jan 19, 2020
799c861
add new env var and change to v1
ruben-baez-seagull-com Jan 20, 2020
29de2c0
Update ci.yml
ruben-baez-seagull-com Jan 26, 2020
acb0375
restore plugins folder
ruben-baez-seagull-com Jan 26, 2020
19f987c
Remove grep && add setup go
ruben-baez-seagull-com Jan 27, 2020
40a9ad4
add an empty line
ruben-baez-seagull-com Jan 27, 2020
a292636
add error to see behavior
ruben-baez-seagull-com Jan 27, 2020
30c3d01
another error
ruben-baez-seagull-com Jan 27, 2020
78884df
remove errors
ruben-baez-seagull-com Jan 27, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: krew-index CI

on:
- push
- pull_request

jobs:
build:
name: Build and Tags
runs-on: ubuntu-latest
env:
KREW_VERSION: v0.3.3
GO111MODULE: on
steps:

- name: Check out code into the Go module directory
uses: actions/checkout@v1
alonyb marked this conversation as resolved.
Show resolved Hide resolved

- name: Install kubectl
run: |
set -euo pipefail
sudo curl -fsSL -o /usr/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/v1.13.1/bin/linux/amd64/kubectl
alonyb marked this conversation as resolved.
Show resolved Hide resolved
sudo chmod +x /usr/bin/kubectl

- name: Install krew
shell: bash
ahmetb marked this conversation as resolved.
Show resolved Hide resolved
alonyb marked this conversation as resolved.
Show resolved Hide resolved
run: |
set -euo pipefail
cd "$(mktemp -d)" &&
alonyb marked this conversation as resolved.
Show resolved Hide resolved
curl -fsSLO "https://github.com/kubernetes-sigs/krew/releases/download/${KREW_VERSION}/krew.{tar.gz,yaml}" &&
alonyb marked this conversation as resolved.
Show resolved Hide resolved
tar zxvf krew.tar.gz &&
./krew-linux_amd64 install --manifest=krew.yaml --archive=krew.tar.gz

- name: Install validate-krew-manifest plugin
run : |
set -euo pipefail
export GOBIN=$HOME/bin
go get sigs.k8s.io/krew/cmd/validate-krew-manifest@${KREW_VERSION}
alonyb marked this conversation as resolved.
Show resolved Hide resolved

- name: Validate updated plugin manifests
run : |
set -euo pipefail
alonyb marked this conversation as resolved.
Show resolved Hide resolved
export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"
git diff --name-only --diff-filter=AM ${{ github.event.before }} ${{ github.sha }} |
grep -E 'plugins/.*' | tee /dev/stderr |
xargs -I _ $HOME/bin/validate-krew-manifest -manifest _
1 change: 0 additions & 1 deletion plugins/whoami.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,3 @@ spec:
https://github.com/rajatjindal/kubectl-whoami
description: |
This plugin show the subject that's currently authenticated as.

alonyb marked this conversation as resolved.
Show resolved Hide resolved