Skip to content

Commit

Permalink
Provide an image for Apache Camel
Browse files Browse the repository at this point in the history
fixes redhat-cop#30

includes jbang cli configured to accept github.com/apache as trusted
domain and Camel CLI

Note that jbang installation has been extracted to its own module as it
is used by both Camel and Quarkus

Signed-off-by: Aurélien Pupier <[email protected]>
  • Loading branch information
apupier committed Sep 23, 2024
1 parent 661a1fc commit e88be02
Show file tree
Hide file tree
Showing 14 changed files with 42 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/post-merge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
fail-fast: false
matrix:
image: [ 'cekit-builder', 'devspaces-base', 'devspaces-openjdk-17', 'devspaces-nodejs-18', 'devspaces-nodejs-20', 'devspaces-java-node-combined', 'devspaces-nested-podman', 'devspaces-python-311', 'devspaces-java21-node20-python311', 'devspaces-dotnet-8' ]
image: [ 'cekit-builder', 'devspaces-base', 'devspaces-openjdk-17', 'devspaces-nodejs-18', 'devspaces-nodejs-20', 'devspaces-java-node-combined', 'devspaces-nested-podman', 'devspaces-python-311', 'devspaces-java21-node20-python311', 'devspaces-dotnet-8', 'devspaces-camel' ]
uses: ./.github/workflows/cekit-build.yaml
with:
tag: quay.io/redhat-cop/${{ matrix.image }}:latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
fail-fast: false
matrix:
image: [ 'cekit-builder', 'devspaces-base', 'devspaces-openjdk-17', 'devspaces-nodejs-18', 'devspaces-nodejs-20', 'devspaces-java-node-combined', 'devspaces-nested-podman', 'devspaces-python-311', 'devspaces-java21-node20-python311', 'devspaces-dotnet-8' ]
image: [ 'cekit-builder', 'devspaces-base', 'devspaces-openjdk-17', 'devspaces-nodejs-18', 'devspaces-nodejs-20', 'devspaces-java-node-combined', 'devspaces-nested-podman', 'devspaces-python-311', 'devspaces-java21-node20-python311', 'devspaces-dotnet-8', 'devspaces-camel' ]
uses: ./.github/workflows/cekit-build.yaml
with:
tag: quay.io/redhat-cop/${{ matrix.image }}:pr-${{ github.sha }}
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ This is useful for supporting a mixed mode where you want to have a streamlined
```bash
cekit build --overrides images/cekit-builder.yaml podman
cekit build --overrides images/devspaces-base.yaml podman
cekit build --overrides images/devspaces-camel.yaml podman
cekit build --overrides images/devspaces-openjdk-17.yaml podman
cekit build --overrides images/devspaces-nodejs-18.yaml podman
cekit build --overrides images/devspaces-nodejs-20.yaml podman
Expand Down
9 changes: 9 additions & 0 deletions images/devspaces-camel.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: devspaces-camel
from: registry.access.redhat.com/ubi9/openjdk-21:1.20
version: &version 1.0
packages:
manager: microdnf
modules:
install:
- name: jbang
- name: camel
3 changes: 2 additions & 1 deletion images/devspaces-java-node-combined.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ modules:
install:
- name: node20
- name: angular
- name: quarkus
- name: quarkus
- name: jbang
1 change: 1 addition & 0 deletions images/devspaces-java21-node20-python311.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ modules:
- name: node20
- name: angular
- name: quarkus
- name: jbang
- name: python3.11
1 change: 1 addition & 0 deletions images/devspaces-nested-podman-fedora.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ modules:
- name: java21
- name: maven
- name: quarkus
- name: jbang
- name: node18
run:
entrypoint:
Expand Down
1 change: 1 addition & 0 deletions images/devspaces-nested-podman.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ modules:
- name: java21
- name: maven
- name: quarkus
- name: jbang
run:
entrypoint:
- "/entrypoint-nested.sh"
Expand Down
5 changes: 5 additions & 0 deletions modules/camel/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash

jbang trust add https://github.com/apache
# Need to be able to specify the version in another iteration
jbang app install camel@apache/camel
6 changes: 6 additions & 0 deletions modules/camel/module.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
schema_version: 1
name: camel
version: v1.0
description: "Confgure JBang and install Camel CLI"
execute:
- script: install.sh
5 changes: 5 additions & 0 deletions modules/jbang/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash

mkdir -p ${JBANG_DIR}
curl -Ls https://sh.jbang.dev | bash -s - app setup
ln -s ${JBANG_DIR}/bin/jbang /usr/local/bin/jbang
9 changes: 9 additions & 0 deletions modules/jbang/module.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
schema_version: 1
name: jbang
version: v1.0
description: "Installs JBang CLI"
envs:
- name: JBANG_DIR
value: "/usr/local/jbang"
execute:
- script: install.sh
3 changes: 0 additions & 3 deletions modules/quarkus/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,3 @@ chmod +x /usr/local/quarkus-cli/bin/quarkus
rm -rf "${TEMP_DIR}"
cd /usr/local/bin
ln -s ../quarkus-cli/bin/quarkus quarkus
mkdir -p ${JBANG_DIR}
curl -Ls https://sh.jbang.dev | bash -s - app setup
ln -s ${JBANG_DIR}/bin/jbang /usr/local/bin/jbang
3 changes: 0 additions & 3 deletions modules/quarkus/module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,5 @@ description: "Installs the Quarkus CLI"
args:
- name: QUARKUS_VERSION
value: 3.6.6
envs:
- name: JBANG_DIR
value: "/usr/local/jbang"
execute:
- script: install.sh

0 comments on commit e88be02

Please sign in to comment.