-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ada117a
commit d63f83c
Showing
2 changed files
with
37 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,19 @@ | ||
name: "CI" | ||
name: "Master" | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- v* | ||
|
||
|
||
jobs: | ||
e2e_and_publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- uses: engineerd/[email protected] | ||
with: | ||
version: "v0.7.0" | ||
skipClusterCreation: "true" | ||
version: "v0.7.0" | ||
skipClusterCreation: "true" | ||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v1 | ||
with: | ||
|
@@ -35,6 +33,5 @@ jobs: | |
- name: Publish image | ||
run: | | ||
docker login -u "${{ secrets.DOCKER_USERNAME }}" -p "${{ secrets.DOCKER_PASSWORD }}" | ||
make TAG_VERSION=${GITHUB_REF##*/} publish_dockerhub | ||
make TAG_VERSION=dev publish_dockerhub | ||
make TAG_VERSION=latest publish_dockerhub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,47 @@ | ||
name: "krew-release" | ||
name: "Release" | ||
|
||
on: | ||
push: | ||
branches: | ||
- krew-release | ||
tags: | ||
- v* | ||
|
||
jobs: | ||
krew-release: | ||
e2e_and_publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- uses: engineerd/[email protected] | ||
with: | ||
version: "v0.7.0" | ||
skipClusterCreation: "true" | ||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: "3.8" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade virtualenv | ||
- name: Execute E2E tests | ||
run: | | ||
make test-e2e | ||
- name: Upload E2E logs | ||
continue-on-error: true | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: e2elogs | ||
path: e2elogs | ||
- name: Publish image | ||
run: | | ||
docker login -u "${{ secrets.DOCKER_USERNAME }}" -p "${{ secrets.DOCKER_PASSWORD }}" | ||
make TAG_VERSION=${GITHUB_REF##*/} publish_dockerhub | ||
make TAG_VERSION=latest publish_dockerhub | ||
- name: Create k8spin krew package | ||
env: | ||
VERSION: v1.0.0-rc4 # TODO Run only on tags | ||
run: | | ||
cp kubectl-k8spin.py kubectl-k8spin | ||
chmod +x kubectl-k8spin | ||
tar -zcvf kubectl-k8spin.tar.gz kubectl-k8spin | ||
export SHA256=$(sha256sum kubectl-k8spin.tar.gz | awk '{print $1'}) | ||
export VERSION=${GITHUB_REF##*/} | ||
envsubst < plugins/template/k8spin.tpl.yaml > plugins/k8spin.yaml | ||
echo "::set-env name=RELEASE_VERSION::$VERSION" | ||
- name: Create Release | ||
|
@@ -29,7 +53,7 @@ jobs: | |
tag_name: ${{ env.RELEASE_VERSION }} | ||
release_name: Release ${{ env.RELEASE_VERSION }} | ||
body: | | ||
Testing krew | ||
Release ${{ env.RELEASE_VERSION }} | ||
draft: false | ||
prerelease: true | ||
- name: Upload Release Asset | ||
|
@@ -46,7 +70,7 @@ jobs: | |
uses: github-actions-x/[email protected] | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
push-branch: krew-release # TODO Change to master | ||
push-branch: master | ||
commit-message: Add krew manifest ${{ env.RELEASE_VERSION }} | ||
force-add: true | ||
files: plugins/k8spin.yaml | ||
|