-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add Airbyte rock #18
Add Airbyte rock #18
Changes from all commits
add6093
14b061d
db47c38
bd0b0ea
c672e4f
e068ecc
6977576
a85b6cf
c922b45
0e42e56
aedadae
a33f43f
8e2c4a8
96d9187
70bc4e8
ccab187
ecbe839
a6ebfe1
6755bb2
7f871d6
330b030
9d97a8d
1632f92
88d5886
53a7a32
a6469ad
6fb03bf
87e1012
aadd131
6fe7361
ad21197
f686cd9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,4 +34,5 @@ header: | |
- 'LICENSE' | ||
- 'trivy.yaml' | ||
- 'lib/**' | ||
- '**/*.patch' | ||
comment: on-failure |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# stdlib CVEs | ||
CVE-2024-24790 | ||
CVE-2023-24538 | ||
CVE-2023-24540 | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
# Copyright 2024 Canonical Ltd. | ||
# See LICENSE file for licensing details. | ||
|
||
name: airbyte | ||
summary: Airbyte rock | ||
description: Airbyte OCI image for the Airbyte charm | ||
version: "1.0" | ||
base: [email protected] | ||
license: Apache-2.0 | ||
platforms: | ||
amd64: | ||
|
||
environment: | ||
JAVA_HOME: /usr/lib/jvm/java-21-openjdk-amd64 | ||
CDK_PYTHON: /usr/bin/python3.10 | ||
CDK_ENTRYPOINT: /usr/lib/python3.10/dist-packages/airbyte_cdk/connector_builder/main.py | ||
CDK_VERSION: "5.12.0" | ||
|
||
|
||
parts: | ||
install-dependencies: | ||
plugin: nil | ||
stage-packages: | ||
- apt-transport-https | ||
- ca-certificates | ||
- curl | ||
- gnupg | ||
- python3.10-venv | ||
override-build: | | ||
# Install kubectl | ||
echo 'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.31/deb/ /' | tee /etc/apt/sources.list.d/kubernetes.list | ||
chmod 644 /etc/apt/sources.list.d/kubernetes.list # helps tools such as command-not-found to work correctly | ||
curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.31/deb/Release.key | gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg | ||
chmod 644 /etc/apt/keyrings/kubernetes-apt-keyring.gpg # allow unprivileged APT programs to read this keyring | ||
apt-get update | ||
apt-get install -y kubectl | ||
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. Can this not be a build-package? 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. It actually needs to be included in the final build as the application itself uses |
||
mkdir -p ${CRAFT_PART_INSTALL}/usr/local/bin | ||
mkdir -p ${CRAFT_PART_INSTALL}/usr/local/lib/python3.10/dist-packages | ||
cp -r $(which kubectl) ${CRAFT_PART_INSTALL}/usr/local/bin/kubectl | ||
|
||
pip install --upgrade setuptools pip airbyte-cdk==5.12.0 \ | ||
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. If you end up having more of these in future you can add a requirements.txt file. Not necessary now. |
||
--target=/${CRAFT_PART_INSTALL}/usr/local/lib/python3.10/dist-packages | ||
stage: | ||
- usr/local/bin/kubectl | ||
- usr/local/lib/python3.10/dist-packages | ||
|
||
pull-airbyte-repo: | ||
after: [install-dependencies] | ||
plugin: dump | ||
source: https://github.com/airbytehq/airbyte-platform.git # yamllint disable-line | ||
source-type: git | ||
source-tag: v0.63.8 | ||
override-build: | | ||
cp -r . ${CRAFT_PART_INSTALL}/airbyte-platform | ||
kelkawi-a marked this conversation as resolved.
Show resolved
Hide resolved
|
||
stage: | ||
- airbyte-platform | ||
|
||
assemble: | ||
after: [pull-airbyte-repo] | ||
plugin: nil | ||
build-packages: | ||
- jq | ||
- curl | ||
- coreutils | ||
- bash | ||
- gradle | ||
- openjdk-21-jdk-headless | ||
- npm | ||
build-snaps: | ||
- docker | ||
kelkawi-a marked this conversation as resolved.
Show resolved
Hide resolved
|
||
stage-packages: | ||
- openjdk-21-jdk-headless | ||
override-build: | | ||
cd ${CRAFT_STAGE}/airbyte-platform | ||
./gradlew assemble -x dockerBuildImage --continue --max-workers 1 | ||
./gradlew --stop | ||
|
||
organize-tars: | ||
after: [assemble] | ||
plugin: nil | ||
override-build: | | ||
mkdir ${CRAFT_PART_INSTALL}/airbyte-server | ||
mkdir ${CRAFT_PART_INSTALL}/airbyte-api-server | ||
mkdir ${CRAFT_PART_INSTALL}/airbyte-workers | ||
mkdir ${CRAFT_PART_INSTALL}/airbyte-bootloader | ||
mkdir ${CRAFT_PART_INSTALL}/airbyte-cron | ||
mkdir ${CRAFT_PART_INSTALL}/airbyte-connector-builder-server | ||
|
||
tar -xvf ${CRAFT_STAGE}/airbyte-platform/airbyte-server/build/distributions/airbyte-app.tar -C ${CRAFT_PART_INSTALL}/airbyte-server | ||
tar -xvf ${CRAFT_STAGE}/airbyte-platform/airbyte-api-server/build/distributions/airbyte-app.tar -C ${CRAFT_PART_INSTALL}/airbyte-api-server | ||
tar -xvf ${CRAFT_STAGE}/airbyte-platform/airbyte-workers/build/distributions/airbyte-app.tar -C ${CRAFT_PART_INSTALL}/airbyte-workers | ||
tar -xvf ${CRAFT_STAGE}/airbyte-platform/airbyte-bootloader/build/distributions/airbyte-app.tar -C ${CRAFT_PART_INSTALL}/airbyte-bootloader | ||
tar -xvf ${CRAFT_STAGE}/airbyte-platform/airbyte-cron/build/distributions/airbyte-app.tar -C ${CRAFT_PART_INSTALL}/airbyte-cron | ||
tar -xvf ${CRAFT_STAGE}/airbyte-platform/airbyte-connector-builder-server/build/distributions/airbyte-app.tar -C ${CRAFT_PART_INSTALL}/airbyte-connector-builder-server | ||
stage: | ||
- airbyte-server | ||
- airbyte-api-server | ||
- airbyte-workers | ||
- airbyte-bootloader | ||
- airbyte-cron | ||
- airbyte-connector-builder-server | ||
|
||
local-files: | ||
after: [organize-tars] | ||
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. Does this really need to go after organize-tars? |
||
plugin: dump | ||
source: ./local-files | ||
organize: | ||
pod-sweeper.sh: airbyte-pod-sweeper/airbyte-app/bin/airbyte-pod-sweeper | ||
stage: | ||
- airbyte-pod-sweeper/airbyte-app/bin/airbyte-pod-sweeper |
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.
If they are not present anymore, we can remove it