Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.3.5 #14

Merged
merged 22 commits into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions .github/action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
# Copyright (c) 2024 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

---
name: Build Container Group Action
description: https://github.com/intel/ai-containers/blob/main/.github/container_pipeline_format
description: Given the inputs found below, build all containers found in a docker-compose.yaml file for a given configuration
author: tyler.titsworth@intel.com
inputs:
group_dir:
Expand Down Expand Up @@ -47,15 +61,15 @@ runs:
REGISTRY=${{ inputs.registry }} \
REPO=${{ inputs.repo }} \
COMPOSE_PROJECT_NAME=${{ env.random-number }} \
${{ inputs.env_overrides }} docker compose -p ${{ env.random-number }} push --ignore-push-failures
${{ inputs.env_overrides }} docker compose -p ${{ env.random-number }} push
working-directory: ${{ inputs.group_dir }}
- name: Print Containers
shell: bash
run: |
REGISTRY=${{ inputs.registry }} \
REPO=${{ inputs.repo }} \
COMPOSE_PROJECT_NAME=${{ env.random-number }} \
${{ inputs.env_overrides }} docker compose -p ${{ env.random-number }} images --format json | jq '.[] | "\(.Repository):\(.Tag)"' >> $GITHUB_STEP_SUMMARY
${{ inputs.env_overrides }} docker compose -p ${{ env.random-number }} images --format json | jq --arg registry "${{ secrets.registry }}" '.[] | select(.Repository | contains($registry)) | "\(.Repository):\(.Tag)"' | jq -s '.' >> $GITHUB_STEP_SUMMARY
working-directory: ${{ inputs.group_dir }}
- name: Un-Tag Containers
if: ${{ always() }}
Expand Down
30 changes: 24 additions & 6 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,33 @@
# Copyright (c) 2024 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "pip" # See documentation for possible values
directory: "test-runner/" # Location of package manifests
- package-ecosystem: pip
directory: /test-runner
schedule:
interval: weekly
- package-ecosystem: github-actions
directory: /
schedule:
interval: "weekly"
- package-ecosystem: "github-actions" # See documentation for possible values
directory: ".github/workflows" # Location of package manifests
interval: weekly
- package-ecosystem: pip
directory: /pytorch/serving
schedule:
interval: "weekly"
interval: weekly
13 changes: 13 additions & 0 deletions .github/license_template.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Copyright (c) 2024 Intel Corporation

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
14 changes: 14 additions & 0 deletions .github/linters/.hadolint.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright (c) 2024 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

---
ignored:
- DL3006
Expand Down
14 changes: 14 additions & 0 deletions .github/linters/.markdown-lint.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright (c) 2024 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

---
MD013: false
MD024: false
Expand Down
14 changes: 14 additions & 0 deletions .github/linters/.yaml-lint.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,16 @@
# Copyright (c) 2024 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

---
ignore: '**/templates/**.yaml'
14 changes: 14 additions & 0 deletions .github/linters/actionlint.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright (c) 2024 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

---
self-hosted-runner:
labels:
Expand Down
14 changes: 14 additions & 0 deletions .github/utils/val-args.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
#!/bin/bash

# Copyright (c) 2024 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -euf -o pipefail

# Input string
Expand Down
20 changes: 0 additions & 20 deletions .github/workflows/bandit.yaml

This file was deleted.

38 changes: 32 additions & 6 deletions .github/workflows/container-pipeline-tester.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright (c) 2024 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

---
name: Container Pipeline Tester
permissions: read-all
Expand Down Expand Up @@ -43,6 +57,9 @@ jobs:
matrix: ${{ steps.matrix.outputs.matrix }}
runs-on: [ k8-runners ]
steps:
- uses: step-security/harden-runner@v2
with:
egress-policy: audit
- uses: actions/checkout@v4
- name: Set Matrix
id: matrix
Expand All @@ -69,11 +86,14 @@ jobs:
matrix: ${{ fromJson(needs.setup-build-matrix.outputs.matrix) }}
fail-fast: false
steps:
- uses: step-security/harden-runner@v2
with:
egress-policy: audit
- uses: actions/checkout@v4
if: ${{ !inputs.no-build }}
- uses: docker/login-action@v3
with:
registry: ${{ vars.REGISTRY }}
registry: ${{ secrets.REGISTRY }}
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_TOKEN }}
if: ${{ !inputs.no-build }}
Expand All @@ -85,15 +105,18 @@ jobs:
with:
group_dir: ${{ inputs.group_dir }}
env_overrides: ${{ inputs.env_overrides }}
registry: ${{ vars.REGISTRY }}
repo: ${{ vars.REPO }}
registry: ${{ secrets.REGISTRY }}
repo: ${{ secrets.REPO }}
no-push: false
setup-test:
needs: [ build-containers ]
runs-on: [ k8-runners ]
outputs:
recipes: ${{ steps.recipes.outputs.RECIPES }}
steps:
- uses: step-security/harden-runner@v2
with:
egress-policy: audit
- uses: actions/checkout@v4
- name: Get Recipes
id: recipes
Expand All @@ -108,18 +131,21 @@ jobs:
experimental: [true]
fail-fast: false
steps:
- uses: step-security/harden-runner@v2
with:
egress-policy: audit
- uses: actions/checkout@v4
- uses: docker/login-action@v3
with:
registry: ${{ vars.REGISTRY }}
registry: ${{ secrets.REGISTRY }}
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Test Container Group
uses: ./test-runner
with:
mlops_repo: ${{ vars.MLOPS_REPO }}
mlops_repo: ${{ secrets.MLOPS_REPO }}
mlops_ref: ${{ github.ref }}
recipe_dir: ${{ inputs.group_dir }}
registry: ${{ vars.REGISTRY }}
registry: ${{ secrets.REGISTRY }}
test_dir: ${{ matrix.recipe }}
token: ${{ github.token }}
40 changes: 40 additions & 0 deletions .github/workflows/dependency-review.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Copyright (c) 2024 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Dependency Review Action
#
# This Action will scan dependency manifest files that change as part of a Pull Request,
# surfacing known-vulnerable versions of the packages declared or updated in the PR.
# Once installed, if the workflow run is marked as required,
# PRs introducing known-vulnerable packages will be blocked from merging.
#
# Source repository: https://github.com/actions/dependency-review-action
name: 'Dependency Review'
on: [pull_request]
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- uses: step-security/harden-runner@v2
with:
egress-policy: audit
- name: 'Checkout Repository'
uses: actions/checkout@v4
- name: 'Dependency Review'
uses: actions/dependency-review-action@v4
20 changes: 0 additions & 20 deletions .github/workflows/dockerfile-builder.yml

This file was deleted.

Loading
Loading