forked from flyteorg/flyte
-
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.
Update code of conduct (flyteorg#46)
Signed-off-by: Ketan Umare <[email protected]>
- Loading branch information
1 parent
729b045
commit 09bde0f
Showing
32 changed files
with
481 additions
and
34 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,2 +1,2 @@ | ||
This project is governed by [Lyft's code of conduct](https://github.com/lyft/code-of-conduct). | ||
This project is governed by LF AI Foundation's [code of conduct](https://lfprojects.org/policies/code-of-conduct/). | ||
All contributors and participants agree to abide by its terms. |
2 changes: 2 additions & 0 deletions
2
datacalog/boilerplate/flyte/code_of_conduct/CODE_OF_CONDUCT.md
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,2 @@ | ||
This project is governed by LF AI Foundation's [code of conduct](https://lfprojects.org/policies/code-of-conduct/). | ||
All contributors and participants agree to abide by its terms. |
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,2 @@ | ||
CODE OF CONDUCT | ||
~~~~~~~~~~~~~~~ |
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,12 @@ | ||
#!/usr/bin/env bash | ||
|
||
# WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. | ||
# ONLY EDIT THIS FILE FROM WITHIN THE 'FLYTEORG/BOILERPLATE' REPOSITORY: | ||
# | ||
# TO OPT OUT OF UPDATES, SEE https://github.com/flyteorg/boilerplate/blob/master/Readme.rst | ||
|
||
set -e | ||
|
||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" | ||
|
||
cp ${DIR}/CODE_OF_CONDUCT.md ${DIR}/../../../CODE_OF_CONDUCT.md |
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,12 @@ | ||
# WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. | ||
# ONLY EDIT THIS FILE FROM WITHIN THE 'FLYTEORG/BOILERPLATE' REPOSITORY: | ||
# | ||
# TO OPT OUT OF UPDATES, SEE https://github.com/flyteorg/boilerplate/blob/master/Readme.rst | ||
|
||
.PHONY: end2end_execute | ||
end2end_execute: | ||
./boilerplate/flyte/end2end/end2end.sh | ||
|
||
.PHONY: k8s_integration_execute | ||
k8s_integration_execute: | ||
echo "pass" |
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,34 @@ | ||
#!/usr/bin/env bash | ||
|
||
# WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. | ||
# ONLY EDIT THIS FILE FROM WITHIN THE 'FLYTEORG/BOILERPLATE' REPOSITORY: | ||
# | ||
# TO OPT OUT OF UPDATES, SEE https://github.com/flyteorg/boilerplate/blob/master/Readme.rst | ||
|
||
set -e | ||
|
||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" | ||
|
||
OUT="${DIR}/tmp" | ||
rm -rf ${OUT} | ||
git clone https://github.com/flyteorg/flyte.git "${OUT}" | ||
|
||
pushd ${OUT} | ||
|
||
if [ ! -z "$IMAGE" ]; | ||
then | ||
kind load docker-image ${IMAGE} | ||
if [ ${IMAGE_NAME} -eq "flytepropeller" ] | ||
then | ||
sed -i.bak -e "s_${IMAGE_NAME}:.*_${IMAGE}_g" ${OUT}/kustomize/base/propeller/deployment.yaml | ||
fi | ||
|
||
if [ ${IMAGE} -eq "flyteadmin" ] | ||
then | ||
sed -i.bak -e "s_${IMAGE_NAME}:.*_${IMAGE}_g" ${OUT}/kustomize/base/admindeployment/deployment.yaml | ||
fi | ||
fi | ||
|
||
make kustomize | ||
make end2end_execute | ||
popd |
16 changes: 16 additions & 0 deletions
16
datacalog/boilerplate/flyte/flyte_golang_compile/Readme.rst
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,16 @@ | ||
Flyte Golang Compile | ||
~~~~~~~~~~~~~~~~~~~~ | ||
|
||
Common compile script for Flyte golang services. | ||
|
||
**To Enable:** | ||
|
||
Add ``flyteorg/flyte_golang_compile`` to your ``boilerplate/update.cfg`` file. | ||
|
||
Add the following to your Makefile | ||
|
||
:: | ||
|
||
.PHONY: compile_linux | ||
compile_linux: | ||
PACKAGES={{ *your packages }} OUTPUT={{ /path/to/output }} ./boilerplate/flyte/flyte_golang_compile.sh |
26 changes: 26 additions & 0 deletions
26
datacalog/boilerplate/flyte/flyte_golang_compile/flyte_golang_compile.Template
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,26 @@ | ||
# WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. | ||
# ONLY EDIT THIS FILE FROM WITHIN THE 'FLYTEORG/BOILERPLATE' REPOSITORY: | ||
# | ||
# TO OPT OUT OF UPDATES, SEE https://github.com/flyteorg/boilerplate/blob/master/Readme.rst | ||
|
||
if [ -z "$PACKAGES" ]; then | ||
echo "PACKAGES environment VAR not set" | ||
exit 1 | ||
fi | ||
|
||
if [ -z "$OUTPUT" ]; then | ||
echo "OUTPUT environment VAR not set" | ||
exit 1 | ||
fi | ||
|
||
# get the GIT_SHA and RELEASE_SEMVER | ||
|
||
GIT_SHA=$(git rev-parse HEAD) | ||
RELEASE_SEMVER=$(git describe --tags --exact-match $GIT_SHA 2>/dev/null) | ||
|
||
CURRENT_PKG=github.com/flyteorg/{{ REPOSITORY }} | ||
VERSION_PKG="${CURRENT_PKG}/vendor/github.com/flyteorg/flytestdlib" | ||
|
||
LDFLAGS="-X ${VERSION_PKG}/version.Build=${GIT_SHA} -X ${VERSION_PKG}/version.Version=${RELEASE_SEMVER}" | ||
|
||
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags "$LDFLAGS" -o "$OUTPUT" "$PACKAGES" |
13 changes: 13 additions & 0 deletions
13
datacalog/boilerplate/flyte/flyte_golang_compile/update.sh
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,13 @@ | ||
#!/usr/bin/env bash | ||
|
||
# WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. | ||
# ONLY EDIT THIS FILE FROM WITHIN THE 'FLYTEORG/BOILERPLATE' REPOSITORY: | ||
# | ||
# TO OPT OUT OF UPDATES, SEE https://github.com/flyteorg/boilerplate/blob/master/Readme.rst | ||
|
||
set -e | ||
|
||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" | ||
|
||
echo " - generating ${DIR}/flyte_golang_compile.sh" | ||
sed -e "s/{{REPOSITORY}}/${REPOSITORY}/g" ${DIR}/flyte_golang_compile.Template > ${DIR}/flyte_golang_compile.sh |
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,22 @@ | ||
Golang Github Actions | ||
~~~~~~~~~~~~~~~~~ | ||
|
||
Provides a two github actions workflows. | ||
|
||
**To Enable:** | ||
|
||
Add ``flyteorg/github_workflows`` to your ``boilerplate/update.cfg`` file. | ||
|
||
Add a github secret ``package_name`` with the name to use for publishing (e.g. ``flytepropeller``). Typicaly, this will be the same name as the repository. | ||
|
||
*Note*: If you are working on a fork, include that prefix in your package name (``myfork/flytepropeller``). | ||
|
||
The actions will push to 2 repos: | ||
|
||
1. ``docker.pkg.github.com/flyteorg/<repo>/<package_name>`` | ||
2. ``docker.pkg.github.com/flyteorg/<repo>/<package_name>-stages`` : this repo is used to cache build stages to speed up iterative builds after. | ||
|
||
There are two workflows that get deployed: | ||
|
||
1. A workflow that runs on Pull Requests to build and push images to github registy tagged with the commit sha. | ||
2. A workflow that runs on master merges that bump the patch version of release tag, builds and pushes images to github registry tagged with the version, commit sha as well as "latest" |
36 changes: 36 additions & 0 deletions
36
datacalog/boilerplate/flyte/github_workflows/boilerplate_automation.yml
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,36 @@ | ||
name: Update Boilerplate Automation | ||
on: | ||
workflow_dispatch: | ||
jobs: | ||
update-boilerplate: | ||
name: Update Boilerplate | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: "0" | ||
- name: Update Boilerplate | ||
run: | | ||
make update_boilerplate | ||
- name: Create Pull Request | ||
id: cpr | ||
uses: peter-evans/create-pull-request@v3 | ||
with: | ||
token: ${{ secrets.FLYTE_BOT_PAT }} | ||
commit-message: Update Boilerplate | ||
committer: Flyte-Bot <[email protected]> | ||
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> | ||
signoff: true | ||
branch: flyte-bot-update-boilerplate | ||
delete-branch: true | ||
title: 'Update Boilerplate' | ||
body: | | ||
Update Boilerplate | ||
- Auto-generated by [flyte-bot] | ||
labels: | | ||
boilerplate | ||
team-reviewers: | | ||
owners | ||
maintainers | ||
draft: false | ||
|
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,31 @@ | ||
name: Master | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
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 | ||
- 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.package_name }} | ||
image_tag: latest,${{ github.sha }},${{ steps.bump-version.outputs.tag }} | ||
push_git_tag: true | ||
registry: docker.pkg.github.com | ||
build_extra_args: "--compress=true" |
19 changes: 19 additions & 0 deletions
19
datacalog/boilerplate/flyte/github_workflows/pull_request.yml
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,19 @@ | ||
name: Pull Request | ||
|
||
on: | ||
pull_request | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- 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.package_name }} | ||
image_tag: ${{ github.sha }} | ||
push_git_tag: true | ||
registry: docker.pkg.github.com |
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,16 @@ | ||
#!/usr/bin/env bash | ||
|
||
# WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. | ||
# ONLY EDIT THIS FILE FROM WITHIN THE 'FLYTEORG/BOILERPLATE' REPOSITORY: | ||
# | ||
# TO OPT OUT OF UPDATES, SEE https://github.com/flyteorg/boilerplate/blob/master/Readme.rst | ||
|
||
set -e | ||
|
||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" | ||
|
||
mkdir -p ${DIR}/../../../.github/workflows | ||
|
||
echo " - generating github action workflows in root directory." | ||
sed -e "s/{{REPOSITORY}}/${REPOSITORY}/g" ${DIR}/master.yml > ${DIR}/../../../.github/workflows/master.yml | ||
sed -e "s/{{REPOSITORY}}/${REPOSITORY}/g" ${DIR}/pull_request.yml > ${DIR}/../../../.github/workflows/pull_request.yml |
32 changes: 32 additions & 0 deletions
32
datacalog/boilerplate/flyte/golang_dockerfile/Dockerfile.GoTemplate
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,32 @@ | ||
# WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. | ||
# ONLY EDIT THIS FILE FROM WITHIN THE 'FLYTEORG/BOILERPLATE' REPOSITORY: | ||
# | ||
# TO OPT OUT OF UPDATES, SEE https://github.com/flyteorg/boilerplate/blob/master/Readme.rst | ||
|
||
FROM golang:1.13.3-alpine3.10 as builder | ||
RUN apk add git openssh-client make curl | ||
|
||
# COPY only the go mod files for efficient caching | ||
COPY go.mod go.sum /go/src/github.com/flyteorg/{{REPOSITORY}}/ | ||
WORKDIR /go/src/github.com/flyteorg/{{REPOSITORY}} | ||
|
||
# Pull dependencies | ||
RUN go mod download | ||
|
||
# COPY the rest of the source code | ||
COPY . /go/src/github.com/flyteorg/{{REPOSITORY}}/ | ||
|
||
# This 'linux_compile' target should compile binaries to the /artifacts directory | ||
# The main entrypoint should be compiled to /artifacts/{{REPOSITORY}} | ||
RUN make linux_compile | ||
|
||
# update the PATH to include the /artifacts directory | ||
ENV PATH="/artifacts:${PATH}" | ||
|
||
# This will eventually move to centurylink/ca-certs:latest for minimum possible image size | ||
FROM alpine:3.10 | ||
COPY --from=builder /artifacts /bin | ||
|
||
RUN apk --update add ca-certificates | ||
|
||
CMD ["{{REPOSITORY}}"] |
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,16 @@ | ||
Golang Dockerfile | ||
~~~~~~~~~~~~~~~~~ | ||
|
||
Provides a Dockerfile that produces a small image. | ||
|
||
**To Enable:** | ||
|
||
Add ``flyteorg/golang_dockerfile`` to your ``boilerplate/update.cfg`` file. | ||
|
||
Create and configure a ``make linux_compile`` target that compiles your go binaries to the ``/artifacts`` directory :: | ||
|
||
.PHONY: linux_compile | ||
linux_compile: | ||
RUN GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o /artifacts {{ packages }} | ||
|
||
All binaries compiled to ``/artifacts`` will be available at ``/bin`` in your final image. |
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,13 @@ | ||
#!/usr/bin/env bash | ||
|
||
# WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. | ||
# ONLY EDIT THIS FILE FROM WITHIN THE 'FLYTEORG/BOILERPLATE' REPOSITORY: | ||
# | ||
# TO OPT OUT OF UPDATES, SEE https://github.com/flyteorg/boilerplate/blob/master/Readme.rst | ||
|
||
set -e | ||
|
||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" | ||
|
||
echo " - generating Dockerfile in root directory." | ||
sed -e "s/{{REPOSITORY}}/${REPOSITORY}/g" ${DIR}/Dockerfile.GoTemplate > ${DIR}/../../../Dockerfile |
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
Oops, something went wrong.