From bf458eefbf8545e7ee4db9b48dfd72a60a0adc68 Mon Sep 17 00:00:00 2001 From: Dor Mullor Date: Thu, 25 Apr 2024 09:42:31 +0300 Subject: [PATCH 1/2] Add new CI to fake-gpu-operator --- .circleci/config.yml | 182 --------- .github/workflows/ci-commit-master.yml | 141 +++++++ .github/workflows/ci-pr-to-master.yml | 140 +++++++ .github/workflows/ci-pr-to-v.yml | 140 +++++++ .github/workflows/ci-tag.yml | 205 ++++++++++ .vscode/configurationCache.log | 1 + .vscode/dryrun.log | 5 + .vscode/settings.json | 3 + .vscode/targets.log | 376 ++++++++++++++++++ .../.helmignore | 0 .../Chart.yaml | 0 .../crds/nvidia.com_clusterpolicies.yaml | 0 .../templates/device-plugin/_helpers.tpl | 0 .../templates/device-plugin/clusterrole.yaml | 0 .../device-plugin/clusterrolebinding.yaml | 0 .../templates/device-plugin/daemonset.yml | 0 .../device-plugin/deployment-template.yaml | 0 .../templates/device-plugin/ocp/rbac.yml | 0 .../device-plugin/serviceaccount.yml | 0 .../templates/gpu-operator/deployment.yml | 0 .../templates/mig-faker/clusterrole.yaml | 0 .../mig-faker/clusterrolebinding.yaml | 0 .../templates/mig-faker/daemonset.yml | 0 .../templates/mig-faker/serviceaccount.yml | 0 .../templates/runtime-class.yml | 0 .../templates/status-exporter/_helpers.tpl | 0 .../status-exporter/clusterrole.yaml | 0 .../status-exporter/clusterrolebinding.yaml | 0 .../templates/status-exporter/daemonset.yaml | 0 .../status-exporter/deployment-template.yaml | 0 .../templates/status-exporter/service.yaml | 0 .../status-exporter/serviceaccount.yaml | 0 .../templates/status-updater/clusterrole.yaml | 0 .../status-updater/clusterrolebinding.yaml | 0 .../templates/status-updater/deployment.yaml | 0 .../templates/status-updater/role.yaml | 0 .../templates/status-updater/rolebinding.yaml | 0 .../status-updater/serviceaccount.yaml | 0 .../templates/topology-cm.yml | 0 .../topology-server/clusterrole.yaml | 0 .../topology-server/clusterrolebinding.yaml | 0 .../templates/topology-server/deployment.yaml | 0 .../templates/topology-server/service.yaml | 0 .../topology-server/serviceaccount.yaml | 0 .../values.yaml | 0 .../.dockerignore | 0 .gitignore => fake-gpu-operator/.gitignore | 0 Dockerfile => fake-gpu-operator/Dockerfile | 0 LICENSE => fake-gpu-operator/LICENSE | 0 Makefile => fake-gpu-operator/Makefile | 0 .../cmd}/device-plugin/main.go | 0 .../cmd}/mig-faker/main.go | 0 .../cmd}/nvidia-smi/main.go | 0 .../cmd}/preloader/main.c | 0 .../cmd}/status-exporter/main.go | 0 .../cmd}/status-updater/main.go | 0 .../cmd}/topology-server/main.go | 0 .../design}/GPU Mock design.md | 0 .../design}/MIG Metrics.md | 0 .../design}/Node Autoscale.md | 0 .../design}/RUN-4698.md | 0 .../design}/samples/2.17/fractional_pod.yaml | 0 .../2.17/fractional_pod_reservation.yaml | 0 .../<2.9/fraction/metrics/1_workload.ini | 0 .../<2.9/fraction/node/1_workload.yaml | 0 .../<2.9/mig/metrics/4 Active Workloads.ini | 0 .../<2.9/mig/metrics/Active 1g.5gb.ini | 0 .../mig/metrics/Active 2*1g.5gb + 2g.10gb.ini | 0 .../<2.9/mig/metrics/Empty mig disabled.ini | 0 .../<2.9/mig/metrics/Emtpy MIG enabled.ini | 0 .../mig/metrics/Idle 1g.5gb allocated.ini | 0 .../samples/<2.9/mig/node/3_instances.yaml | 0 .../samples/<2.9/mig/node/4_instances.yaml | 0 .../design}/samples/<2.9/mig/pod/1g-5gb.yaml | 0 .../samples/>=2.9/mig/node/7g-40gb.yaml | 0 .../design}/samples/>=2.9/mig/pod/7g-5gb.yaml | 0 .../example}/deployment.yml | 0 go.mod => fake-gpu-operator/go.mod | 0 go.sum => fake-gpu-operator/go.sum | 0 .../internal}/common/app/app.go | 0 .../internal}/common/app/apprunner.go | 0 .../internal}/common/app/apprunner_test.go | 0 .../internal}/common/config/env.go | 0 .../internal}/common/constants/constants.go | 0 .../internal}/common/kubeclient/kubeclient.go | 0 .../common/kubeclient/kubeclient_mock.go | 0 .../internal}/common/topology/const.go | 0 .../internal}/common/topology/kubernetes.go | 0 .../common/topology/podGpuUsageStatusMap.go | 0 .../internal}/common/topology/range.go | 0 .../internal}/common/topology/types.go | 0 .../internal}/deviceplugin/device_plugin.go | 0 .../internal}/deviceplugin/fake_node.go | 0 .../internal}/deviceplugin/real_node.go | 0 .../internal}/migfaker/app.go | 0 .../internal}/migfaker/migfaker.go | 0 .../internal}/migfaker/migfaker_test.go | 0 .../internal}/migfaker/syncconfig.go | 0 .../internal}/migfaker/types.go | 0 .../internal}/status-exporter/app.go | 0 .../internal}/status-exporter/app_test.go | 0 .../status-exporter/export/exporter.go | 0 .../status-exporter/export/fs/exporter.go | 0 .../status-exporter/export/labels/exporter.go | 0 .../export/labels/exporter_test.go | 0 .../export/metrics/exporter.go | 0 .../export/metrics/exporter_test.go | 0 .../status-exporter/export/metrics/metrics.go | 0 .../status-exporter/watch/kubewatcher.go | 0 .../internal}/status-exporter/watch/watch.go | 0 .../internal}/status-updater/app.go | 0 .../internal}/status-updater/app_test.go | 0 .../status-updater/controllers/controller.go | 0 .../controllers/node/controller.go | 0 .../controllers/pod/controller.go | 0 .../status-updater/controllers/util/util.go | 0 .../handlers/node/fake_node_deployments.go | 0 .../status-updater/handlers/node/handler.go | 0 .../handlers/node/topology_cm.go | 0 .../handlers/pod/dedicated_gpu_pod_handler.go | 0 .../pod/gpu_reservation_pod_handler.go | 0 .../handlers/pod/gpu_usage_calculator.go | 0 .../handlers/pod/gpu_usage_calculator_test.go | 0 .../handlers/pod/handle_suite_test.go | 0 .../status-updater/handlers/pod/handler.go | 0 .../handlers/pod/shared_gpu_pod_handler.go | 0 .../internal}/status-updater/util/util.go | 0 .../script}/uploadChart.sh | 0 128 files changed, 1011 insertions(+), 182 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .github/workflows/ci-commit-master.yml create mode 100644 .github/workflows/ci-pr-to-master.yml create mode 100644 .github/workflows/ci-pr-to-v.yml create mode 100644 .github/workflows/ci-tag.yml create mode 100644 .vscode/configurationCache.log create mode 100644 .vscode/dryrun.log create mode 100644 .vscode/settings.json create mode 100644 .vscode/targets.log rename {deploy/fake-gpu-operator => fake-gpu-operator-chart}/.helmignore (100%) rename {deploy/fake-gpu-operator => fake-gpu-operator-chart}/Chart.yaml (100%) rename {deploy/fake-gpu-operator => fake-gpu-operator-chart}/crds/nvidia.com_clusterpolicies.yaml (100%) rename {deploy/fake-gpu-operator => fake-gpu-operator-chart}/templates/device-plugin/_helpers.tpl (100%) rename {deploy/fake-gpu-operator => fake-gpu-operator-chart}/templates/device-plugin/clusterrole.yaml (100%) rename {deploy/fake-gpu-operator => fake-gpu-operator-chart}/templates/device-plugin/clusterrolebinding.yaml (100%) rename {deploy/fake-gpu-operator => fake-gpu-operator-chart}/templates/device-plugin/daemonset.yml (100%) rename {deploy/fake-gpu-operator => fake-gpu-operator-chart}/templates/device-plugin/deployment-template.yaml (100%) rename {deploy/fake-gpu-operator => fake-gpu-operator-chart}/templates/device-plugin/ocp/rbac.yml (100%) rename {deploy/fake-gpu-operator => fake-gpu-operator-chart}/templates/device-plugin/serviceaccount.yml (100%) rename {deploy/fake-gpu-operator => fake-gpu-operator-chart}/templates/gpu-operator/deployment.yml (100%) rename {deploy/fake-gpu-operator => fake-gpu-operator-chart}/templates/mig-faker/clusterrole.yaml (100%) rename {deploy/fake-gpu-operator => fake-gpu-operator-chart}/templates/mig-faker/clusterrolebinding.yaml (100%) rename {deploy/fake-gpu-operator => fake-gpu-operator-chart}/templates/mig-faker/daemonset.yml (100%) rename {deploy/fake-gpu-operator => fake-gpu-operator-chart}/templates/mig-faker/serviceaccount.yml (100%) rename {deploy/fake-gpu-operator => fake-gpu-operator-chart}/templates/runtime-class.yml (100%) rename {deploy/fake-gpu-operator => fake-gpu-operator-chart}/templates/status-exporter/_helpers.tpl (100%) rename {deploy/fake-gpu-operator => fake-gpu-operator-chart}/templates/status-exporter/clusterrole.yaml (100%) rename {deploy/fake-gpu-operator => fake-gpu-operator-chart}/templates/status-exporter/clusterrolebinding.yaml (100%) rename {deploy/fake-gpu-operator => fake-gpu-operator-chart}/templates/status-exporter/daemonset.yaml (100%) rename {deploy/fake-gpu-operator => fake-gpu-operator-chart}/templates/status-exporter/deployment-template.yaml (100%) rename {deploy/fake-gpu-operator => fake-gpu-operator-chart}/templates/status-exporter/service.yaml (100%) rename {deploy/fake-gpu-operator => fake-gpu-operator-chart}/templates/status-exporter/serviceaccount.yaml (100%) rename {deploy/fake-gpu-operator => fake-gpu-operator-chart}/templates/status-updater/clusterrole.yaml (100%) rename {deploy/fake-gpu-operator => fake-gpu-operator-chart}/templates/status-updater/clusterrolebinding.yaml (100%) rename {deploy/fake-gpu-operator => fake-gpu-operator-chart}/templates/status-updater/deployment.yaml (100%) rename {deploy/fake-gpu-operator => fake-gpu-operator-chart}/templates/status-updater/role.yaml (100%) rename {deploy/fake-gpu-operator => fake-gpu-operator-chart}/templates/status-updater/rolebinding.yaml (100%) rename {deploy/fake-gpu-operator => fake-gpu-operator-chart}/templates/status-updater/serviceaccount.yaml (100%) rename {deploy/fake-gpu-operator => fake-gpu-operator-chart}/templates/topology-cm.yml (100%) rename {deploy/fake-gpu-operator => fake-gpu-operator-chart}/templates/topology-server/clusterrole.yaml (100%) rename {deploy/fake-gpu-operator => fake-gpu-operator-chart}/templates/topology-server/clusterrolebinding.yaml (100%) rename {deploy/fake-gpu-operator => fake-gpu-operator-chart}/templates/topology-server/deployment.yaml (100%) rename {deploy/fake-gpu-operator => fake-gpu-operator-chart}/templates/topology-server/service.yaml (100%) rename {deploy/fake-gpu-operator => fake-gpu-operator-chart}/templates/topology-server/serviceaccount.yaml (100%) rename {deploy/fake-gpu-operator => fake-gpu-operator-chart}/values.yaml (100%) rename .dockerignore => fake-gpu-operator/.dockerignore (100%) rename .gitignore => fake-gpu-operator/.gitignore (100%) rename Dockerfile => fake-gpu-operator/Dockerfile (100%) rename LICENSE => fake-gpu-operator/LICENSE (100%) rename Makefile => fake-gpu-operator/Makefile (100%) rename {cmd => fake-gpu-operator/cmd}/device-plugin/main.go (100%) rename {cmd => fake-gpu-operator/cmd}/mig-faker/main.go (100%) rename {cmd => fake-gpu-operator/cmd}/nvidia-smi/main.go (100%) rename {cmd => fake-gpu-operator/cmd}/preloader/main.c (100%) rename {cmd => fake-gpu-operator/cmd}/status-exporter/main.go (100%) rename {cmd => fake-gpu-operator/cmd}/status-updater/main.go (100%) rename {cmd => fake-gpu-operator/cmd}/topology-server/main.go (100%) rename {design => fake-gpu-operator/design}/GPU Mock design.md (100%) rename {design => fake-gpu-operator/design}/MIG Metrics.md (100%) rename {design => fake-gpu-operator/design}/Node Autoscale.md (100%) rename {design => fake-gpu-operator/design}/RUN-4698.md (100%) rename {design => fake-gpu-operator/design}/samples/2.17/fractional_pod.yaml (100%) rename {design => fake-gpu-operator/design}/samples/2.17/fractional_pod_reservation.yaml (100%) rename {design => fake-gpu-operator/design}/samples/<2.9/fraction/metrics/1_workload.ini (100%) rename {design => fake-gpu-operator/design}/samples/<2.9/fraction/node/1_workload.yaml (100%) rename {design => fake-gpu-operator/design}/samples/<2.9/mig/metrics/4 Active Workloads.ini (100%) rename {design => fake-gpu-operator/design}/samples/<2.9/mig/metrics/Active 1g.5gb.ini (100%) rename {design => fake-gpu-operator/design}/samples/<2.9/mig/metrics/Active 2*1g.5gb + 2g.10gb.ini (100%) rename {design => fake-gpu-operator/design}/samples/<2.9/mig/metrics/Empty mig disabled.ini (100%) rename {design => fake-gpu-operator/design}/samples/<2.9/mig/metrics/Emtpy MIG enabled.ini (100%) rename {design => fake-gpu-operator/design}/samples/<2.9/mig/metrics/Idle 1g.5gb allocated.ini (100%) rename {design => fake-gpu-operator/design}/samples/<2.9/mig/node/3_instances.yaml (100%) rename {design => fake-gpu-operator/design}/samples/<2.9/mig/node/4_instances.yaml (100%) rename {design => fake-gpu-operator/design}/samples/<2.9/mig/pod/1g-5gb.yaml (100%) rename {design => fake-gpu-operator/design}/samples/>=2.9/mig/node/7g-40gb.yaml (100%) rename {design => fake-gpu-operator/design}/samples/>=2.9/mig/pod/7g-5gb.yaml (100%) rename {example => fake-gpu-operator/example}/deployment.yml (100%) rename go.mod => fake-gpu-operator/go.mod (100%) rename go.sum => fake-gpu-operator/go.sum (100%) rename {internal => fake-gpu-operator/internal}/common/app/app.go (100%) rename {internal => fake-gpu-operator/internal}/common/app/apprunner.go (100%) rename {internal => fake-gpu-operator/internal}/common/app/apprunner_test.go (100%) rename {internal => fake-gpu-operator/internal}/common/config/env.go (100%) rename {internal => fake-gpu-operator/internal}/common/constants/constants.go (100%) rename {internal => fake-gpu-operator/internal}/common/kubeclient/kubeclient.go (100%) rename {internal => fake-gpu-operator/internal}/common/kubeclient/kubeclient_mock.go (100%) rename {internal => fake-gpu-operator/internal}/common/topology/const.go (100%) rename {internal => fake-gpu-operator/internal}/common/topology/kubernetes.go (100%) rename {internal => fake-gpu-operator/internal}/common/topology/podGpuUsageStatusMap.go (100%) rename {internal => fake-gpu-operator/internal}/common/topology/range.go (100%) rename {internal => fake-gpu-operator/internal}/common/topology/types.go (100%) rename {internal => fake-gpu-operator/internal}/deviceplugin/device_plugin.go (100%) rename {internal => fake-gpu-operator/internal}/deviceplugin/fake_node.go (100%) rename {internal => fake-gpu-operator/internal}/deviceplugin/real_node.go (100%) rename {internal => fake-gpu-operator/internal}/migfaker/app.go (100%) rename {internal => fake-gpu-operator/internal}/migfaker/migfaker.go (100%) rename {internal => fake-gpu-operator/internal}/migfaker/migfaker_test.go (100%) rename {internal => fake-gpu-operator/internal}/migfaker/syncconfig.go (100%) rename {internal => fake-gpu-operator/internal}/migfaker/types.go (100%) rename {internal => fake-gpu-operator/internal}/status-exporter/app.go (100%) rename {internal => fake-gpu-operator/internal}/status-exporter/app_test.go (100%) rename {internal => fake-gpu-operator/internal}/status-exporter/export/exporter.go (100%) rename {internal => fake-gpu-operator/internal}/status-exporter/export/fs/exporter.go (100%) rename {internal => fake-gpu-operator/internal}/status-exporter/export/labels/exporter.go (100%) rename {internal => fake-gpu-operator/internal}/status-exporter/export/labels/exporter_test.go (100%) rename {internal => fake-gpu-operator/internal}/status-exporter/export/metrics/exporter.go (100%) rename {internal => fake-gpu-operator/internal}/status-exporter/export/metrics/exporter_test.go (100%) rename {internal => fake-gpu-operator/internal}/status-exporter/export/metrics/metrics.go (100%) rename {internal => fake-gpu-operator/internal}/status-exporter/watch/kubewatcher.go (100%) rename {internal => fake-gpu-operator/internal}/status-exporter/watch/watch.go (100%) rename {internal => fake-gpu-operator/internal}/status-updater/app.go (100%) rename {internal => fake-gpu-operator/internal}/status-updater/app_test.go (100%) rename {internal => fake-gpu-operator/internal}/status-updater/controllers/controller.go (100%) rename {internal => fake-gpu-operator/internal}/status-updater/controllers/node/controller.go (100%) rename {internal => fake-gpu-operator/internal}/status-updater/controllers/pod/controller.go (100%) rename {internal => fake-gpu-operator/internal}/status-updater/controllers/util/util.go (100%) rename {internal => fake-gpu-operator/internal}/status-updater/handlers/node/fake_node_deployments.go (100%) rename {internal => fake-gpu-operator/internal}/status-updater/handlers/node/handler.go (100%) rename {internal => fake-gpu-operator/internal}/status-updater/handlers/node/topology_cm.go (100%) rename {internal => fake-gpu-operator/internal}/status-updater/handlers/pod/dedicated_gpu_pod_handler.go (100%) rename {internal => fake-gpu-operator/internal}/status-updater/handlers/pod/gpu_reservation_pod_handler.go (100%) rename {internal => fake-gpu-operator/internal}/status-updater/handlers/pod/gpu_usage_calculator.go (100%) rename {internal => fake-gpu-operator/internal}/status-updater/handlers/pod/gpu_usage_calculator_test.go (100%) rename {internal => fake-gpu-operator/internal}/status-updater/handlers/pod/handle_suite_test.go (100%) rename {internal => fake-gpu-operator/internal}/status-updater/handlers/pod/handler.go (100%) rename {internal => fake-gpu-operator/internal}/status-updater/handlers/pod/shared_gpu_pod_handler.go (100%) rename {internal => fake-gpu-operator/internal}/status-updater/util/util.go (100%) rename {script => fake-gpu-operator/script}/uploadChart.sh (100%) diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 867e75c..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,182 +0,0 @@ -version: 2.1 -executors: - runai-executor: - docker: - - image: cimg/go:1.22.1 - -commands: - remote_docker: - steps: - - setup_remote_docker: - docker_layer_caching: true - version: 20.10.14 - install_project_dependencies: - steps: - - checkout - - run: - name: "Install project dependencies" - command: | - go mod download - go mod verify - - pre_docker_commands: - steps: - - remote_docker - - run: - name: "Extract gcloud private key to file" - command: echo "$STAGING_GCLOUD_SERVICE_JSON_CONTENT" | base64 -d > ./gcr_auth.json - - run: - name: "Docker gcr login" - command: cat gcr_auth.json | docker login -u _json_key --password-stdin https://gcr.io - - run: - name: "Docker Red Hat login" - command: echo "$REDHAT_DOCKER_PASS" | docker login -u $REDHAT_DOCKER_USER --password-stdin https://registry.redhat.io - - operator_update_version_in_helm_chart: - steps: - - run: - name: Update version in helm chart - command: | - TAG=${CIRCLE_TAG/v/''} - echo "Updating fake-gpu-operator new version number $TAG in runai helm chart directory..." - sed -i s/0.0.0/$TAG/g deploy/fake-gpu-operator/values.yaml - -jobs: - lint: - executor: runai-executor - steps: - - remote_docker - - install_project_dependencies - - run: - command: | - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.57.2 - golangci-lint run -v --timeout 5m - test: - executor: runai-executor - steps: - - remote_docker - - install_project_dependencies - - run: - name: "Create a temp directory for artifacts" - command: | - mkdir -p /tmp/artifacts - mkdir -p /tmp/artifacts/test-results - mkdir -p /tmp/artifacts/test-results/service-tests - - run: - name: "Run Service tests" - command: | - make test-all - - store_artifacts: - name: "Store artifacts" - path: /tmp/artifacts - - store_test_results: - name: "Store test results" - path: /tmp/artifacts/test-results - deploy_to_staging: - executor: runai-executor - steps: - - checkout - - pre_docker_commands - - run: - name: "Build Images" - environment: - CIRCLE_TAG: <> - command: | - DOCKER_REPO_BASE="gcr.io/run-ai-staging/fake-gpu-operator" - make images DOCKER_REPO_BASE=${DOCKER_REPO_BASE} DOCKER_TAG=${CIRCLE_TAG} - - run: - name: "Push to Google Cloud" - command: | - TAG=<> - DOCKER_REPO_BASE="gcr.io/run-ai-staging/fake-gpu-operator" - make push-all DOCKER_REPO_BASE=${DOCKER_REPO_BASE} DOCKER_TAG=${TAG} - deploy_to_production: - executor: runai-executor - steps: - - checkout - - pre_docker_commands - - run: - name: "Push to Google Cloud" - environment: - CIRCLE_TAG: <> - command: | - TAG=${CIRCLE_TAG/v/''} - DOCKER_REPO_BASE="gcr.io/run-ai-staging/fake-gpu-operator" - make images DOCKER_REPO_BASE=${DOCKER_REPO_BASE} DOCKER_TAG=${TAG} - make push-all DOCKER_REPO_BASE=${DOCKER_REPO_BASE} DOCKER_TAG=${TAG} - chart_build_staging: - working_directory: ~/go/src/github.com/run-ai/fake-gpu-operator - docker: - - image: google/cloud-sdk:276.0.0 # Later versions do not have pip - steps: - - checkout - - run: - name: Package and publish chart to staging - environment: - CIRCLE_SHA1: <> - CIRCLE_TAG: <> - PIPELINE_NUMBER: <> - REPO_URL: https://fake-gpu-operator.storage.googleapis.com/ - BUCKET: gs://fake-gpu-operator - UPLOAD_TARGET: prod - GCLOUD_PROJECT: run-ai-staging - command: | - chmod u+x script/uploadChart.sh - script/uploadChart.sh - -workflows: - version: 2 - production: - jobs: - - lint: - filters: - branches: - ignore: /.*/ - tags: - only: /^v.*/ - - test: - filters: - branches: - ignore: /.*/ - tags: - only: /^v.*/ - - deploy_to_production: - requires: - - lint - - test - filters: - branches: - ignore: /.*/ - tags: - only: /^v.*/ - - chart_build_staging: - requires: - - deploy_to_production - filters: - branches: - ignore: /.*/ - tags: - only: /^v.*/ - - test_lint_deploy: - jobs: - - lint: - filters: - tags: - ignore: /^v.*/ - - test: - filters: - tags: - ignore: /^v.*/ - - - deploy_to_staging: - requires: - - lint - - test - - filters: - tags: - ignore: /^v.*/ - branches: - only: - - main diff --git a/.github/workflows/ci-commit-master.yml b/.github/workflows/ci-commit-master.yml new file mode 100644 index 0000000..b63d4eb --- /dev/null +++ b/.github/workflows/ci-commit-master.yml @@ -0,0 +1,141 @@ +name: CI - commit to master + +on: + push: + paths-ignore: + - ".github/**" + branches: + - "master" + +concurrency: + group: ${{ github.head_ref || github.ref || github.run_id }} + cancel-in-progress: false + +permissions: + checks: write + contents: read + pull-requests: write + id-token: write + security-events: write + actions: read + repository-projects: read + +env: + ENVIRONMENT: "test" + CONTAINER_REGISTRY: "fake-gpu-operator-containers-test" + HELM_REGISTRY: "fake-gpu-operator-charts-test" + ENV_IN_A_CLICK_CLUSTER_NAME_PREFIX: "fgo" # fake-gpu-operator short + ARGO_CD_SECRET_NAME: "INFRA_ARGOCD_TOKEN_CICD" + ARGO_CD_TEAM_NAME: "cicd" + SERVICE_LIST: "fake-gpu-operator + fake-gpu-operator-chart" + +jobs: + env: + runs-on: ubuntu-latest + name: Set environment + outputs: + ENVIRONMENT: ${{ env.ENVIRONMENT }} + CONTAINER_REGISTRY: ${{ env.CONTAINER_REGISTRY }} + VERSION: ${{ steps.env.outputs.version }} + HELM_REGISTRY: ${{ env.HELM_REGISTRY }} + CLUSTER_NAME: ${{ steps.env.outputs.cluster_name }} + SERVICE_LIST: ${{ env.SERVICE_LIST }} + ARGO_CD_SECRET_NAME: ${{ env.ARGO_CD_SECRET_NAME }} + ARGO_CD_TEAM_NAME: ${{ env.ARGO_CD_TEAM_NAME }} + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + token: ${{ secrets.GIT_HUB_TOKEN }} + - name: set env + id: env + run: | + short_sha=$(echo ${{ github.sha }} | cut -c1-7) + branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} + branch_name_md5=$(echo $branch | md5sum | cut -d' ' -f1 ) + unique_branch_id=${branch_name_md5: -4} + branch=$(echo $branch | tr '[:upper:]' '[:lower:]' | sed -e 's/[^a-z0-9-]//g' -e 's/--+/--/g' -e 's/^-*//' -e 's/-*$//' -e 's/-*-/-/g' | cut -c1-21 ) + [ "${branch: -1}" == "-" ] && branch=${branch: : -1} # If branch ends with '-' removing last character + cluster_name=${{ env.ENV_IN_A_CLICK_CLUSTER_NAME_PREFIX }}-$unique_branch_id-$branch + echo cluster_name=$cluster_name >> $GITHUB_OUTPUT + version="0.0.0-$((GITHUB_RUN_NUMBER + 1000000)).$branch-$short_sha" + echo version=$version >> $GITHUB_OUTPUT + echo $version + echo $cluster_name + + get-service-list: + name: Get service list + needs: env + uses: run-ai/runai-actions/.github/workflows/get-service-list-v2.yml@main + secrets: inherit + with: + service_list: ${{ needs.env.outputs.SERVICE_LIST }} + + docker-login: + name: Docker login + uses: run-ai/runai-actions/.github/workflows/docker-login-v2.yaml@main + needs: env + secrets: inherit + with: + env: ${{ needs.env.outputs.ENVIRONMENT }} + + make: + name: Make + needs: [get-service-list, env, docker-login] + strategy: + fail-fast: false + matrix: + service_list: ${{ fromJson(needs.get-service-list.outputs.service_list).service_list }} + uses: run-ai/runai-actions/.github/workflows/make-v2.yml@main + secrets: inherit + with: + service_name: ${{ matrix.service_list }} + version: ${{ needs.env.outputs.VERSION }} + registry: ${{ needs.env.outputs.CONTAINER_REGISTRY }} + env: ${{ needs.env.outputs.ENVIRONMENT }} + + build-and-push: + name: Build and push + needs: [make, env, get-service-list] + uses: run-ai/runai-actions/.github/workflows/build-and-push-v2.yml@main + strategy: + fail-fast: false + matrix: + service_list: ${{ fromJson(needs.get-service-list.outputs.service_list).service_list }} + secrets: inherit + with: + service_name: ${{ matrix.service_list }} + container_registry: ${{ needs.env.outputs.CONTAINER_REGISTRY }} + helm_registry: ${{ needs.env.outputs.HELM_REGISTRY }} + version: ${{ needs.env.outputs.VERSION }} + env: ${{ needs.env.outputs.ENVIRONMENT }} + + setup-env: + name: Setup environment + needs: env + uses: run-ai/runai-actions/.github/workflows/create-env-in-a-click-v2.yml@main + secrets: inherit + with: + cluster_name: ${{ needs.env.outputs.CLUSTER_NAME }} + runai-cluster-enabled: false + runai-control-plane-enabled: false + secret-name: ${{ needs.env.outputs.ARGO_CD_SECRET_NAME }} + team-name: ${{ needs.env.outputs.ARGO_CD_TEAM_NAME }} + fake-gpu-version: ${{ needs.env.outputs.VERSION }} + wait-for-sync: true + + send-logs-to-loki: + name: Send logs to Loki + needs: + [ + env, + get-service-list, + docker-login, + setup-env, + make, + build-and-push, + ] + if: failure() || success() + uses: run-ai/runai-actions/.github/workflows/send-log-to-loki-v2.yml@main + secrets: inherit diff --git a/.github/workflows/ci-pr-to-master.yml b/.github/workflows/ci-pr-to-master.yml new file mode 100644 index 0000000..820ae9f --- /dev/null +++ b/.github/workflows/ci-pr-to-master.yml @@ -0,0 +1,140 @@ +name: CI - pull-request to master + +on: + pull_request: + paths-ignore: + - ".github/**" + branches: + - "master" + +concurrency: + group: ${{ github.head_ref || github.ref || github.run_id }} + cancel-in-progress: true + +permissions: + checks: write + contents: read + pull-requests: write + id-token: write + security-events: write + actions: read + repository-projects: read + +env: + ENVIRONMENT: "lab" + CONTAINER_REGISTRY: "fake-gpu-operator-containers-lab" + HELM_REGISTRY: "fake-gpu-operator-charts-lab" + ENV_IN_A_CLICK_CLUSTER_NAME_PREFIX: "fgo" # fake-gpu-operator short + ARGO_CD_SECRET_NAME: "INFRA_ARGOCD_TOKEN_CICD" + ARGO_CD_TEAM_NAME: "cicd" + SERVICE_LIST: "fake-gpu-operator + fake-gpu-operator-chart" + +jobs: + env: + runs-on: ubuntu-latest + name: Set environment + outputs: + ENVIRONMENT: ${{ env.ENVIRONMENT }} + CONTAINER_REGISTRY: ${{ env.CONTAINER_REGISTRY }} + VERSION: ${{ steps.env.outputs.version }} + HELM_REGISTRY: ${{ env.HELM_REGISTRY }} + CLUSTER_NAME: ${{ steps.env.outputs.cluster_name }} + SERVICE_LIST: ${{ env.SERVICE_LIST }} + ARGO_CD_SECRET_NAME: ${{ env.ARGO_CD_SECRET_NAME }} + ARGO_CD_TEAM_NAME: ${{ env.ARGO_CD_TEAM_NAME }} + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: set env + id: env + run: | + short_sha=$(echo ${{ github.event.pull_request.head.sha }} | cut -c1-7) + branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} + branch_name_md5=$(echo $branch | md5sum | cut -d' ' -f1 ) + unique_branch_id=${branch_name_md5: -4} + branch=$(echo $branch | tr '[:upper:]' '[:lower:]' | sed -e 's/[^a-z0-9-]//g' -e 's/--+/--/g' -e 's/^-*//' -e 's/-*$//' -e 's/-*-/-/g' | cut -c1-21 ) + [ "${branch: -1}" == "-" ] && branch=${branch: : -1} # If branch ends with '-' removing last character + cluster_name=${{ env.ENV_IN_A_CLICK_CLUSTER_NAME_PREFIX }}-$unique_branch_id-$branch + echo cluster_name=$cluster_name >> $GITHUB_OUTPUT + version="0.0.0-$((GITHUB_RUN_NUMBER + 1000000)).$branch-$short_sha" + echo version=$version >> $GITHUB_OUTPUT + echo $version + echo $cluster_name + + get-service-list: + name: Get service list + needs: env + uses: run-ai/runai-actions/.github/workflows/get-service-list-v2.yml@main + secrets: inherit + with: + service_list: ${{ needs.env.outputs.SERVICE_LIST }} + + docker-login: + name: Docker login + uses: run-ai/runai-actions/.github/workflows/docker-login-v2.yaml@main + needs: env + secrets: inherit + with: + env: ${{ needs.env.outputs.ENVIRONMENT }} + + make: + name: Make + needs: [get-service-list, env, docker-login] + strategy: + fail-fast: false + matrix: + service_list: ${{ fromJson(needs.get-service-list.outputs.service_list).service_list }} + uses: run-ai/runai-actions/.github/workflows/make-v2.yml@main + secrets: inherit + with: + service_name: ${{ matrix.service_list }} + version: ${{ needs.env.outputs.VERSION }} + registry: ${{ needs.env.outputs.CONTAINER_REGISTRY }} + env: ${{ needs.env.outputs.ENVIRONMENT }} + + build-and-push: + name: Build and push + needs: [make, env, get-service-list] + uses: run-ai/runai-actions/.github/workflows/build-and-push-v2.yml@main + strategy: + fail-fast: false + matrix: + service_list: ${{ fromJson(needs.get-service-list.outputs.service_list).service_list }} + secrets: inherit + with: + service_name: ${{ matrix.service_list }} + container_registry: ${{ needs.env.outputs.CONTAINER_REGISTRY }} + helm_registry: ${{ needs.env.outputs.HELM_REGISTRY }} + version: ${{ needs.env.outputs.VERSION }} + env: ${{ needs.env.outputs.ENVIRONMENT }} + + setup-env: + name: Setup environment + needs: env + uses: run-ai/runai-actions/.github/workflows/create-env-in-a-click-v2.yml@main + secrets: inherit + with: + cluster_name: ${{ needs.env.outputs.CLUSTER_NAME }} + runai-cluster-enabled: false + runai-control-plane-enabled: false + knative-operator: true + secret-name: ${{ needs.env.outputs.ARGO_CD_SECRET_NAME }} + team-name: ${{ needs.env.outputs.ARGO_CD_TEAM_NAME }} + fake-gpu-version: ${{ needs.env.outputs.VERSION }} + wait-for-sync: true + + send-logs-to-loki: + name: Send logs to Loki + needs: + [ + env, + get-service-list, + docker-login, + setup-env, + make, + build-and-push, + ] + if: failure() || success() + uses: run-ai/runai-actions/.github/workflows/send-log-to-loki-v2.yml@main + secrets: inherit diff --git a/.github/workflows/ci-pr-to-v.yml b/.github/workflows/ci-pr-to-v.yml new file mode 100644 index 0000000..9d72cd8 --- /dev/null +++ b/.github/workflows/ci-pr-to-v.yml @@ -0,0 +1,140 @@ +name: CI - pull-request to v* branch + +on: + pull_request: + paths-ignore: + - ".github/**" + branches: + - "v*.*" + +concurrency: + group: ${{ github.head_ref || github.ref || github.run_id }} + cancel-in-progress: false + +permissions: + checks: write + contents: read + pull-requests: write + id-token: write + security-events: write + actions: read + repository-projects: read + +env: + ENVIRONMENT: "lab" + CONTAINER_REGISTRY: "fake-gpu-operator-containers-lab" + HELM_REGISTRY: "fake-gpu-operator-charts-lab" + ENV_IN_A_CLICK_CLUSTER_NAME_PREFIX: "fgo" # fake-gpu-operator short + ARGO_CD_SECRET_NAME: "INFRA_ARGOCD_TOKEN_CICD" + ARGO_CD_TEAM_NAME: "cicd" + SERVICE_LIST: "fake-gpu-operator + fake-gpu-operator-chart" + +jobs: + env: + runs-on: ubuntu-latest + name: Set environment + outputs: + ENVIRONMENT: ${{ env.ENVIRONMENT }} + CONTAINER_REGISTRY: ${{ env.CONTAINER_REGISTRY }} + VERSION: ${{ steps.env.outputs.version }} + HELM_REGISTRY: ${{ env.HELM_REGISTRY }} + CLUSTER_NAME: ${{ steps.env.outputs.cluster_name }} + SERVICE_LIST: ${{ env.SERVICE_LIST }} + ARGO_CD_SECRET_NAME: ${{ env.ARGO_CD_SECRET_NAME }} + ARGO_CD_TEAM_NAME: ${{ env.ARGO_CD_TEAM_NAME }} + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: set env + id: env + run: | + short_sha=$(echo ${{ github.event.pull_request.head.sha }} | cut -c1-7) + branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} + branch_name_md5=$(echo $branch | md5sum | cut -d' ' -f1 ) + unique_branch_id=${branch_name_md5: -4} + branch=$(echo $branch | tr '[:upper:]' '[:lower:]' | sed -e 's/[^a-z0-9-]//g' -e 's/--+/--/g' -e 's/^-*//' -e 's/-*$//' -e 's/-*-/-/g' | cut -c1-21 ) + [ "${branch: -1}" == "-" ] && branch=${branch: : -1} # If branch ends with '-' removing last character + cluster_name=${{ env.ENV_IN_A_CLICK_CLUSTER_NAME_PREFIX }}-$unique_branch_id-$branch + echo cluster_name=$cluster_name >> $GITHUB_OUTPUT + version="0.0.0-$((GITHUB_RUN_NUMBER + 1000000)).$branch-$short_sha" + echo version=$version >> $GITHUB_OUTPUT + echo $version + echo $cluster_name + + get-service-list: + name: Get service list + needs: env + uses: run-ai/runai-actions/.github/workflows/get-service-list-v2.yml@main + secrets: inherit + with: + service_list: ${{ needs.env.outputs.SERVICE_LIST }} + + docker-login: + name: Docker login + uses: run-ai/runai-actions/.github/workflows/docker-login-v2.yaml@main + needs: env + secrets: inherit + with: + env: ${{ needs.env.outputs.ENVIRONMENT }} + + make: + name: Make + needs: [get-service-list, env, docker-login] + strategy: + fail-fast: false + matrix: + service_list: ${{ fromJson(needs.get-service-list.outputs.service_list).service_list }} + uses: run-ai/runai-actions/.github/workflows/make-v2.yml@main + secrets: inherit + with: + service_name: ${{ matrix.service_list }} + version: ${{ needs.env.outputs.VERSION }} + registry: ${{ needs.env.outputs.CONTAINER_REGISTRY }} + env: ${{ needs.env.outputs.ENVIRONMENT }} + + build-and-push: + name: Build and push + needs: [make, env, get-service-list] + uses: run-ai/runai-actions/.github/workflows/build-and-push-v2.yml@main + strategy: + fail-fast: false + matrix: + service_list: ${{ fromJson(needs.get-service-list.outputs.service_list).service_list }} + secrets: inherit + with: + service_name: ${{ matrix.service_list }} + container_registry: ${{ needs.env.outputs.CONTAINER_REGISTRY }} + helm_registry: ${{ needs.env.outputs.HELM_REGISTRY }} + version: ${{ needs.env.outputs.VERSION }} + env: ${{ needs.env.outputs.ENVIRONMENT }} + + setup-env: + name: Setup environment + needs: env + uses: run-ai/runai-actions/.github/workflows/create-env-in-a-click-v2.yml@main + secrets: inherit + with: + cluster_name: ${{ needs.env.outputs.CLUSTER_NAME }} + runai-cluster-enabled: false + runai-control-plane-enabled: false + knative-operator: true + secret-name: ${{ needs.env.outputs.ARGO_CD_SECRET_NAME }} + team-name: ${{ needs.env.outputs.ARGO_CD_TEAM_NAME }} + fake-gpu-version: ${{ needs.env.outputs.VERSION }} + wait-for-sync: true + + send-logs-to-loki: + name: Send logs to Loki + needs: + [ + env, + get-service-list, + docker-login, + setup-env, + make, + build-and-push, + ] + if: failure() || success() + uses: run-ai/runai-actions/.github/workflows/send-log-to-loki-v2.yml@main + secrets: inherit diff --git a/.github/workflows/ci-tag.yml b/.github/workflows/ci-tag.yml new file mode 100644 index 0000000..cebe0d9 --- /dev/null +++ b/.github/workflows/ci-tag.yml @@ -0,0 +1,205 @@ +name: CI - tag + +on: + push: + paths-ignore: + - ".github/**" + tags: + - "[0-9].*.*" + +concurrency: + group: ${{ github.head_ref || github.ref || github.run_id }} + cancel-in-progress: false + +permissions: + checks: write + contents: read + pull-requests: write + id-token: write + security-events: write + actions: read + repository-projects: read + +env: + STAGING_ENVIRONMENT: "staging" + PROD_ENVIRONMENT: "prod" + STAGING_CONTAINER_REGISTRY: "fake-gpu-operator-containers-staging" + PROD_CONTAINER_REGISTRY: "fake-gpu-operator-containers-prod" + STAGING_HELM_REGISTRY: "fake-gpu-operator-charts-staging" + PROD_HELM_REGISTRY: "fake-gpu-operator-charts-staging" + ENV_IN_A_CLICK_CLUSTER_NAME_PREFIX: "fgo" # fake-gpu-operator short + ARGO_CD_SECRET_NAME: "INFRA_ARGOCD_TOKEN_CICD" + ARGO_CD_TEAM_NAME: "cicd" + SERVICE_LIST: "fake-gpu-operator + fake-gpu-operator-chart" + +jobs: + env: + runs-on: ubuntu-latest + name: Set environment + outputs: + PROD_ENVIRONMENT: ${{ env.PROD_ENVIRONMENT }} + STAGING_ENVIRONMENT: ${{ env.STAGING_ENVIRONMENT }} + STAGING_CONTAINER_REGISTRY: ${{ env.STAGING_CONTAINER_REGISTRY }} + PROD_CONTAINER_REGISTRY: ${{ env.PROD_CONTAINER_REGISTRY }} + VERSION: ${{ steps.env.outputs.version }} + STAGING_HELM_REGISTRY: ${{ env.STAGING_HELM_REGISTRY }} + PROD_HELM_REGISTRY: ${{ env.PROD_HELM_REGISTRY }} + CLUSTER_NAME: ${{ steps.env.outputs.cluster_name }} + SERVICE_LIST: ${{ env.SERVICE_LIST }} + ARGO_CD_SECRET_NAME: ${{ env.ARGO_CD_SECRET_NAME }} + ARGO_CD_TEAM_NAME: ${{ env.ARGO_CD_TEAM_NAME }} + DEPLOY_TO_PROD: ${{ steps.env.outputs.deploy_to_prod }} + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: set env + id: env + run: | + branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} + branch_name_md5=$(echo $branch | md5sum | cut -d' ' -f1 ) + unique_branch_id=${branch_name_md5: -4} + branch=$(echo $branch | tr '[:upper:]' '[:lower:]' | sed -e 's/[^a-z0-9-]//g' -e 's/--+/--/g' -e 's/^-*//' -e 's/-*$//' -e 's/-*-/-/g' | cut -c1-21 ) + [ "${branch: -1}" == "-" ] && branch=${branch: : -1} # If branch ends with '-' removing last character + cluster_name=${{ env.ENV_IN_A_CLICK_CLUSTER_NAME_PREFIX }}-$unique_branch_id-$branch + echo cluster_name=$cluster_name >> $GITHUB_OUTPUT + version="${{ github.ref_name }}" + deploy_to_prod=false + if [[ $version =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then + echo "Deploying to production" + deploy_to_prod=true + fi + echo deploy_to_prod=$deploy_to_prod >> $GITHUB_OUTPUT + echo version=$version >> $GITHUB_OUTPUT + echo $version + echo $cluster_name + + get-service-list: + name: Get service list + needs: env + uses: run-ai/runai-actions/.github/workflows/get-service-list-v2.yml@main + secrets: inherit + with: + service_list: ${{ needs.env.outputs.SERVICE_LIST }} + + docker-login: + name: Docker login + uses: run-ai/runai-actions/.github/workflows/docker-login-v2.yaml@main + needs: env + secrets: inherit + with: + env: ${{ needs.env.outputs.STAGING_ENVIRONMENT }} + + make: + name: Make + needs: [get-service-list, env, docker-login] + strategy: + fail-fast: false + matrix: + service_list: ${{ fromJson(needs.get-service-list.outputs.service_list).service_list }} + uses: run-ai/runai-actions/.github/workflows/make-v2.yml@main + secrets: inherit + with: + service_name: ${{ matrix.service_list }} + version: ${{ needs.env.outputs.VERSION }} + registry: ${{ needs.env.outputs.STAGING_CONTAINER_REGISTRY }} + env: ${{ needs.env.outputs.STAGING_ENVIRONMENT }} + + build-and-push-staging: + name: Build and push + needs: [make, env, get-service-list] + uses: run-ai/runai-actions/.github/workflows/build-and-push-v2.yml@main + strategy: + fail-fast: false + matrix: + service_list: ${{ fromJson(needs.get-service-list.outputs.service_list).service_list }} + secrets: inherit + with: + service_name: ${{ matrix.service_list }} + container_registry: ${{ needs.env.outputs.STAGING_CONTAINER_REGISTRY }} + helm_registry: ${{ needs.env.outputs.STAGING_HELM_REGISTRY }} + version: ${{ needs.env.outputs.VERSION }} + env: ${{ needs.env.outputs.STAGING_ENVIRONMENT }} + + setup-env: + name: Setup environment + needs: env + uses: run-ai/runai-actions/.github/workflows/create-env-in-a-click-v2.yml@main + secrets: inherit + with: + cluster_name: ${{ needs.env.outputs.CLUSTER_NAME }} + runai-cluster-enabled: false + runai-control-plane-enabled: false + knative-operator: true + secret-name: ${{ needs.env.outputs.ARGO_CD_SECRET_NAME }} + team-name: ${{ needs.env.outputs.ARGO_CD_TEAM_NAME }} + fake-gpu-version: ${{ needs.env.outputs.VERSION }} + wait-for-sync: true + + wait-for-approval: + if: ${{ needs.env.outputs.DEPLOY_TO_PROD == 'true' }} + name: Wait for approval + environment: prod + needs: [setup-env, env] + runs-on: ubuntu-latest + steps: + - name: Wait for approval to deploy to production + run: | + echo "Waiting for approval" + + promote-artifacts: + name: Promote artifacts + needs: [env, wait-for-approval, get-service-list] + uses: run-ai/runai-actions/.github/workflows/promote-artifacts-v2.yml@main + secrets: inherit + strategy: + fail-fast: false + matrix: + service_list: ${{ fromJson(needs.get-service-list.outputs.service_list).service_list }} + with: + service_name: ${{ matrix.service_list }} + version: ${{ needs.env.outputs.VERSION }} + from_env: ${{ needs.env.outputs.STAGING_ENVIRONMENT }} + to_env: ${{ needs.env.outputs.PROD_ENVIRONMENT }} + from_container_registry: ${{ needs.env.outputs.STAGING_CONTAINER_REGISTRY }} + to_container_registry: ${{ needs.env.outputs.PROD_CONTAINER_REGISTRY }} + + make-prod: + name: Make fake-gpu-operator-chart only + needs: [promote-artifacts, env] + uses: run-ai/runai-actions/.github/workflows/make-v2.yml@main + secrets: inherit + with: + service_name: fake-gpu-operator-chart + version: ${{ needs.env.outputs.VERSION }} + registry: ${{ needs.env.outputs.PROD_CONTAINER_REGISTRY }} + env: ${{ needs.env.outputs.PROD_ENVIRONMENT }} + + build-and-push-prod: + name: Build and push fake-gpu-operator-chart only + needs: [env, make-prod] + uses: run-ai/runai-actions/.github/workflows/build-and-push-v2.yml@main + secrets: inherit + with: + service_name: fake-gpu-operator-chart + helm_registry: ${{ needs.env.outputs.PROD_HELM_REGISTRY }} + version: ${{ needs.env.outputs.VERSION }} + env: ${{ needs.env.outputs.PROD_ENVIRONMENT }} + + send-logs-to-loki: + name: Send logs to Loki + needs: + [ + env, + get-service-list, + docker-login, + setup-env, + make, + build-and-push-staging, + promote-artifacts, + make-prod, + build-and-push-prod, + ] + if: failure() || success() + uses: run-ai/runai-actions/.github/workflows/send-log-to-loki-v2.yml@main + secrets: inherit diff --git a/.vscode/configurationCache.log b/.vscode/configurationCache.log new file mode 100644 index 0000000..7c13280 --- /dev/null +++ b/.vscode/configurationCache.log @@ -0,0 +1 @@ +{"buildTargets":["/Users/dormull-or/Documents/Repositories/fake-gpu-operator/bin/ginkgo","build","build-shared","clean","deploy","deploy-all","image","image-test","images","push","push-all","restart","test-all"],"launchTargets":[],"customConfigurationProvider":{"workspaceBrowse":{"browsePath":[],"compilerArgs":[]},"fileIndex":[]}} \ No newline at end of file diff --git a/.vscode/dryrun.log b/.vscode/dryrun.log new file mode 100644 index 0000000..a0a8a0f --- /dev/null +++ b/.vscode/dryrun.log @@ -0,0 +1,5 @@ +make --dry-run --always-make --keep-going --print-directory +make: Entering directory `/Users/dormull-or/Documents/Repositories/fake-gpu-operator' +env GOOS=linux GOARCH=amd64 go build -o /Users/dormull-or/Documents/Repositories/fake-gpu-operator/bin/ ./cmd/"" +make: Leaving directory `/Users/dormull-or/Documents/Repositories/fake-gpu-operator' + diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..65e1ec0 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "makefile.extensionOutputFolder": "./.vscode" +} \ No newline at end of file diff --git a/.vscode/targets.log b/.vscode/targets.log new file mode 100644 index 0000000..86f1f50 --- /dev/null +++ b/.vscode/targets.log @@ -0,0 +1,376 @@ +make all --print-data-base --no-builtin-variables --no-builtin-rules --question +# GNU Make 3.81 +# Copyright (C) 2006 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. +# There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +# This program built for i386-apple-darwin11.3.0 + +make: *** No rule to make target `all'. Stop. + + +# Make data base, printed on Wed Jun 21 09:32:30 2023 + +# Variables + +# automatic +/dev/null || echo /Developer)/Makefiles +# environment +VSCODE_CODE_CACHE_PATH = /Users/dormull-or/Library/Application Support/Code/CachedData/695af097c7bd098fbf017ce3ac85e09bbc5dda06 +# environment +LOGNAME = dormull-or +# environment +APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL = 1 +# environment +ZSH = /Users/dormull-or/.oh-my-zsh +# environment +VSCODE_HANDLES_UNCAUGHT_ERRORS = true +# automatic +^D = $(patsubst %/,%,$(dir $^)) +# environment +XPC_FLAGS = 0x0 +# default +MAKE = $(MAKE_COMMAND) +# default +MAKECMDGOALS := all +# environment +SHLVL = 1 +# makefile (from `Makefile', line 1) +BUILD_DIR = $(shell pwd)/bin +# default +MAKE_VERSION := 3.81 +# environment +USER = dormull-or +# makefile +.DEFAULT_GOAL := build +# environment +LESS = -R +# automatic +%D = $(patsubst %/,%,$(dir $%)) +# environment +LE_WORKING_DIR = /Users/dormull-or/.acme.sh +# default +MAKE_COMMAND := /Library/Developer/CommandLineTools/usr/bin/make +# environment +GCR_SECRET = eyAiYXV0aHMiOiB7ICJnY3IuaW8iOiB7ICJhdXRoIjogIlgycHpiMjVmYTJWNU9uc2dJQ0owZVhCbElqb2dJbk5sY25acFkyVmZZV05qYjNWdWRDSXNJQ0FpY0hKdmFtVmpkRjlwWkNJNklDSnlkVzR0WVdrdGNISnZaQ0lzSUNBaWNISnBkbUYwWlY5clpYbGZhV1FpT2lBaVlXRXhabVpqTXpsaVpXUXhaamhqTURRMU1tSTVOMkV4T1RrMVptUmxObVprTXpNMk1tUTFNQ0lzSUNBaWNISnBkbUYwWlY5clpYa2lPaUFpTFMwdExTMUNSVWRKVGlCUVVrbFdRVlJGSUV0RldTMHRMUzB0WEc1TlNVbEZkbEZKUWtGRVFVNUNaMnR4YUd0cFJ6bDNNRUpCVVVWR1FVRlRRMEpMWTNkbloxTnFRV2RGUVVGdlNVSkJVVVJLZDNGQ1NFVmliVll2UTAxNVhHNTFlW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B2Ynk5dllYVjBhREl2WVhWMGFDSXNJQ0FpZEc5clpXNWZkWEpwSWpvZ0ltaDBkSEJ6T2k4dmIyRjFkR2d5TG1kdmIyZHNaV0Z3YVhNdVkyOXRMM1J2YTJWdUlpd2dJQ0poZFhSb1gzQnliM1pwWkdWeVgzZzFNRGxmWTJWeWRGOTFjbXdpT2lBaWFIUjBjSE02THk5M2QzY3VaMjl2WjJ4bFlYQnBjeTVqYjIwdmIyRjFkR2d5TDNZeEwyTmxjblJ6SWl3Z0lDSmpiR2xsYm5SZmVEVXdPVjlqWlhKMFgzVnliQ0k2SUNKb2RIUndjem92TDNkM2R5NW5iMjluYkdWaGNHbHpMbU52YlM5eWIySnZkQzkyTVM5dFpYUmhaR0YwWVM5NE5UQTVMMmRqY2kxd2RXeHNKVFF3Y25WdUxXRnBMWEJ5YjJRdWFXRnRMbWR6WlhKMmFXTmxZV05qYjNWdWRDNWpiMjBpZlE9PSIgfSB9LCAiSHR0cEhlYWRlcnMiOiB7ICJVc2VyLUFnZW50IjogIkRvY2tlci1DbGllbnQvMTkuMDMuNSAoZGFyd2luKSIgfX0= +# default +.VARIABLES := +# environment +TMPDIR = /var/folders/l4/ygb314n15p77z5cvq_b2fccr0000gn/T/ +# automatic +*F = $(notdir $*) +# environment +VSCODE_IPC_HOOK = /Users/dormull-or/Library/Application Support/Code/1.79-main.sock +# environment +MallocNanoZone = 0 +# makefile +MAKEFLAGS = Rrqp +# environment +MFLAGS = -Rrqp +# automatic +*D = $(patsubst %/,%,$(dir $*)) +# environment +XPC_SERVICE_NAME = application.com.microsoft.VSCode.50967437.50967443 +# environment +HOMEBREW_PREFIX = /opt/homebrew + +# automatic ++D = $(patsubst %/,%,$(dir $+)) +# automatic ++F = $(notdir $+) +# environment +HOMEBREW_REPOSITORY = /opt/homebrew +# environment +__CF_USER_TEXT_ENCODING = 0x1F5:0x0:0x0 +# environment +COMMAND_MODE = unix2003 +# default +MAKEFILES := +# makefile (from `Makefile', line 2) +COMPONENT = "$1" +# automatic +=2.9/mig/node/7g-40gb.yaml b/fake-gpu-operator/design/samples/>=2.9/mig/node/7g-40gb.yaml similarity index 100% rename from design/samples/>=2.9/mig/node/7g-40gb.yaml rename to fake-gpu-operator/design/samples/>=2.9/mig/node/7g-40gb.yaml diff --git a/design/samples/>=2.9/mig/pod/7g-5gb.yaml b/fake-gpu-operator/design/samples/>=2.9/mig/pod/7g-5gb.yaml similarity index 100% rename from design/samples/>=2.9/mig/pod/7g-5gb.yaml rename to fake-gpu-operator/design/samples/>=2.9/mig/pod/7g-5gb.yaml diff --git a/example/deployment.yml b/fake-gpu-operator/example/deployment.yml similarity index 100% rename from example/deployment.yml rename to fake-gpu-operator/example/deployment.yml diff --git a/go.mod b/fake-gpu-operator/go.mod similarity index 100% rename from go.mod rename to fake-gpu-operator/go.mod diff --git a/go.sum b/fake-gpu-operator/go.sum similarity index 100% rename from go.sum rename to fake-gpu-operator/go.sum diff --git a/internal/common/app/app.go b/fake-gpu-operator/internal/common/app/app.go similarity index 100% rename from internal/common/app/app.go rename to fake-gpu-operator/internal/common/app/app.go diff --git a/internal/common/app/apprunner.go b/fake-gpu-operator/internal/common/app/apprunner.go similarity index 100% rename from internal/common/app/apprunner.go rename to fake-gpu-operator/internal/common/app/apprunner.go diff --git a/internal/common/app/apprunner_test.go b/fake-gpu-operator/internal/common/app/apprunner_test.go similarity index 100% rename from internal/common/app/apprunner_test.go rename to fake-gpu-operator/internal/common/app/apprunner_test.go diff --git a/internal/common/config/env.go b/fake-gpu-operator/internal/common/config/env.go similarity index 100% rename from internal/common/config/env.go rename to fake-gpu-operator/internal/common/config/env.go diff --git a/internal/common/constants/constants.go b/fake-gpu-operator/internal/common/constants/constants.go similarity index 100% rename from internal/common/constants/constants.go rename to fake-gpu-operator/internal/common/constants/constants.go diff --git a/internal/common/kubeclient/kubeclient.go b/fake-gpu-operator/internal/common/kubeclient/kubeclient.go similarity index 100% rename from internal/common/kubeclient/kubeclient.go rename to fake-gpu-operator/internal/common/kubeclient/kubeclient.go diff --git a/internal/common/kubeclient/kubeclient_mock.go b/fake-gpu-operator/internal/common/kubeclient/kubeclient_mock.go similarity index 100% rename from internal/common/kubeclient/kubeclient_mock.go rename to fake-gpu-operator/internal/common/kubeclient/kubeclient_mock.go diff --git a/internal/common/topology/const.go b/fake-gpu-operator/internal/common/topology/const.go similarity index 100% rename from internal/common/topology/const.go rename to fake-gpu-operator/internal/common/topology/const.go diff --git a/internal/common/topology/kubernetes.go b/fake-gpu-operator/internal/common/topology/kubernetes.go similarity index 100% rename from internal/common/topology/kubernetes.go rename to fake-gpu-operator/internal/common/topology/kubernetes.go diff --git a/internal/common/topology/podGpuUsageStatusMap.go b/fake-gpu-operator/internal/common/topology/podGpuUsageStatusMap.go similarity index 100% rename from internal/common/topology/podGpuUsageStatusMap.go rename to fake-gpu-operator/internal/common/topology/podGpuUsageStatusMap.go diff --git a/internal/common/topology/range.go b/fake-gpu-operator/internal/common/topology/range.go similarity index 100% rename from internal/common/topology/range.go rename to fake-gpu-operator/internal/common/topology/range.go diff --git a/internal/common/topology/types.go b/fake-gpu-operator/internal/common/topology/types.go similarity index 100% rename from internal/common/topology/types.go rename to fake-gpu-operator/internal/common/topology/types.go diff --git a/internal/deviceplugin/device_plugin.go b/fake-gpu-operator/internal/deviceplugin/device_plugin.go similarity index 100% rename from internal/deviceplugin/device_plugin.go rename to fake-gpu-operator/internal/deviceplugin/device_plugin.go diff --git a/internal/deviceplugin/fake_node.go b/fake-gpu-operator/internal/deviceplugin/fake_node.go similarity index 100% rename from internal/deviceplugin/fake_node.go rename to fake-gpu-operator/internal/deviceplugin/fake_node.go diff --git a/internal/deviceplugin/real_node.go b/fake-gpu-operator/internal/deviceplugin/real_node.go similarity index 100% rename from internal/deviceplugin/real_node.go rename to fake-gpu-operator/internal/deviceplugin/real_node.go diff --git a/internal/migfaker/app.go b/fake-gpu-operator/internal/migfaker/app.go similarity index 100% rename from internal/migfaker/app.go rename to fake-gpu-operator/internal/migfaker/app.go diff --git a/internal/migfaker/migfaker.go b/fake-gpu-operator/internal/migfaker/migfaker.go similarity index 100% rename from internal/migfaker/migfaker.go rename to fake-gpu-operator/internal/migfaker/migfaker.go diff --git a/internal/migfaker/migfaker_test.go b/fake-gpu-operator/internal/migfaker/migfaker_test.go similarity index 100% rename from internal/migfaker/migfaker_test.go rename to fake-gpu-operator/internal/migfaker/migfaker_test.go diff --git a/internal/migfaker/syncconfig.go b/fake-gpu-operator/internal/migfaker/syncconfig.go similarity index 100% rename from internal/migfaker/syncconfig.go rename to fake-gpu-operator/internal/migfaker/syncconfig.go diff --git a/internal/migfaker/types.go b/fake-gpu-operator/internal/migfaker/types.go similarity index 100% rename from internal/migfaker/types.go rename to fake-gpu-operator/internal/migfaker/types.go diff --git a/internal/status-exporter/app.go b/fake-gpu-operator/internal/status-exporter/app.go similarity index 100% rename from internal/status-exporter/app.go rename to fake-gpu-operator/internal/status-exporter/app.go diff --git a/internal/status-exporter/app_test.go b/fake-gpu-operator/internal/status-exporter/app_test.go similarity index 100% rename from internal/status-exporter/app_test.go rename to fake-gpu-operator/internal/status-exporter/app_test.go diff --git a/internal/status-exporter/export/exporter.go b/fake-gpu-operator/internal/status-exporter/export/exporter.go similarity index 100% rename from internal/status-exporter/export/exporter.go rename to fake-gpu-operator/internal/status-exporter/export/exporter.go diff --git a/internal/status-exporter/export/fs/exporter.go b/fake-gpu-operator/internal/status-exporter/export/fs/exporter.go similarity index 100% rename from internal/status-exporter/export/fs/exporter.go rename to fake-gpu-operator/internal/status-exporter/export/fs/exporter.go diff --git a/internal/status-exporter/export/labels/exporter.go b/fake-gpu-operator/internal/status-exporter/export/labels/exporter.go similarity index 100% rename from internal/status-exporter/export/labels/exporter.go rename to fake-gpu-operator/internal/status-exporter/export/labels/exporter.go diff --git a/internal/status-exporter/export/labels/exporter_test.go b/fake-gpu-operator/internal/status-exporter/export/labels/exporter_test.go similarity index 100% rename from internal/status-exporter/export/labels/exporter_test.go rename to fake-gpu-operator/internal/status-exporter/export/labels/exporter_test.go diff --git a/internal/status-exporter/export/metrics/exporter.go b/fake-gpu-operator/internal/status-exporter/export/metrics/exporter.go similarity index 100% rename from internal/status-exporter/export/metrics/exporter.go rename to fake-gpu-operator/internal/status-exporter/export/metrics/exporter.go diff --git a/internal/status-exporter/export/metrics/exporter_test.go b/fake-gpu-operator/internal/status-exporter/export/metrics/exporter_test.go similarity index 100% rename from internal/status-exporter/export/metrics/exporter_test.go rename to fake-gpu-operator/internal/status-exporter/export/metrics/exporter_test.go diff --git a/internal/status-exporter/export/metrics/metrics.go b/fake-gpu-operator/internal/status-exporter/export/metrics/metrics.go similarity index 100% rename from internal/status-exporter/export/metrics/metrics.go rename to fake-gpu-operator/internal/status-exporter/export/metrics/metrics.go diff --git a/internal/status-exporter/watch/kubewatcher.go b/fake-gpu-operator/internal/status-exporter/watch/kubewatcher.go similarity index 100% rename from internal/status-exporter/watch/kubewatcher.go rename to fake-gpu-operator/internal/status-exporter/watch/kubewatcher.go diff --git a/internal/status-exporter/watch/watch.go b/fake-gpu-operator/internal/status-exporter/watch/watch.go similarity index 100% rename from internal/status-exporter/watch/watch.go rename to fake-gpu-operator/internal/status-exporter/watch/watch.go diff --git a/internal/status-updater/app.go b/fake-gpu-operator/internal/status-updater/app.go similarity index 100% rename from internal/status-updater/app.go rename to fake-gpu-operator/internal/status-updater/app.go diff --git a/internal/status-updater/app_test.go b/fake-gpu-operator/internal/status-updater/app_test.go similarity index 100% rename from internal/status-updater/app_test.go rename to fake-gpu-operator/internal/status-updater/app_test.go diff --git a/internal/status-updater/controllers/controller.go b/fake-gpu-operator/internal/status-updater/controllers/controller.go similarity index 100% rename from internal/status-updater/controllers/controller.go rename to fake-gpu-operator/internal/status-updater/controllers/controller.go diff --git a/internal/status-updater/controllers/node/controller.go b/fake-gpu-operator/internal/status-updater/controllers/node/controller.go similarity index 100% rename from internal/status-updater/controllers/node/controller.go rename to fake-gpu-operator/internal/status-updater/controllers/node/controller.go diff --git a/internal/status-updater/controllers/pod/controller.go b/fake-gpu-operator/internal/status-updater/controllers/pod/controller.go similarity index 100% rename from internal/status-updater/controllers/pod/controller.go rename to fake-gpu-operator/internal/status-updater/controllers/pod/controller.go diff --git a/internal/status-updater/controllers/util/util.go b/fake-gpu-operator/internal/status-updater/controllers/util/util.go similarity index 100% rename from internal/status-updater/controllers/util/util.go rename to fake-gpu-operator/internal/status-updater/controllers/util/util.go diff --git a/internal/status-updater/handlers/node/fake_node_deployments.go b/fake-gpu-operator/internal/status-updater/handlers/node/fake_node_deployments.go similarity index 100% rename from internal/status-updater/handlers/node/fake_node_deployments.go rename to fake-gpu-operator/internal/status-updater/handlers/node/fake_node_deployments.go diff --git a/internal/status-updater/handlers/node/handler.go b/fake-gpu-operator/internal/status-updater/handlers/node/handler.go similarity index 100% rename from internal/status-updater/handlers/node/handler.go rename to fake-gpu-operator/internal/status-updater/handlers/node/handler.go diff --git a/internal/status-updater/handlers/node/topology_cm.go b/fake-gpu-operator/internal/status-updater/handlers/node/topology_cm.go similarity index 100% rename from internal/status-updater/handlers/node/topology_cm.go rename to fake-gpu-operator/internal/status-updater/handlers/node/topology_cm.go diff --git a/internal/status-updater/handlers/pod/dedicated_gpu_pod_handler.go b/fake-gpu-operator/internal/status-updater/handlers/pod/dedicated_gpu_pod_handler.go similarity index 100% rename from internal/status-updater/handlers/pod/dedicated_gpu_pod_handler.go rename to fake-gpu-operator/internal/status-updater/handlers/pod/dedicated_gpu_pod_handler.go diff --git a/internal/status-updater/handlers/pod/gpu_reservation_pod_handler.go b/fake-gpu-operator/internal/status-updater/handlers/pod/gpu_reservation_pod_handler.go similarity index 100% rename from internal/status-updater/handlers/pod/gpu_reservation_pod_handler.go rename to fake-gpu-operator/internal/status-updater/handlers/pod/gpu_reservation_pod_handler.go diff --git a/internal/status-updater/handlers/pod/gpu_usage_calculator.go b/fake-gpu-operator/internal/status-updater/handlers/pod/gpu_usage_calculator.go similarity index 100% rename from internal/status-updater/handlers/pod/gpu_usage_calculator.go rename to fake-gpu-operator/internal/status-updater/handlers/pod/gpu_usage_calculator.go diff --git a/internal/status-updater/handlers/pod/gpu_usage_calculator_test.go b/fake-gpu-operator/internal/status-updater/handlers/pod/gpu_usage_calculator_test.go similarity index 100% rename from internal/status-updater/handlers/pod/gpu_usage_calculator_test.go rename to fake-gpu-operator/internal/status-updater/handlers/pod/gpu_usage_calculator_test.go diff --git a/internal/status-updater/handlers/pod/handle_suite_test.go b/fake-gpu-operator/internal/status-updater/handlers/pod/handle_suite_test.go similarity index 100% rename from internal/status-updater/handlers/pod/handle_suite_test.go rename to fake-gpu-operator/internal/status-updater/handlers/pod/handle_suite_test.go diff --git a/internal/status-updater/handlers/pod/handler.go b/fake-gpu-operator/internal/status-updater/handlers/pod/handler.go similarity index 100% rename from internal/status-updater/handlers/pod/handler.go rename to fake-gpu-operator/internal/status-updater/handlers/pod/handler.go diff --git a/internal/status-updater/handlers/pod/shared_gpu_pod_handler.go b/fake-gpu-operator/internal/status-updater/handlers/pod/shared_gpu_pod_handler.go similarity index 100% rename from internal/status-updater/handlers/pod/shared_gpu_pod_handler.go rename to fake-gpu-operator/internal/status-updater/handlers/pod/shared_gpu_pod_handler.go diff --git a/internal/status-updater/util/util.go b/fake-gpu-operator/internal/status-updater/util/util.go similarity index 100% rename from internal/status-updater/util/util.go rename to fake-gpu-operator/internal/status-updater/util/util.go diff --git a/script/uploadChart.sh b/fake-gpu-operator/script/uploadChart.sh similarity index 100% rename from script/uploadChart.sh rename to fake-gpu-operator/script/uploadChart.sh From 9f4b4359f00c1b6c86f2f6b9b6960f98385fb739 Mon Sep 17 00:00:00 2001 From: dormullor <105583031+dormullor@users.noreply.github.com> Date: Thu, 25 Apr 2024 10:04:30 +0300 Subject: [PATCH 2/2] Delete .vscode directory --- .vscode/configurationCache.log | 1 - .vscode/dryrun.log | 5 - .vscode/settings.json | 3 - .vscode/targets.log | 376 --------------------------------- 4 files changed, 385 deletions(-) delete mode 100644 .vscode/configurationCache.log delete mode 100644 .vscode/dryrun.log delete mode 100644 .vscode/settings.json delete mode 100644 .vscode/targets.log diff --git a/.vscode/configurationCache.log b/.vscode/configurationCache.log deleted file mode 100644 index 7c13280..0000000 --- a/.vscode/configurationCache.log +++ /dev/null @@ -1 +0,0 @@ -{"buildTargets":["/Users/dormull-or/Documents/Repositories/fake-gpu-operator/bin/ginkgo","build","build-shared","clean","deploy","deploy-all","image","image-test","images","push","push-all","restart","test-all"],"launchTargets":[],"customConfigurationProvider":{"workspaceBrowse":{"browsePath":[],"compilerArgs":[]},"fileIndex":[]}} \ No newline at end of file diff --git a/.vscode/dryrun.log b/.vscode/dryrun.log deleted file mode 100644 index a0a8a0f..0000000 --- a/.vscode/dryrun.log +++ /dev/null @@ -1,5 +0,0 @@ -make --dry-run --always-make --keep-going --print-directory -make: Entering directory `/Users/dormull-or/Documents/Repositories/fake-gpu-operator' -env GOOS=linux GOARCH=amd64 go build -o /Users/dormull-or/Documents/Repositories/fake-gpu-operator/bin/ ./cmd/"" -make: Leaving directory `/Users/dormull-or/Documents/Repositories/fake-gpu-operator' - diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 65e1ec0..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "makefile.extensionOutputFolder": "./.vscode" -} \ No newline at end of file diff --git a/.vscode/targets.log b/.vscode/targets.log deleted file mode 100644 index 86f1f50..0000000 --- a/.vscode/targets.log +++ /dev/null @@ -1,376 +0,0 @@ -make all --print-data-base --no-builtin-variables --no-builtin-rules --question -# GNU Make 3.81 -# Copyright (C) 2006 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. -# There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -# This program built for i386-apple-darwin11.3.0 - -make: *** No rule to make target `all'. Stop. - - -# Make data base, printed on Wed Jun 21 09:32:30 2023 - -# Variables - -# automatic -/dev/null || echo /Developer)/Makefiles -# environment -VSCODE_CODE_CACHE_PATH = /Users/dormull-or/Library/Application Support/Code/CachedData/695af097c7bd098fbf017ce3ac85e09bbc5dda06 -# environment -LOGNAME = dormull-or -# environment -APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL = 1 -# environment -ZSH = /Users/dormull-or/.oh-my-zsh -# environment -VSCODE_HANDLES_UNCAUGHT_ERRORS = true -# automatic -^D = $(patsubst %/,%,$(dir $^)) -# environment -XPC_FLAGS = 0x0 -# default -MAKE = $(MAKE_COMMAND) -# default -MAKECMDGOALS := all -# environment -SHLVL = 1 -# makefile (from `Makefile', line 1) -BUILD_DIR = $(shell pwd)/bin -# default -MAKE_VERSION := 3.81 -# environment -USER = dormull-or -# makefile -.DEFAULT_GOAL := build -# environment -LESS = -R -# automatic -%D = $(patsubst %/,%,$(dir $%)) -# environment -LE_WORKING_DIR = /Users/dormull-or/.acme.sh -# default -MAKE_COMMAND := /Library/Developer/CommandLineTools/usr/bin/make -# environment -GCR_SECRET = eyAiYXV0aHMiOiB7ICJnY3IuaW8iOiB7ICJhdXRoIjogIlgycHpiMjVmYTJWNU9uc2dJQ0owZVhCbElqb2dJbk5sY25acFkyVmZZV05qYjNWdWRDSXNJQ0FpY0hKdmFtVmpkRjlwWkNJNklDSnlkVzR0WVdrdGNISnZaQ0lzSUNBaWNISnBkbUYwWlY5clpYbGZhV1FpT2lBaVlXRXhabVpqTXpsaVpXUXhaamhqTURRMU1tSTVOMkV4T1RrMVptUmxObVprTXpNMk1tUTFNQ0lzSUNBaWNISnBkbUYwWlY5clpYa2lPaUFpTFMwdExTMUNSVWRKVGlCUVVrbFdRVlJGSUV0RldTMHRMUzB0WEc1TlNVbEZkbEZKUWtGRVFVNUNaMnR4YUd0cFJ6bDNNRUpCVVVWR1FVRlRRMEpMWTNkbloxTnFRV2RGUVVGdlNVSkJVVVJLZDNGQ1NFVmliVll2UTAxNVhHNTFlWEYxYlVKcVZtOHlNRUpWYzJaUGFEWjFkRXRDVGpoUVVrUTBhRmt6Wm5Wek5rbHJaelZEYmtrMVVVZDJ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kR2d5TG1kdmIyZHNaV0Z3YVhNdVkyOXRMM1J2YTJWdUlpd2dJQ0poZFhSb1gzQnliM1pwWkdWeVgzZzFNRGxmWTJWeWRGOTFjbXdpT2lBaWFIUjBjSE02THk5M2QzY3VaMjl2WjJ4bFlYQnBjeTVqYjIwdmIyRjFkR2d5TDNZeEwyTmxjblJ6SWl3Z0lDSmpiR2xsYm5SZmVEVXdPVjlqWlhKMFgzVnliQ0k2SUNKb2RIUndjem92TDNkM2R5NW5iMjluYkdWaGNHbHpMbU52YlM5eWIySnZkQzkyTVM5dFpYUmhaR0YwWVM5NE5UQTVMMmRqY2kxd2RXeHNKVFF3Y25WdUxXRnBMWEJ5YjJRdWFXRnRMbWR6WlhKMmFXTmxZV05qYjNWdWRDNWpiMjBpZlE9PSIgfSB9LCAiSHR0cEhlYWRlcnMiOiB7ICJVc2VyLUFnZW50IjogIkRvY2tlci1DbGllbnQvMTkuMDMuNSAoZGFyd2luKSIgfX0= -# default -.VARIABLES := -# environment -TMPDIR = /var/folders/l4/ygb314n15p77z5cvq_b2fccr0000gn/T/ -# automatic -*F = $(notdir $*) -# environment -VSCODE_IPC_HOOK = /Users/dormull-or/Library/Application Support/Code/1.79-main.sock -# environment -MallocNanoZone = 0 -# makefile -MAKEFLAGS = Rrqp -# environment -MFLAGS = -Rrqp -# automatic -*D = $(patsubst %/,%,$(dir $*)) -# environment -XPC_SERVICE_NAME = application.com.microsoft.VSCode.50967437.50967443 -# environment -HOMEBREW_PREFIX = /opt/homebrew - -# automatic -+D = $(patsubst %/,%,$(dir $+)) -# automatic -+F = $(notdir $+) -# environment -HOMEBREW_REPOSITORY = /opt/homebrew -# environment -__CF_USER_TEXT_ENCODING = 0x1F5:0x0:0x0 -# environment -COMMAND_MODE = unix2003 -# default -MAKEFILES := -# makefile (from `Makefile', line 2) -COMPONENT = "$1" -# automatic -