Skip to content

Commit

Permalink
build: add prerelease resource (elastic#7438)
Browse files Browse the repository at this point in the history
  • Loading branch information
tkajtoch authored Jan 3, 2024
1 parent 971fea2 commit e310d71
Show file tree
Hide file tree
Showing 2 changed files with 93 additions and 20 deletions.
7 changes: 7 additions & 0 deletions .buildkite/pipelines/pipeline_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
steps:
- command: "echo 'This pipeline is currently a no-op'"
label: ':shrug: noop'
agents:
provider: gcp
# TODO: remove the test-automatic-releases condition when the pipeline is production-ready
if: build.branch == "main" || build.branch == "build/test-automatic-releases"
106 changes: 86 additions & 20 deletions catalog-info.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
################################################################################
###################### catalog-info for EUI ######################
# Declare a Backstage Component that represents your application.
# This file is meant to be edited by EUI core contributors and Elastic
# employees only. We *won't* accept any changes from external contributors
# and will close any pull requests that modify this file,
# even if the changes seem safe.

# EUI Catalog info for Backstage
# Docs: https://backstage.io/docs/features/software-catalog/descriptor-format/
# DO NOT MODIFY THIS FILE UNLESS YOU KNOW WHAT YOU'RE DOING!

---
##
# EUI component
##

# yaml-language-server: $schema=https://json.schemastore.org/catalog-info.json
apiVersion: backstage.io/v1alpha1
kind: Component
Expand All @@ -22,11 +32,12 @@ spec:
system: ci-systems
lifecycle: production

###############################################################################
############################# Buildkite pipelines ##############################
# Declare your Buildkite pipeline.
# This declaration creates the Backstage entity and the pipeline in Buildkite.
---
##
# Example pipeline
# TODO: Remove this resource and related pipeline if they're not needed anymore
##

# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/e57ee3bed7a6f73077a3f55a38e76e40ec87a7cf/rre.schema.json
apiVersion: backstage.io/v1alpha1
kind: Resource
Expand All @@ -39,7 +50,7 @@ metadata:
url: "https://buildkite.com/elastic/eui",
}
]

spec:
type: buildkite-pipeline
owner: group:eui-team
Expand All @@ -65,9 +76,12 @@ spec:
everyone:
access_level: READ_ONLY

############################ Pull request test #############################
# Run all unit and functional tests on PR
---
##
# buildkite-pipeline-eui-pull-request-test
# Pull request - run all unit and functional tests
##

# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/e57ee3bed7a6f73077a3f55a38e76e40ec87a7cf/rre.schema.json
apiVersion: backstage.io/v1alpha1
kind: Resource
Expand All @@ -80,7 +94,7 @@ metadata:
url: "https://buildkite.com/elastic/eui-pull-request-test",
}
]

spec:
type: buildkite-pipeline
owner: group:eui-team
Expand All @@ -106,9 +120,12 @@ spec:
everyone:
access_level: BUILD_AND_READ

############################ Pull request deploy docs #############################
# Deploy docs to cloud on PR
---
##
# buildkite-pipeline-eui-pull-request-deploy-docs
# Pull request - deploy docs website PR preview
##

# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/e57ee3bed7a6f73077a3f55a38e76e40ec87a7cf/rre.schema.json
apiVersion: backstage.io/v1alpha1
kind: Resource
Expand All @@ -121,7 +138,7 @@ metadata:
url: "https://buildkite.com/elastic/eui-pull-request-deploy-docs",
}
]

spec:
type: buildkite-pipeline
owner: group:eui-team
Expand All @@ -148,9 +165,12 @@ spec:
access_level: BUILD_AND_READ


############################ Pull request combined job #############################
# Orchestrate tests and deploying docs to cloud on branch PR
---
##
# buildkite-pipeline-eui-pull-request-test-and-deploy
# Pull request - run tests and deploy docs website PR preview
##

# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/e57ee3bed7a6f73077a3f55a38e76e40ec87a7cf/rre.schema.json
apiVersion: backstage.io/v1alpha1
kind: Resource
Expand All @@ -163,7 +183,7 @@ metadata:
url: "https://buildkite.com/elastic/eui-pull-request-test-and-deploy",
}
]

spec:
type: buildkite-pipeline
owner: group:eui-team
Expand Down Expand Up @@ -194,10 +214,12 @@ spec:
everyone:
access_level: BUILD_AND_READ


############################ Release deploy docs #############################
# Publish docs to EUI subdomain when we tag a new release
---
##
# buildkite-pipeline-eui-release-deploy-docs
# EUI Release - publish docs to eui.elastic.co when we tag a new release
##

# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/e57ee3bed7a6f73077a3f55a38e76e40ec87a7cf/rre.schema.json
apiVersion: backstage.io/v1alpha1
kind: Resource
Expand Down Expand Up @@ -235,3 +257,47 @@ spec:
access_level: MANAGE_BUILD_AND_READ
everyone:
access_level: READ_ONLY

---
##
# buildkite-pipeline-eui-release
# EUI Release - handle (pre)release process on merge to main
##

# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/e57ee3bed7a6f73077a3f55a38e76e40ec87a7cf/rre.schema.json
apiVersion: backstage.io/v1alpha1
kind: Resource
metadata:
name: buildkite-pipeline-eui-release
description: EUI pipeline to release the latest version of @elastic/eui
links: [
{
title: "EUI - release",
url: "https://buildkite.com/elastic/eui-release",
}
]

spec:
type: buildkite-pipeline
owner: group:eui-team
system: buildkite
implementation:
apiVersion: buildkite.elastic.dev/v1
kind: Pipeline
metadata:
name: eui-release
spec:
repository: elastic/eui
pipeline_file: ".buildkite/pipelines/pipeline_release.yml"
provider_settings:
build_branches: true
build_tags: false
build_pull_requests: false
filter_enabled: true
# TODO: remove the test-automatic-releases condition when the pipeline is production-ready
filter_condition: build.branch == "main" || build.branch == "build/test-automatic-releases"
teams:
eui-team:
access_level: MANAGE_BUILD_AND_READ
everyone:
access_level: READ_ONLY

0 comments on commit e310d71

Please sign in to comment.