Skip to content

Commit

Permalink
Prepare merge to master
Browse files Browse the repository at this point in the history
  • Loading branch information
angelbarrera92 committed Sep 28, 2020
1 parent ada117a commit d63f83c
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 16 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/ci.yml → .github/workflows/master.yml
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:
Expand All @@ -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
42 changes: 33 additions & 9 deletions .github/workflows/krew.yml → .github/workflows/release.yml
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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit d63f83c

Please sign in to comment.