-
Notifications
You must be signed in to change notification settings - Fork 3k
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
796 changed files
with
94,661 additions
and
61,728 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,92 @@ | ||
name: Custom Docker build and push | ||
description: "Build and push a Docker image to Docker Hub" | ||
|
||
inputs: | ||
username: | ||
description: "Docker Hub username" | ||
password: | ||
description: "Docker Hub password" | ||
publish: | ||
description: "Set to true to actually publish the image to Docker Hub" | ||
|
||
context: | ||
description: "Same as docker/build-push-action" | ||
required: false | ||
file: | ||
description: "Same as docker/build-push-action" | ||
required: false | ||
platforms: | ||
description: "Same as docker/build-push-action" | ||
required: false | ||
|
||
images: | ||
# e.g. linkedin/datahub-gms | ||
description: "List of Docker images to use as base name for tags" | ||
required: true | ||
tags: | ||
# e.g. latest,head,sha12345 | ||
description: "List of tags to use for the Docker image" | ||
required: true | ||
outputs: | ||
image_tag: | ||
description: "Docker image tags" | ||
value: ${{ steps.docker_meta.outputs.tags }} | ||
# image_name: ${{ env.DATAHUB_GMS_IMAGE }} | ||
|
||
runs: | ||
using: "composite" | ||
|
||
steps: | ||
- name: Docker meta | ||
id: docker_meta | ||
uses: crazy-max/ghaction-docker-meta@v1 | ||
with: | ||
# list of Docker images to use as base name for tags | ||
images: ${{ inputs.images }} | ||
# add git short SHA as Docker tag | ||
tag-custom: ${{ inputs.tags }} | ||
tag-custom-only: true | ||
|
||
# Code for testing the build when not pushing to Docker Hub. | ||
- name: Build and Load image for testing (if not publishing) | ||
uses: docker/build-push-action@v2 | ||
if: ${{ inputs.publish != 'true' }} | ||
with: | ||
context: ${{ inputs.context }} | ||
file: ${{ inputs.file }} | ||
# TODO this only does single-platform builds in testing? | ||
# leaving it for now since it matches the previous behavior | ||
platforms: linux/amd64 | ||
tags: ${{ steps.docker_meta.outputs.tags }} | ||
load: true | ||
push: false | ||
- name: Upload image locally for testing (if not publishing) | ||
uses: ishworkh/docker-image-artifact-upload@v1 | ||
if: ${{ inputs.publish != 'true' }} | ||
with: | ||
image: ${{ steps.docker_meta.outputs.tags }} | ||
|
||
# Code for building multi-platform images and pushing to Docker Hub. | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
if: ${{ inputs.publish == 'true' }} | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
if: ${{ inputs.publish == 'true' }} | ||
- name: Login to DockerHub | ||
uses: docker/login-action@v1 | ||
if: ${{ inputs.publish == 'true' }} | ||
with: | ||
username: ${{ inputs.username }} | ||
password: ${{ inputs.password }} | ||
- name: Build and Push Multi-Platform image | ||
uses: docker/build-push-action@v2 | ||
if: ${{ inputs.publish == 'true' }} | ||
with: | ||
context: ${{ inputs.context }} | ||
file: ${{ inputs.file }} | ||
platforms: ${{ inputs.platforms }} | ||
tags: ${{ steps.docker_meta.outputs.tags }} | ||
push: true | ||
|
||
# TODO add code for vuln scanning? |
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 @@ | ||
name: 'Ensure codegen is updated' | ||
description: 'Will check the local filesystem against git, and abort if there are uncommitted changes.' | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- shell: bash | ||
run: | | ||
if output=$(git status --porcelain) && [ ! -z "$output" ]; then | ||
# See https://unix.stackexchange.com/a/155077/378179. | ||
echo 'There are uncommitted changes:' | ||
echo $output | ||
exit 1 | ||
else | ||
echo 'All good!' | ||
fi |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ on: | |
branches: | ||
- master | ||
paths-ignore: | ||
- "docker/**" | ||
- "docs/**" | ||
- "**.md" | ||
pull_request: | ||
|
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,47 @@ | ||
name: check quickstart | ||
on: | ||
push: | ||
branches: | ||
- master | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
|
||
jobs: | ||
test-quickstart: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-20.04] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.9.9" | ||
- name: Install acryl-datahub | ||
run: | | ||
pip install --upgrade acryl-datahub | ||
datahub version | ||
python -c "import platform; print(platform.platform())" | ||
- name: Run quickstart | ||
run: | | ||
datahub docker quickstart | ||
- name: Ingest sample data | ||
run: | | ||
datahub docker ingest-sample-data | ||
- name: See status | ||
run: | | ||
docker ps -a && datahub docker check | ||
- name: store logs | ||
if: failure() | ||
run: | | ||
docker logs datahub-gms >& quickstart-gms.log | ||
- name: Upload logs | ||
uses: actions/upload-artifact@v2 | ||
if: failure() | ||
with: | ||
name: docker-quickstart-logs-${{ matrix.os }} | ||
path: "*.log" |
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 @@ | ||
name: Close inactive issues | ||
on: | ||
schedule: | ||
- cron: "30 1 * * *" | ||
|
||
jobs: | ||
close-issues: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
pull-requests: write | ||
steps: | ||
- uses: actions/stale@v5 | ||
with: | ||
days-before-issue-stale: 30 | ||
days-before-issue-close: 30 | ||
stale-issue-label: "stale" | ||
stale-issue-message: "This issue is stale because it has been open for 30 days with no activity. If you believe this is still an issue on the latest DataHub release please leave a comment with the version that you tested it with. If this is a question/discussion please head to https://slack.datahubproject.io. For feature requests please use https://feature-requests.datahubproject.io" | ||
close-issue-message: "This issue was closed because it has been inactive for 30 days since being marked as stale." | ||
days-before-pr-stale: -1 | ||
days-before-pr-close: -1 | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} |
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
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,42 @@ | ||
name: ingestion smoke | ||
on: | ||
release: | ||
types: [published, edited] | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- "docker/datahub-ingestion/**" | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
|
||
build-smoke: | ||
name: Build and Push Docker Image to Docker Hub | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
- name: Login to DockerHub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.ACRYL_DOCKER_USERNAME }} | ||
password: ${{ secrets.ACRYL_DOCKER_PASSWORD }} | ||
- name: Build and Push image | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: ./docker/datahub-ingestion | ||
file: ./docker/datahub-ingestion/smoke.Dockerfile | ||
platforms: linux/amd64,linux/arm64 | ||
tags: acryldata/datahub-ingestion-base:smoke | ||
push: true |
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
Oops, something went wrong.