Skip to content

Commit 5aa5763

Browse files
authored
feat(specs): only use shortname in the source input [skip-bc] (#4287)
1 parent 50675f7 commit 5aa5763

File tree

4 files changed

+22
-56
lines changed

4 files changed

+22
-56
lines changed

scripts/docker/Dockerfile.base

+13-13
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,21 @@ SHELL ["/bin/bash", "--login", "-c"]
1515

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

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

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

3434
# Java formatter
3535
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
@@ -39,24 +39,24 @@ ADD https://github.com/google/google-java-format/releases/download/v1.25.2/googl
3939
COPY --from=python-builder /usr/local/bin/ /usr/local/bin/
4040
COPY --from=python-builder /usr/local/lib/ /usr/local/lib/
4141
RUN echo "export PATH=$PATH:/usr/local/bin/python" >> ~/.profile \
42-
&& echo "export PATH=$PATH:/usr/local/bin/pip" >> ~/.profile \
43-
&& pip install --upgrade pip pipx && pipx ensurepath \
44-
&& pipx install poetry==2
42+
&& echo "export PATH=$PATH:/usr/local/bin/pip" >> ~/.profile \
43+
&& pip install --upgrade pip pipx && pipx ensurepath \
44+
&& pipx install poetry==2
4545
ENV VIRTUAL_ENV=/opt/env
4646
RUN python -m venv $VIRTUAL_ENV
4747
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
4848

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

5555

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

6161
# PHP
6262
COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer

scripts/docker/Dockerfile.ruby

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM ruby:${RUBY_VERSION}-bullseye
33

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

99
WORKDIR /app

scripts/docker/Dockerfile.swift

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
ARG SWIFT_VERSION
22
ARG SWIFTFORMAT_VERSION=0.54.5
33

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

7-
COPY --from=swiftFormat /usr/bin/swiftformat /usr/bin/swiftformat
7+
COPY --from=swift_format /usr/bin/swiftformat /usr/bin/swiftformat
88

99
# Global dependencies
1010
RUN apt-get update \
11-
&& apt-get install -y --no-install-recommends zlib1g-dev \
12-
&& apt-get clean \
13-
&& rm -rf /var/lib/apt/lists/*
11+
&& apt-get install -y --no-install-recommends zlib1g-dev \
12+
&& apt-get clean \
13+
&& rm -rf /var/lib/apt/lists/*
1414

1515
WORKDIR /app

specs/ingestion/common/schemas/source.yml

+2-36
Original file line numberDiff line numberDiff line change
@@ -343,48 +343,24 @@ SourceDocker:
343343
type: object
344344
additionalProperties: false
345345
properties:
346-
imageType:
347-
$ref: '#/DockerImageType'
348-
registry:
349-
$ref: '#/DockerRegistry'
350346
image:
351347
type: string
352-
description: Docker image name.
353-
example: algolia/zendesk
354-
version:
355-
type: string
356-
description: Docker image version.
357-
default: latest
358-
example: v2.1.0
348+
description: Shortname of the image, as returned by the referential.
349+
example: zendesk
359350
configuration:
360351
type: object
361352
description: Configuration of the spec.
362353
required:
363-
- registry
364354
- image
365-
- imageType
366355
- configuration
367356
x-discriminator-fields:
368-
- registry
369357
- image
370-
- imageType
371358
- configuration
372359

373360
SourceUpdateDocker:
374361
type: object
375362
additionalProperties: false
376363
properties:
377-
registry:
378-
$ref: '#/DockerRegistry'
379-
image:
380-
type: string
381-
description: Docker image name.
382-
example: algolia/zendesk
383-
version:
384-
type: string
385-
description: Docker image version.
386-
default: latest
387-
example: v2.1.0
388364
configuration:
389365
type: object
390366
description: Configuration of the spec.
@@ -393,16 +369,6 @@ SourceUpdateDocker:
393369
x-discriminator-fields:
394370
- configuration
395371

396-
DockerRegistry:
397-
type: string
398-
description: Container registry name from where to pull the image.
399-
enum: [dockerhub, ghcr]
400-
401-
DockerImageType:
402-
type: string
403-
enum: [custom, airbyte]
404-
description: Image type.
405-
406372
SourceInput:
407373
oneOf:
408374
- $ref: '#/SourceCommercetools'

0 commit comments

Comments
 (0)