Skip to content

Add simple-filter-action kamelet #73

Add simple-filter-action kamelet

Add simple-filter-action kamelet #73

Workflow file for this run

name: E2E Tests
on:
pull_request:
branches:
- main
- release-2.3.x
push:
branches:
- main
- release-2.3.x
jobs:
test:
runs-on: ubuntu-latest
env:
YAKS_IMAGE_NAME: "docker.io/citrusframework/yaks"
YAKS_VERSION: "0.19.1"
YAKS_RUN_OPTIONS: "--timeout=15m"
KUBECTL_WAIT_TIMEOUT: "180s"
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Cleanup
run: |
ls -lart
echo "Initial status:"
df -h
echo "Cleaning up resources:"
sudo swapoff -a
sudo rm -f /swapfile
sudo apt clean
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
docker rmi $(docker image ls -aq)
echo "Final status:"
df -h
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
cache: 'maven'
- name: Build Kamelet libraries
run: |
mvn clean install -DskipTests -DskipITs
mvn deploy -DskipTests -DskipITs -DaltDeploymentRepository=snapshot-repo::default::file:target/maven_repo
- name: Kind Cluster
uses: container-tools/[email protected]
with:
version: v0.22.0
node_image: kindest/node:v1.29.2@sha256:51a1434a5397193442f0be2a297b488b6c919ce8a3931be0ce822606ea5ca245
cpu: 3
- name: Info
run: |
kubectl version
kubectl cluster-info
kubectl describe nodes
- name: Create Minio Storage as Maven Repository
run: |
# Create Minio as Maven repository
docker run -d -p 9000:9000 -p 9001:9001 --name minio quay.io/minio/minio server /data --console-address ":9001"
- name: Upload Kamelet catalog library to Minio
run: |
curl https://dl.min.io/client/mc/release/linux-amd64/mc --create-dirs -o /home/runner/.minio/mc
chmod +x /home/runner/.minio/mc
/home/runner/.minio/mc alias set minio-dev http://127.0.0.1:9000 minioadmin minioadmin
/home/runner/.minio/mc mb minio-dev/camel-k
/home/runner/.minio/mc mirror --overwrite target/maven_repo minio-dev/camel-k/
- name: Create DockerHost service
run: |
# Create Maven settings for the Camel K operator
kubectl create cm minio-maven-repository --from-file .github/workflows/infra/settings.xml
# Create headless service that allows pods running in Kind to access the Minio Docker service
kubectl apply -f .github/workflows/infra/dockerhost-service.yaml
- name: Camel K Tools
uses: container-tools/[email protected]
with:
version: v2.3.0
- name: Install Camel K
run: |
# Configure install options
export KAMEL_INSTALL_REGISTRY=$KIND_REGISTRY
export KAMEL_INSTALL_REGISTRY_INSECURE=true
kamel install --global --olm=false --operator-env-vars KAMEL_INSTALL_DEFAULT_KAMELETS=false --maven-settings=configmap:minio-maven-repository/settings.xml --maven-extension=com.gkatzioura.maven.cloud:s3-storage-wagon:2.3 -w
# Install the local kamelets
find . -maxdepth 1 -name '*.kamelet.yaml' -exec kubectl apply -f {} \;
- name: YAKS tools
uses: citrusframework/[email protected]
with:
version: v${{ env.YAKS_VERSION }}
- name: Install YAKS
run: |
yaks install --operator-image $YAKS_IMAGE_NAME:$YAKS_VERSION
- name: YAKS Tests
run: |
yaks run test/jira $YAKS_RUN_OPTIONS
yaks run test/aws/s3 $YAKS_RUN_OPTIONS
yaks run test/aws/ddb $YAKS_RUN_OPTIONS
yaks run test/aws/sqs $YAKS_RUN_OPTIONS
yaks run test/aws/kinesis $YAKS_RUN_OPTIONS
yaks run test/transformation $YAKS_RUN_OPTIONS
yaks run test/extract-field $YAKS_RUN_OPTIONS
yaks run test/http-sink $YAKS_RUN_OPTIONS
yaks run test/insert-field $YAKS_RUN_OPTIONS
yaks run test/avro $YAKS_RUN_OPTIONS
yaks run test/protobuf $YAKS_RUN_OPTIONS
yaks run test/ftp/sink $YAKS_RUN_OPTIONS
yaks run test/ftp/source $YAKS_RUN_OPTIONS
yaks run test/slack $YAKS_RUN_OPTIONS
yaks run test/kafka $YAKS_RUN_OPTIONS
yaks run test/postgresql $YAKS_RUN_OPTIONS
- name: YAKS Report
if: failure()
run: |
yaks report
- uses: actions/upload-artifact@v2
if: failure()
with:
name: dumps
path: _output/*-dump.log