Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
126 changes: 6 additions & 120 deletions .buildkite/pipeline.yaml
Original file line number Diff line number Diff line change
@@ -1,56 +1,5 @@
dag: true

x-if-changed:
base-windows: &if_changed_base_windows
- "packer/windows/base/**"

base-linux: &if_changed_base_linux
- "packer/linux/base/**"

stack-windows: &if_changed_stack_windows
- "packer/windows/stack/**"
- "packer/windows/base/**"
- "plugins/**"

stack-linux: &if_changed_stack_linux
- "packer/linux/stack/**"
- "packer/linux/shared/**"
- "packer/linux/base/**"
- "plugins/**"
- "build/**"

test-windows: &if_changed_test_windows
- "packer/windows/stack/**"
- "packer/windows/base/**"
- "plugins/**"
- "templates/**"

test-linux: &if_changed_test_linux
- "packer/linux/stack/**"
- "packer/linux/shared/**"
- "packer/linux/base/**"
- "plugins/**"
- "build/**"
- "templates/**"

ami-all: &if_changed_ami_all
- "packer/windows/stack/**"
- "packer/windows/base/**"
- "packer/linux/stack/**"
- "packer/linux/shared/**"
- "packer/linux/base/**"
- "plugins/**"
- "build/**"

publish-all: &if_changed_publish_all
- "packer/windows/stack/**"
- "packer/windows/base/**"
- "packer/linux/stack/**"
- "packer/linux/shared/**"
- "packer/linux/base/**"
- "plugins/**"
- "build/**"

steps:
- group: ":lint-roller: Linting"
key: linting
Expand Down Expand Up @@ -86,10 +35,6 @@ steps:
agents:
queue: "${BUILDKITE_AGENT_META_DATA_QUEUE}"
if: build.source != "schedule"
if_changed:
- "internal/fixperms/**"
- "go.mod"
- "go.sum"
plugins:
- docker-compose#v5.12.0:
run: fixperms-tests
Expand All @@ -101,7 +46,6 @@ steps:
queue: "${BUILDKITE_AGENT_META_DATA_QUEUE}"
command: .buildkite/steps/deploy-service-role-stack.sh
if: build.source != "schedule"
if_changed: *if_changed_publish_all
depends_on:
- "linting"
- "fixperms-tests"
Expand All @@ -122,7 +66,7 @@ steps:
AMI_PUBLIC: false
agents:
queue: "${BUILDKITE_AGENT_META_DATA_QUEUE}"
if_changed: *if_changed_base_windows
if_changed: "packer/windows/base/**"
depends_on:
- "linting"
- "fixperms-tests"
Expand All @@ -139,38 +83,22 @@ steps:
agents:
queue: "${BUILDKITE_AGENT_META_DATA_QUEUE}"
if: build.source != "schedule"
if_changed: *if_changed_stack_windows
depends_on:
- "packer-base-windows-amd64"
- "linting"
- "fixperms-tests"
plugins:
- *aws_role_plugin

- id: "ensure-ami-windows-amd64"
name: ":mag: Ensure Windows AMD64 AMI"
command: .buildkite/steps/ensure_ami_metadata.py windows amd64
agents:
queue: "${BUILDKITE_AGENT_META_DATA_QUEUE}"
if: build.source != "schedule"
if_changed: *if_changed_test_windows
depends_on:
- "packer-windows-amd64"
- "linting"
- "fixperms-tests"
plugins:
- *aws_role_plugin

- id: "launch-windows-amd64"
name: ":cloudformation: :windows: AMD64 Launch"
command: .buildkite/steps/launch.sh windows amd64
agents:
queue: "${BUILDKITE_AGENT_META_DATA_QUEUE}"
artifact_paths: "build/aws-stack.yml"
if: build.source != "schedule"
if_changed: *if_changed_test_windows
depends_on:
- "ensure-ami-windows-amd64"
- "packer-windows-amd64"
- "deploy-service-role-stack"
plugins:
- *aws_role_plugin
Expand All @@ -188,7 +116,6 @@ steps:
stack: "buildkite-aws-stack-test-windows-amd64-${BUILDKITE_BUILD_NUMBER}"
queue: "testqueue-windows-amd64-${BUILDKITE_BUILD_NUMBER}"
if: build.source != "schedule"
if_changed: *if_changed_test_windows
depends_on:
- "launch-windows-amd64"

Expand All @@ -199,7 +126,6 @@ steps:
agents:
queue: "${BUILDKITE_AGENT_META_DATA_QUEUE}"
if: build.source != "schedule"
if_changed: *if_changed_test_windows
depends_on:
- "test-windows-amd64"
plugins:
Expand All @@ -213,7 +139,7 @@ steps:
AMI_PUBLIC: false
agents:
queue: "${BUILDKITE_AGENT_META_DATA_QUEUE}"
if_changed: *if_changed_base_linux
if_changed: "packer/linux/base/**"
depends_on:
- "linting"
- "fixperms-tests"
Expand All @@ -230,28 +156,13 @@ steps:
agents:
queue: "${BUILDKITE_AGENT_META_DATA_QUEUE}"
if: build.source != "schedule"
if_changed: *if_changed_stack_linux
depends_on:
- "packer-base-linux-amd64"
- "linting"
- "fixperms-tests"
plugins:
- *aws_role_plugin

- id: "ensure-ami-linux-amd64"
name: ":mag: Ensure Linux AMD64 AMI"
command: .buildkite/steps/ensure_ami_metadata.py linux amd64
agents:
queue: "${BUILDKITE_AGENT_META_DATA_QUEUE}"
if: build.source != "schedule"
if_changed: *if_changed_test_linux
depends_on:
- "packer-linux-amd64"
- "linting"
- "fixperms-tests"
plugins:
- *aws_role_plugin

- id: "launch-linux-amd64"
name: ":cloudformation: :linux: AMD64 Launch"
command: .buildkite/steps/launch.sh linux
Expand All @@ -260,9 +171,8 @@ steps:
queue: "${BUILDKITE_AGENT_META_DATA_QUEUE}"
artifact_paths: "build/aws-stack.yml"
if: build.source != "schedule"
if_changed: *if_changed_test_linux
depends_on:
- "ensure-ami-linux-amd64"
- "packer-linux-amd64"
- "deploy-service-role-stack"
plugins:
- *aws_role_plugin
Expand All @@ -280,7 +190,6 @@ steps:
stack: "buildkite-aws-stack-test-linux-amd64-${BUILDKITE_BUILD_NUMBER}"
queue: "testqueue-linux-amd64-${BUILDKITE_BUILD_NUMBER}"
if: build.source != "schedule"
if_changed: *if_changed_test_linux
depends_on:
- "launch-linux-amd64"

Expand All @@ -291,7 +200,6 @@ steps:
agents:
queue: "${BUILDKITE_AGENT_META_DATA_QUEUE}"
if: build.source != "schedule"
if_changed: *if_changed_test_linux
depends_on:
- "test-linux-amd64"
plugins:
Expand All @@ -305,7 +213,7 @@ steps:
AMI_PUBLIC: false
agents:
queue: "${BUILDKITE_AGENT_META_DATA_QUEUE}"
if_changed: *if_changed_base_linux
if_changed: "packer/linux/base/**"
depends_on:
- "linting"
- "fixperms-tests"
Expand All @@ -322,38 +230,22 @@ steps:
agents:
queue: "${BUILDKITE_AGENT_META_DATA_QUEUE}"
if: build.source != "schedule"
if_changed: *if_changed_stack_linux
depends_on:
- "packer-base-linux-arm64"
- "linting"
- "fixperms-tests"
plugins:
- *aws_role_plugin

- id: "ensure-ami-linux-arm64"
name: ":mag: Ensure Linux ARM64 AMI"
command: .buildkite/steps/ensure_ami_metadata.py linux arm64
agents:
queue: "${BUILDKITE_AGENT_META_DATA_QUEUE}"
if: build.source != "schedule"
if_changed: *if_changed_test_linux
depends_on:
- "packer-linux-arm64"
- "linting"
- "fixperms-tests"
plugins:
- *aws_role_plugin

- id: "launch-linux-arm64"
name: ":cloudformation: :linux: ARM64 Launch"
command: .buildkite/steps/launch.sh linux arm64
agents:
queue: "${BUILDKITE_AGENT_META_DATA_QUEUE}"
artifact_paths: "build/aws-stack.yml"
if: build.source != "schedule"
if_changed: *if_changed_test_linux
depends_on:
- "ensure-ami-linux-arm64"
- "packer-linux-arm64"
- "deploy-service-role-stack"
plugins:
- *aws_role_plugin
Expand All @@ -371,7 +263,6 @@ steps:
stack: "buildkite-aws-stack-test-linux-arm64-${BUILDKITE_BUILD_NUMBER}"
queue: "testqueue-linux-arm64-${BUILDKITE_BUILD_NUMBER}"
if: build.source != "schedule"
if_changed: *if_changed_test_linux
depends_on:
- "launch-linux-arm64"

Expand All @@ -382,7 +273,6 @@ steps:
agents:
queue: "${BUILDKITE_AGENT_META_DATA_QUEUE}"
if: build.source != "schedule"
if_changed: *if_changed_test_linux
depends_on:
- "test-linux-arm64"
plugins:
Expand All @@ -394,7 +284,6 @@ steps:
agents:
queue: "${BUILDKITE_AGENT_META_DATA_QUEUE}"
if: build.source != "schedule"
if_changed: *if_changed_publish_all
depends_on:
- "delete-windows-amd64"
- "delete-linux-amd64"
Expand All @@ -409,7 +298,6 @@ steps:
queue: "${BUILDKITE_AGENT_META_DATA_QUEUE}"
artifact_paths: "build/mappings.yml"
if: build.source != "schedule"
if_changed: *if_changed_ami_all
depends_on:
- "test-linux-amd64"
- "test-linux-arm64"
Expand All @@ -427,7 +315,6 @@ steps:
concurrency_method: eager
artifact_paths: "build/*.yml"
if: build.source != "schedule"
if_changed: *if_changed_publish_all
depends_on: "copy-ami"
plugins:
- *aws_role_plugin
Expand All @@ -438,7 +325,6 @@ steps:
agents:
queue: "${BUILDKITE_AGENT_META_DATA_QUEUE}"
if: build.source != "schedule"
if_changed: *if_changed_publish_all
depends_on: "publish"
plugins:
- *aws_role_plugin
Loading