From 77ffbae065b70f686f1b98d8dd6f206dab429521 Mon Sep 17 00:00:00 2001 From: Ahree Hong Date: Mon, 22 Jul 2024 22:27:33 -0700 Subject: [PATCH] Add presubmits for dhcp project --- go.sum | 2 - .../dhcp-presubmits.yaml | 70 +++++++++++++++++++ .../dhcp-presubmits.yaml | 12 ++++ 3 files changed, 82 insertions(+), 2 deletions(-) create mode 100644 jobs/aws/eks-anywhere-build-tooling/dhcp-presubmits.yaml create mode 100644 templater/jobs/presubmit/eks-anywhere-build-tooling/dhcp-presubmits.yaml diff --git a/go.sum b/go.sum index a291ce1e..dd919ffa 100644 --- a/go.sum +++ b/go.sum @@ -91,8 +91,6 @@ github.com/aws/aws-sdk-go v1.19.18/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpi github.com/aws/aws-sdk-go v1.19.45/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.38.49 h1:E31vxjCe6a5I+mJLmUGaZobiWmg9KdWaud9IfceYeYQ= github.com/aws/aws-sdk-go v1.38.49/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= -github.com/aws/eks-distro-prow-jobs v0.0.0-20231121185634-6ba53d350673 h1:XiHHZUoUM4s2SqOzZbYevh44pvyU6is9E2ZtLePRRz8= -github.com/aws/eks-distro-prow-jobs v0.0.0-20231121185634-6ba53d350673/go.mod h1:Piilw12Sy+npxRwwBM7ApgaWz2Zk8NqHqdFpLhkVi/8= github.com/aws/eks-distro-prow-jobs v0.0.0-20240531063932-da35904783d2 h1:Cb7Cnf3U9/XYKpbXQOD4hcU05ean8iL4WxRPsDUQNk8= github.com/aws/eks-distro-prow-jobs v0.0.0-20240531063932-da35904783d2/go.mod h1:YQynplr1bQPGD3ZWznZ2m6DVhT1/djrRHGMS9uLrYKk= github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= diff --git a/jobs/aws/eks-anywhere-build-tooling/dhcp-presubmits.yaml b/jobs/aws/eks-anywhere-build-tooling/dhcp-presubmits.yaml new file mode 100644 index 00000000..a209858e --- /dev/null +++ b/jobs/aws/eks-anywhere-build-tooling/dhcp-presubmits.yaml @@ -0,0 +1,70 @@ +# Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +# +# 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. +# +################################################################################ +# IMPORTANT: This Prowjob was generated by running `make prowjobs -C templater`. +# DO NOT EDIT THIS FILE BY HAND! Refer to docs/prowjobs.md for instructions on +# how to add a new Prowjob or update an existing Prowjob. +################################################################################ + +presubmits: + aws/eks-anywhere-build-tooling: + - name: dhcp-presubmit + always_run: false + run_if_changed: "^build/lib/.*|Common.mk|projects/isc-projects/dhcp/.*" + cluster: "prow-presubmits-cluster" + error_on_eviction: true + max_concurrency: 10 + skip_report: false + decoration_config: + gcs_configuration: + bucket: s3://prowpresubmitsdataclusterstack-prowbucket7c73355c-vfwwxd2eb4gp + path_strategy: explicit + s3_credentials_secret: s3-credentials + labels: + disk-usage: "true" + spec: + serviceaccountName: presubmits-build-account + automountServiceAccountToken: false + containers: + - name: build-container + image: public.ecr.aws/eks-distro-build-tooling/builder-base:standard-9be578bba75e08f01086ce11820e3ab6cdf63601.2 + + command: + - bash + - -c + - > + trap 'touch /status/done && rm -rf /home/prow/go/src/' EXIT + && + if $(make check-project-path-exists); then make build -C $PROJECT_PATH; fi + env: + - name: PROJECT_PATH + value: "projects/isc-projects/dhcp" + - name: GITHUB_TOKEN + valueFrom: + secretKeyRef: + name: public-access-github-token + key: token + - name: ARTIFACTS_BUCKET + value: "s3://projectbuildpipeline-857-pipelineoutputartifactsb-10ajmk30khe3f" + resources: + requests: + memory: "16Gi" + cpu: "4" + - command: + - sh + args: + - /disk-usage-script/entrypoint.sh + image: public.ecr.aws/amazonlinux/amazonlinux:2 + name: disk-monitor diff --git a/templater/jobs/presubmit/eks-anywhere-build-tooling/dhcp-presubmits.yaml b/templater/jobs/presubmit/eks-anywhere-build-tooling/dhcp-presubmits.yaml new file mode 100644 index 00000000..b90eb446 --- /dev/null +++ b/templater/jobs/presubmit/eks-anywhere-build-tooling/dhcp-presubmits.yaml @@ -0,0 +1,12 @@ +jobName: dhcp-presubmit +runIfChanged: ^build/lib/.*|Common.mk|projects/isc-projects/dhcp/.* +commands: +- if $(make check-project-path-exists); then make build -C $PROJECT_PATH; fi +projectPath: projects/isc-projects/dhcp +envVars: +- name: ARTIFACTS_BUCKET + value: s3://projectbuildpipeline-857-pipelineoutputartifactsb-10ajmk30khe3f +resources: + requests: + memory: 16Gi + cpu: 4