Skip to content
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

feat(byoc): only use shortname in the source input #4287

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
26 changes: 13 additions & 13 deletions scripts/docker/Dockerfile.base
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@ SHELL ["/bin/bash", "--login", "-c"]

# Global dependencies
RUN apt-get update \
&& apt-get install -y --no-install-recommends git curl zip unzip libexpat1-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
&& apt-get install -y --no-install-recommends git curl zip unzip libexpat1-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

COPY .nvmrc .nvmrc
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash && source ~/.profile \
&& nvm install \
&& npm install -g yarn
&& nvm install \
&& npm install -g yarn

# SDKMAN
ARG JAVA_VERSION
RUN curl -s "https://get.sdkman.io" | bash
RUN source "/root/.sdkman/bin/sdkman-init.sh" \
&& sdk install java ${JAVA_VERSION}-tem \
&& sdk install sbt
&& sdk install java ${JAVA_VERSION}-tem \
&& sdk install sbt

# Java formatter
ADD https://github.com/google/google-java-format/releases/download/v1.25.2/google-java-format-1.25.2-all-deps.jar /tmp/java-formatter.jar
Expand All @@ -39,24 +39,24 @@ ADD https://github.com/google/google-java-format/releases/download/v1.25.2/googl
COPY --from=python-builder /usr/local/bin/ /usr/local/bin/
COPY --from=python-builder /usr/local/lib/ /usr/local/lib/
RUN echo "export PATH=$PATH:/usr/local/bin/python" >> ~/.profile \
&& echo "export PATH=$PATH:/usr/local/bin/pip" >> ~/.profile \
&& pip install --upgrade pip pipx && pipx ensurepath \
&& pipx install poetry
&& echo "export PATH=$PATH:/usr/local/bin/pip" >> ~/.profile \
&& pip install --upgrade pip pipx && pipx ensurepath \
&& pipx install poetry
ENV VIRTUAL_ENV=/opt/env
RUN python -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"

# Go
COPY --from=go-builder /usr/local/go/ /usr/local/go/
RUN echo "export PATH=$PATH:/usr/local/go/bin:/root/go/bin" >> ~/.profile && source ~/.profile \
&& curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.60.3 \
&& go install golang.org/x/tools/cmd/goimports@v0.22.0
&& curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.60.3 \
&& go install golang.org/x/tools/cmd/goimports@v0.22.0


# Dart
COPY --from=dart-builder /usr/lib/dart/ /usr/lib/dart/
RUN echo "export PATH=/usr/lib/dart/bin:/root/.pub-cache/bin:$PATH" >> ~/.profile && source ~/.profile \
&& dart pub global activate melos
&& dart pub global activate melos

# PHP
COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer
Expand Down
4 changes: 2 additions & 2 deletions scripts/docker/Dockerfile.ruby
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM ruby:${RUBY_VERSION}-bullseye

ADD https://github.com/fables-tales/rubyfmt/releases/download/v0.10.0/rubyfmt-v0.10.0-Linux-aarch64.tar.gz rubyfmt.tar.gz
RUN tar -xzf rubyfmt.tar.gz && \
mv tmp/releases/v0.10.0-Linux/rubyfmt /usr/local/bin && \
rm -rf rubyfmt.tar.gz tmp
mv tmp/releases/v0.10.0-Linux/rubyfmt /usr/local/bin && \
rm -rf rubyfmt.tar.gz tmp

WORKDIR /app
10 changes: 5 additions & 5 deletions scripts/docker/Dockerfile.swift
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
ARG SWIFT_VERSION
ARG SWIFTFORMAT_VERSION=0.54.5

FROM ghcr.io/nicklockwood/swiftformat:${SWIFTFORMAT_VERSION} AS swiftFormat
FROM ghcr.io/nicklockwood/swiftformat:${SWIFTFORMAT_VERSION} AS swift_format
FROM swift:${SWIFT_VERSION}-jammy

COPY --from=swiftFormat /usr/bin/swiftformat /usr/bin/swiftformat
COPY --from=swift_format /usr/bin/swiftformat /usr/bin/swiftformat

# Global dependencies
RUN apt-get update \
&& apt-get install -y --no-install-recommends zlib1g-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
&& apt-get install -y --no-install-recommends zlib1g-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /app
38 changes: 2 additions & 36 deletions specs/ingestion/common/schemas/source.yml
Original file line number Diff line number Diff line change
Expand Up @@ -343,48 +343,24 @@ SourceDocker:
type: object
additionalProperties: false
properties:
imageType:
$ref: '#/DockerImageType'
registry:
$ref: '#/DockerRegistry'
image:
type: string
description: Docker image name.
example: algolia/zendesk
version:
type: string
description: Docker image version.
default: latest
example: v2.1.0
description: Shortname of the image, as returned by the referential.
example: zendesk
configuration:
type: object
description: Configuration of the spec.
required:
- registry
- image
- imageType
- configuration
x-discriminator-fields:
- registry
- image
- imageType
- configuration

SourceUpdateDocker:
type: object
additionalProperties: false
properties:
registry:
$ref: '#/DockerRegistry'
image:
type: string
description: Docker image name.
example: algolia/zendesk
version:
type: string
description: Docker image version.
default: latest
example: v2.1.0
configuration:
type: object
description: Configuration of the spec.
Expand All @@ -393,16 +369,6 @@ SourceUpdateDocker:
x-discriminator-fields:
- configuration

DockerRegistry:
type: string
description: Container registry name from where to pull the image.
enum: [dockerhub, ghcr]

DockerImageType:
type: string
enum: [custom, airbyte]
description: Image type.

SourceInput:
oneOf:
- $ref: '#/SourceCommercetools'
Expand Down
Loading