-
Notifications
You must be signed in to change notification settings - Fork 31
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
Showing
5 changed files
with
127 additions
and
137 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 |
---|---|---|
@@ -0,0 +1,124 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
tags: [ v* ] | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.16 | ||
- run: go version | ||
- run: go env | ||
- run: make kubebuilder name=linux | ||
- run: go mod download | ||
- run: make test | ||
- run: bash <(curl -s https://codecov.io/bash) | ||
|
||
lint: | ||
runs-on: ubuntu-latest | ||
needs: [ test ] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: touch api/util/message | ||
- uses: golangci/golangci-lint-action@v2 | ||
with: | ||
version: v1.36.0 | ||
- run: git diff --exit-code | ||
|
||
e2e: | ||
runs-on: ubuntu-latest | ||
needs: [ test ] | ||
env: | ||
KUBECONFIG: /etc/rancher/k3s/k3s.yaml | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: docker/setup-qemu-action@v1 | ||
- uses: docker/setup-buildx-action@v1 | ||
- name: Install and start K3S | ||
timeout-minutes: 3 | ||
run: | | ||
curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION=v1.18.17+k3s1 INSTALL_K3S_CHANNEL=stable INSTALL_K3S_EXEC=--docker K3S_KUBECONFIG_MODE=644 sh - | ||
until kubectl cluster-info ; do sleep 10s ; done | ||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: "1.16.2" | ||
- run: make controller | ||
- run: make deploy CONFIG=ci | ||
- run: make runner runtimes | ||
- run: make wait | ||
- run: make test-examples | ||
- name: list pods | ||
if: ${{ failure() }} | ||
run: kubectl -n argo-dataflow-system get pod | ||
- name: controller logs | ||
if: ${{ failure() }} | ||
run: kubectl -n argo-dataflow-system logs deploy/controller-manager -c manager | ||
|
||
publish-images: | ||
runs-on: ubuntu-latest | ||
needs: [ test, lint, e2e ] | ||
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') | ||
strategy: | ||
matrix: | ||
target: [ controller, runner, go1-16, java16, python3-9 ] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: docker/setup-qemu-action@v1 | ||
- uses: docker/setup-buildx-action@v1 | ||
- uses: docker/login-action@v1 | ||
with: | ||
registry: quay.io | ||
username: ${{ secrets.QUAY_USERNAME }} | ||
password: ${{ secrets.QUAY_ROBOT_TOKEN }} | ||
- name: docker build + push | ||
run: | | ||
tag=$(basename $GITHUB_REF) | ||
if [ $tag = "master" ]; then | ||
tag="latest" | ||
fi | ||
docker buildx build . --target ${{matrix.target}} --tag quay.io/argoproj/dataflow-${{matrix.target}}:$tag --push | ||
draft-release: | ||
runs-on: ubuntu-latest | ||
needs: [ test, lint, e2e ] | ||
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
# 0 indicates all history for all branches and tags. | ||
fetch-depth: 0 | ||
# https://stackoverflow.com/questions/58033366/how-to-get-current-branch-within-github-actions | ||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.16 | ||
- name: Get tag | ||
run: | | ||
tag=$(basename $GITHUB_REF) | ||
if [ $tag = "master" ]; then | ||
tag="latest" | ||
fi | ||
echo "##[set-output name=tag;]$tag" | ||
id: tag | ||
- name: Generate release artifacts | ||
run: make manifests changelog TAG=${{ github.tag.inputs.tag }} | ||
- name: Draft release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
tag_name: ${{ github.tag.inputs.tag }} | ||
draft: true | ||
prerelease: true | ||
body_path: changelog | ||
files: | | ||
config/*.yaml | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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