-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
airbyte-ci: multi arch build #32816
Merged
alafanechere
merged 1 commit into
master
from
augustin/11-24-airbyte-ci_multi_arch_build
Nov 29, 2023
Merged
airbyte-ci: multi arch build #32816
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,11 +2,16 @@ | |
# Copyright (c) 2023 Airbyte, Inc., all rights reserved. | ||
# | ||
|
||
from typing import List | ||
|
||
import asyncclick as click | ||
import dagger | ||
from pipelines import main_logger | ||
from pipelines.airbyte_ci.connectors.build_image.steps import run_connector_build_pipeline | ||
from pipelines.airbyte_ci.connectors.context import ConnectorContext | ||
from pipelines.airbyte_ci.connectors.pipeline import run_connectors_pipelines | ||
from pipelines.cli.dagger_pipeline_command import DaggerPipelineCommand | ||
from pipelines.consts import BUILD_PLATFORMS, LOCAL_BUILD_PLATFORM | ||
|
||
|
||
@click.command(cls=DaggerPipelineCommand, help="Build all images for the selected connectors.") | ||
|
@@ -17,10 +22,20 @@ | |
default=False, | ||
type=bool, | ||
) | ||
@click.option( | ||
"-a", | ||
"--architecture", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 😍 much better name |
||
"build_architectures", | ||
help="Architecture for which to build the connector image. If not specified, the image will be built for the local architecture.", | ||
multiple=True, | ||
default=[LOCAL_BUILD_PLATFORM], | ||
type=click.Choice(BUILD_PLATFORMS, case_sensitive=True), | ||
) | ||
@click.pass_context | ||
async def build(ctx: click.Context, use_host_gradle_dist_tar: bool) -> bool: | ||
async def build(ctx: click.Context, use_host_gradle_dist_tar: bool, build_architectures: List[str]) -> bool: | ||
"""Runs a build pipeline for the selected connectors.""" | ||
|
||
build_platforms = [dagger.Platform(architecture) for architecture in build_architectures] | ||
main_logger.info(f"Building connectors for {build_platforms}, use --architecture to change this.") | ||
connectors_contexts = [ | ||
ConnectorContext( | ||
pipeline_name=f"Build connector {connector.technical_name}", | ||
|
@@ -41,6 +56,7 @@ async def build(ctx: click.Context, use_host_gradle_dist_tar: bool) -> bool: | |
use_host_gradle_dist_tar=use_host_gradle_dist_tar, | ||
s3_build_cache_access_key_id=ctx.obj.get("s3_build_cache_access_key_id"), | ||
s3_build_cache_secret_key=ctx.obj.get("s3_build_cache_secret_key"), | ||
targeted_platforms=build_platforms, | ||
) | ||
for connector in ctx.obj["selected_connectors_with_modified_files"] | ||
] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😍