# 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.

# This file was generated by running `make generate`. DO NOT EDIT

version: 0.2
batch:
  fast-fail: true
  build-graph:
    - identifier: golang_118
      env:
        variables:
          GO_SOURCE_VERSION: 1.18
    - identifier: golang_119
      env:
        variables:
          GO_SOURCE_VERSION: 1.19
    - identifier: golang_120
      env:
        variables:
          GO_SOURCE_VERSION: 1.20
    - identifier: golang_121
      env:
        variables:
          GO_SOURCE_VERSION: 1.21
    - identifier: golang_122
      env:
        variables:
          GO_SOURCE_VERSION: 1.22

env:
  variables:
    ARTIFACTS_BUCKET: "eks-d-postsubmit-artifacts"
    BUILD_PREPROD_IMAGES: "false"
    EKS_D_BUILD_TOOLING_REMOTE_URL: "https://github.com/aws/eks-distro-build-tooling.git"
    TARGET_BRANCH: "main"

phases:
  pre_build:
    commands:
      - echo Running pre-build setup and initialization...
      - scripts/sync_uninitialized_git_repository.sh . $EKS_D_BUILD_TOOLING_REMOTE_URL $TARGET_BRANCH
      - make -C projects/golang/go install-deps
  build:
    commands:
      - make -C projects/golang/go build

artifacts:
  files:
    - projects/golang/go/$GO_SOURCE_VERSION/rpmbuild/**/*
    - projects/golang/go/$GO_SOURCE_VERSION/archives/**/*
