forked from flyteorg/flytepropeller
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Complete github actions migration (flyteorg#156)
* Add unit tests in github actions * Remove Travis and update master pipeline * Push to dockerhub again * Fix tagging in PRs * make dockerhub push parallel * renames * parallelize image builds * new line * Update boilerplate * Add reference to how to bump versions
- Loading branch information
Showing
7 changed files
with
208 additions
and
40 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 |
---|---|---|
|
@@ -6,26 +6,32 @@ on: | |
- master | ||
|
||
jobs: | ||
build: | ||
bump-version: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
version: ${{ steps.bump-version.outputs.tag }} | ||
steps: | ||
- uses: actions/checkout@master | ||
with: | ||
fetch-depth: '0' | ||
- name: Bump version and push tag | ||
id: bump-version | ||
uses: anothrNick/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
WITH_V: true | ||
DEFAULT_BUMP: patch | ||
push-github-end2end: | ||
runs-on: ubuntu-latest | ||
needs: bump-version | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: '0' | ||
- name: Push Docker Image to Github Registry | ||
uses: whoan/docker-build-with-cache-action@v5 | ||
with: | ||
username: "${{ github.actor }}" | ||
password: "${{ secrets.GITHUB_TOKEN }}" | ||
image_name: ${{ secrets.flytegithub_repo }}/operator | ||
image_tag: latest,${{ github.sha }},${{ steps.bump-version.outputs.tag }} | ||
image_name: ${{ secrets.flytegithub_repo }}/flytepropeller | ||
image_tag: latest,${{ github.sha }},${{ needs.bump-version.outputs.version }} | ||
push_git_tag: true | ||
registry: docker.pkg.github.com | ||
build_extra_args: "--compress=true" | ||
|
@@ -39,4 +45,44 @@ jobs: | |
kubectl get pods -n kube-system | ||
echo "current-context:" $(kubectl config current-context) | ||
echo "environment-kubeconfig:" ${KUBECONFIG} | ||
PROPELLER=${{ secrets.flytegithub_repo }}/operator:${{ github.sha }} make end2end_execute | ||
PROPELLER=${{ secrets.flytegithub_repo }}/flytepropeller:${{ github.sha }} make end2end_execute | ||
push-dockerhub: | ||
runs-on: ubuntu-latest | ||
needs: bump-version | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: '0' | ||
- name: Push Docker Image to Dockerhub | ||
uses: whoan/docker-build-with-cache-action@v5 | ||
with: | ||
username: "${{ secrets.DOCKERHUB_USERNAME }}" | ||
password: "${{ secrets.DOCKERHUB_PASSWORD }}" | ||
image_name: ${{ secrets.DOCKERHUB_IMAGE_NAME }} | ||
image_tag: latest,${{ github.sha }},${{ needs.bump-version.outputs.version }} | ||
push_git_tag: true | ||
build_extra_args: "--compress=true" | ||
tests-lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: '0' | ||
- name: Unit Tests | ||
uses: cedrickring/[email protected] | ||
env: | ||
GO111MODULE: "on" | ||
with: | ||
args: make install && make test_unit_codecov | ||
- name: Push CodeCov | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
file: coverage.txt | ||
flags: unittests | ||
fail_ci_if_error: true | ||
- name: Lint | ||
uses: cedrickring/[email protected] | ||
env: | ||
GO111MODULE: "on" | ||
with: | ||
args: make install && make lint |
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 |
---|---|---|
|
@@ -4,20 +4,16 @@ on: | |
pull_request | ||
|
||
jobs: | ||
build: | ||
build-and-end2end: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
max-parallel: 4 | ||
matrix: | ||
go-version: [1.13] | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/checkout@v2 | ||
- name: Push Docker Image to Github Registry | ||
uses: whoan/docker-build-with-cache-action@v5 | ||
with: | ||
username: "${{ github.actor }}" | ||
password: "${{ secrets.GITHUB_TOKEN }}" | ||
image_name: ${{ secrets.flytegithub_repo }}/operator | ||
image_name: ${{ secrets.flytegithub_repo }}/flytepropeller | ||
image_tag: ${{ github.sha }} | ||
push_git_tag: true | ||
registry: docker.pkg.github.com | ||
|
@@ -31,4 +27,39 @@ jobs: | |
kubectl get pods -n kube-system | ||
echo "current-context:" $(kubectl config current-context) | ||
echo "environment-kubeconfig:" ${KUBECONFIG} | ||
PROPELLER=${{ secrets.flytegithub_repo }}/operator:${{ github.sha }} make end2end_execute | ||
PROPELLER=${{ secrets.flytegithub_repo }}/flytepropeller:${{ github.sha }} make end2end_execute | ||
push-dockerhub: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Push Docker Image to Dockerhub | ||
uses: whoan/docker-build-with-cache-action@v5 | ||
with: | ||
username: "${{ secrets.DOCKERHUB_USERNAME }}" | ||
password: "${{ secrets.DOCKERHUB_PASSWORD }}" | ||
image_name: ${{ secrets.DOCKERHUB_IMAGE_NAME }} | ||
image_tag: ${{ github.sha }} | ||
push_git_tag: true | ||
build_extra_args: "--compress=true" | ||
tests-lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Unit Tests | ||
uses: cedrickring/[email protected] | ||
env: | ||
GO111MODULE: "on" | ||
with: | ||
args: make install && make test_unit_codecov | ||
- name: Push CodeCov | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
file: coverage.txt | ||
flags: unittests | ||
fail_ci_if_error: true | ||
- name: Lint | ||
uses: cedrickring/[email protected] | ||
env: | ||
GO111MODULE: "on" | ||
with: | ||
args: make install && make lint |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -6,26 +6,83 @@ on: | |
- master | ||
|
||
jobs: | ||
build: | ||
bump-version: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
version: ${{ steps.bump-version.outputs.tag }} | ||
steps: | ||
- uses: actions/checkout@master | ||
with: | ||
fetch-depth: '0' | ||
- name: Bump version and push tag | ||
id: bump-version | ||
uses: anothrNick/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
WITH_V: true | ||
DEFAULT_BUMP: patch | ||
push-github-end2end: | ||
runs-on: ubuntu-latest | ||
needs: bump-version | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: '0' | ||
- name: Push Docker Image to Github Registry | ||
uses: whoan/docker-build-with-cache-action@v5 | ||
with: | ||
username: "${{ github.actor }}" | ||
password: "${{ secrets.GITHUB_TOKEN }}" | ||
image_name: ${{ secrets.flytegithub_repo }}/operator | ||
image_tag: latest,${{ github.sha }},${{ steps.bump-version.outputs.tag }} | ||
image_tag: latest,${{ github.sha }},${{ needs.bump-version.outputs.version }} | ||
push_git_tag: true | ||
registry: docker.pkg.github.com | ||
build_extra_args: "--compress=true" | ||
- uses: engineerd/[email protected] | ||
- name: End2End | ||
env: | ||
DOCKER_USERNAME: ${{ github.actor }} | ||
DOCKER_PASSWORD: "${{ secrets.GITHUB_TOKEN }}" | ||
run: | | ||
kubectl cluster-info | ||
kubectl get pods -n kube-system | ||
echo "current-context:" $(kubectl config current-context) | ||
echo "environment-kubeconfig:" ${KUBECONFIG} | ||
PROPELLER=${{ secrets.flytegithub_repo }}/operator:${{ github.sha }} make end2end_execute | ||
push-dockerhub: | ||
runs-on: ubuntu-latest | ||
needs: bump-version | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: '0' | ||
- name: Push Docker Image to Dockerhub | ||
uses: whoan/docker-build-with-cache-action@v5 | ||
with: | ||
username: "${{ secrets.DOCKERHUB_USERNAME }}" | ||
password: "${{ secrets.DOCKERHUB_PASSWORD }}" | ||
image_name: ${{ secrets.DOCKERHUB_IMAGE_NAME }} | ||
image_tag: latest,${{ github.sha }},${{ needs.bump-version.outputs.version }} | ||
push_git_tag: true | ||
build_extra_args: "--compress=true" | ||
tests-lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: '0' | ||
- name: Unit Tests | ||
uses: cedrickring/[email protected] | ||
env: | ||
GO111MODULE: "on" | ||
with: | ||
args: make install && make test_unit_codecov | ||
- name: Push CodeCov | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
file: coverage.txt | ||
flags: unittests | ||
fail_ci_if_error: true | ||
- name: Lint | ||
uses: cedrickring/[email protected] | ||
env: | ||
GO111MODULE: "on" | ||
with: | ||
args: make install && make lint |
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 |
---|---|---|
|
@@ -4,16 +4,62 @@ on: | |
pull_request | ||
|
||
jobs: | ||
build: | ||
build-and-end2end: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/checkout@v2 | ||
- name: Push Docker Image to Github Registry | ||
uses: whoan/docker-build-with-cache-action@v5 | ||
with: | ||
username: "${{ github.actor }}" | ||
password: "${{ secrets.GITHUB_TOKEN }}" | ||
image_name: ${{ secrets.flytegithub_repo }}/operator | ||
image_name: ${{ secrets.flytegithub_repo }}/flytepropeller | ||
image_tag: ${{ github.sha }} | ||
push_git_tag: true | ||
registry: docker.pkg.github.com | ||
- uses: engineerd/[email protected] | ||
- name: End2End | ||
env: | ||
DOCKER_USERNAME: ${{ github.actor }} | ||
DOCKER_PASSWORD: "${{ secrets.GITHUB_TOKEN }}" | ||
run: | | ||
kubectl cluster-info | ||
kubectl get pods -n kube-system | ||
echo "current-context:" $(kubectl config current-context) | ||
echo "environment-kubeconfig:" ${KUBECONFIG} | ||
PROPELLER=${{ secrets.flytegithub_repo }}/flytepropeller:${{ github.sha }} make end2end_execute | ||
push-dockerhub: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Push Docker Image to Dockerhub | ||
uses: whoan/docker-build-with-cache-action@v5 | ||
with: | ||
username: "${{ secrets.DOCKERHUB_USERNAME }}" | ||
password: "${{ secrets.DOCKERHUB_PASSWORD }}" | ||
image_name: ${{ secrets.DOCKERHUB_IMAGE_NAME }} | ||
image_tag: ${{ github.sha }} | ||
push_git_tag: true | ||
build_extra_args: "--compress=true" | ||
tests-lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Unit Tests | ||
uses: cedrickring/[email protected] | ||
env: | ||
GO111MODULE: "on" | ||
with: | ||
args: make install && make test_unit_codecov | ||
- name: Push CodeCov | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
file: coverage.txt | ||
flags: unittests | ||
fail_ci_if_error: true | ||
- name: Lint | ||
uses: cedrickring/[email protected] | ||
env: | ||
GO111MODULE: "on" | ||
with: | ||
args: make install && make lint |
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
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