You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by pc...@apache.org on 2023/02/27 17:30:07 UTC
[camel-k] 03/19: chore(ci): remove unused actions/wf
This is an automated email from the ASF dual-hosted git repository.
pcongiusti pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit 1c18a476d8ac389b81e455c21e23fb5c35e11b1d
Author: Pasquale Congiusti <pa...@gmail.com>
AuthorDate: Wed Feb 22 12:24:00 2023 +0100
chore(ci): remove unused actions/wf
---
.github/actions/e2e-local/action.yml | 49 -----
.../actions/kamel-config-cluster-ocp3/action.yml | 233 ---------------------
.github/workflows/local.yml | 68 ------
.github/workflows/openshift.yml | 129 ------------
.github/workflows/verify-generate.yml | 68 ------
5 files changed, 547 deletions(-)
diff --git a/.github/actions/e2e-local/action.yml b/.github/actions/e2e-local/action.yml
deleted file mode 100644
index a2dccccc5..000000000
--- a/.github/actions/e2e-local/action.yml
+++ /dev/null
@@ -1,49 +0,0 @@
-# ---------------------------------------------------------------------------
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# ---------------------------------------------------------------------------
-
-name: e2e-local
-description: 'End-to-End tests for local use-cases'
-
-runs:
- using: "composite"
-
- steps:
- - id: prepare-env
- name: Prepare Test Environment
- uses: ./.github/actions/kamel-prepare-env
-
- - id: build-kamel
- name: Build Kamel
- uses: ./.github/actions/kamel-build
- with:
- make-rules: 'build-kamel'
-
- - id: report-problematic
- name: List Tests Marked As Problematic
- uses: ./.github/actions/kamel-report-problematic
- with:
- test-suite: local
-
- - id: run-it
- name: Run IT
- shell: bash
- run: |
- # Configure staging repos
- export KAMEL_LOCAL_RUN_MAVEN_REPOSITORIES=$(make get-staging-repo)
-
- # Then run integration tests
- make test-local
diff --git a/.github/actions/kamel-config-cluster-ocp3/action.yml b/.github/actions/kamel-config-cluster-ocp3/action.yml
deleted file mode 100644
index f87c87107..000000000
--- a/.github/actions/kamel-config-cluster-ocp3/action.yml
+++ /dev/null
@@ -1,233 +0,0 @@
-# ---------------------------------------------------------------------------
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# ---------------------------------------------------------------------------
-
-name: kamel-config-cluster-ocp3
-description: 'Provides configuration for making available kubernetes cluster on ocp3'
-
-runs:
- using: "composite"
- steps:
- - name: Get OpenShift Client (oc)
- shell: bash
- if: ${{ env.CLUSTER_OCP3_CONFIGURED != 'true' }}
- run: |
- export OPENSHIFT_VERSION=v3.11.0
- export OPENSHIFT_COMMIT=0cbc58b
- export MAVEN_OPTS=-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
-
- {{ env.SUDO }} rm -f /etc/resolv.conf
- {{ env.SUDO }} ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf
- {{ env.SUDO }} sh -c 'echo "DNS=8.8.8.8 4.4.4.4" >> /etc/systemd/resolved.conf'
- {{ env.SUDO }} service systemd-resolved restart
-
- # set docker0 to promiscuous mode
- {{ env.SUDO }} ip link set docker0 promisc on
-
- # Download and install the oc binary
- {{ env.SUDO }} mount --make-shared /
-
- {{ env.SUDO }} service docker stop
- {{ env.SUDO }} echo '{"insecure-registries": ["172.30.0.0/16"]}' | {{ env.SUDO }} tee /etc/docker/daemon.json > /dev/null
- {{ env.SUDO }} service docker start
-
- DOWNLOAD_URL=https://github.com/openshift/origin/releases/download/$OPENSHIFT_VERSION/openshift-origin-client-tools-$OPENSHIFT_VERSION-$OPENSHIFT_COMMIT-linux-64bit.tar.gz
- wget -O client.tar.gz ${DOWNLOAD_URL}
- tar xvzOf client.tar.gz > oc.bin
- {{ env.SUDO }} mv oc.bin /usr/bin/oc
- {{ env.SUDO }} chmod 755 /usr/bin/oc
-
- - id: start-openshift
- name: Start OpenShift Cluster
- shell: bash
- if: ${{ env.CLUSTER_OCP3_CONFIGURED != 'true' }}
- run: |
- # Figure out this host's IP address
- IP_ADDR="$(ip addr show eth0 | grep "inet\b" | awk '{print $2}' | cut -d/ -f1)"
-
- # Setup cluster dir
- {{ env.SUDO }} mkdir -p /home/runner/lib/oc
- {{ env.SUDO }} chmod 777 /home/runner/lib/oc
- cd /home/runner/lib/oc
-
- # Start OpenShift
- oc cluster up --public-hostname=$IP_ADDR --enable=persistent-volumes,registry,router
- oc login -u system:admin
-
- # Wait until we have a ready node in openshift
- TIMEOUT=0
- TIMEOUT_COUNT=60
- until [ $TIMEOUT -eq $TIMEOUT_COUNT ]; do
- if [ -n "$(oc get nodes | grep Ready)" ]; then
- break
- fi
- echo "openshift is not up yet"
- TIMEOUT=$((TIMEOUT+1))
- sleep 5
- done
-
- if [ $TIMEOUT -eq $TIMEOUT_COUNT ]; then
- echo "Failed to start openshift"
- exit 1
- fi
-
- echo "openshift is deployed and reachable"
-
- #
- # Avoid configuring the cluster repeatedly
- #
- echo "CLUSTER_OCP3_CONFIGURED=true" >> $GITHUB_ENV
-
- - id: info
- name: Info
- shell: bash
- if: ${{ env.CLUSTER_OCP3_CONFIGURED != 'true' }}
- run: |
- oc describe nodes
-
- - id: configure-developer-user
- name: Configure Developer User
- shell: bash
- run: |
- oc login -u system:admin
-
- # Export the context used for admin login
- echo "cluster-kube-admin-user-ctx=$(oc config current-context)" >> $GITHUB_OUTPUT
-
- # Aggregate pod eviction permission to the default admin role
- cat <<EOF | oc apply -f -
- kind: ClusterRole
- apiVersion: rbac.authorization.k8s.io/v1
- metadata:
- name: camel-k-test:eviction
- labels:
- rbac.authorization.k8s.io/aggregate-to-admin: "true"
- rules:
- - apiGroups: [""]
- resources: ["pods/eviction"]
- verbs: ["create"]
- EOF
-
- # Grant nodes permission to the default developer user
- cat <<EOF | oc apply -f -
- kind: ClusterRole
- apiVersion: rbac.authorization.k8s.io/v1
- metadata:
- name: camel-k-test:nodes
- rules:
- - apiGroups: [""]
- resources: ["nodes"]
- verbs: ["get","list"]
- EOF
- cat <<EOF | oc apply -f -
- kind: ClusterRoleBinding
- apiVersion: rbac.authorization.k8s.io/v1
- metadata:
- name: camel-k-test:nodes
- subjects:
- - kind: User
- name: developer
- roleRef:
- kind: ClusterRole
- name: camel-k-test:nodes
- apiGroup: rbac.authorization.k8s.io
- EOF
-
- # Aggregate finalizers permission to the default admin role
- cat <<EOF | oc apply -f -
- kind: ClusterRole
- apiVersion: rbac.authorization.k8s.io/v1
- metadata:
- name: camel-k-test:finalizers
- labels:
- rbac.authorization.k8s.io/aggregate-to-admin: "true"
- rules:
- - apiGroups: ["camel.apache.org"]
- resources: ["*/finalizers"]
- verbs: ["update"]
- EOF
-
- # Grant read permission on the Kubernetes Service to the default developer user
- # Required by the HTTP proxy tests
- cat <<EOF | oc apply -f -
- kind: ClusterRole
- apiVersion: rbac.authorization.k8s.io/v1
- metadata:
- name: camel-k-test:kubernetes-service
- rules:
- - apiGroups: [""]
- resources: ["services"]
- verbs: ["get"]
- resourceNames: ["kubernetes"]
- EOF
- cat <<EOF | oc apply -f -
- kind: RoleBinding
- apiVersion: rbac.authorization.k8s.io/v1
- metadata:
- namespace: default
- name: camel-k-test:kubernetes-service
- subjects:
- - kind: User
- name: developer
- roleRef:
- kind: ClusterRole
- name: camel-k-test:kubernetes-service
- apiGroup: rbac.authorization.k8s.io
- EOF
-
- # Login as normal user
- oc login -u developer
-
- # Export the context used for developer login
- echo "cluster-kube-user-ctx=$(oc config current-context)" >> $GITHUB_OUTPUT
-
- - id: extract-config
- shell: bash
- if: ${{ env.CLUSTER_OCP3_CONFIGURED != 'true' }}
- run: |
- echo "cluster-image-registry-pull-host=" >> $GITHUB_OUTPUT
- echo "cluster-image-registry-push-host=" >> $GITHUB_OUTPUT
- echo "cluster-image-registry-insecure=$(echo true)" >> $GITHUB_OUTPUT
- echo "cluster-has-olm=$(echo false)" >> $GITHUB_OUTPUT
- echo "cluster-image-namespace=$(echo apache)" >> $GITHUB_OUTPUT
- echo "cluster-global-operator-namespace=$(echo openshift-operators)" >> $GITHUB_OUTPUT
- /* cluster-catalog-source-namespace intentionally blank due to using straight docker */
-
-outputs:
- cluster-image-registry-push-host:
- description: "The image registry to which to push images"
- value: ${{ steps.extract-config.outputs.cluster-image-registry-push-host }}
- cluster-image-registry-pull-host:
- description: "The image registry from which to pull images"
- value: ${{ steps.extract-config.outputs.cluster-image-registry-pull-host }}
- cluster-image-registry-insecure:
- description: "Whether the pull registry is insecure"
- value: ${{ steps.extract-config.outputs.cluster-image-registry-insecure }}
- cluster-image-namespace:
- description: "The namespace to install the camel-k images"
- value: ${{ steps.extract-config.outputs.cluster-image-namespace }}
- cluster-kube-admin-user-ctx:
- description: "The context of the kube admin user"
- value: ${{ steps.configure-developer-user.outputs.cluster-kube-admin-user-ctx }}
- cluster-kube-user-ctx:
- description: "The context of the kube user"
- value: ${{ steps.configure-developer-user.outputs.cluster-kube-user-ctx }}
- cluster-has-olm:
- description: "Does the cluster have OLM"
- value: ${{ steps.extract-config.outputs.cluster-has-olm }}
- cluster-global-operator-namespace:
- description: "Namespace to install a global operator"
- value: ${{ steps.extract-config.outputs.cluster-global-operator-namespace}}
diff --git a/.github/workflows/local.yml b/.github/workflows/local.yml
deleted file mode 100644
index 140ec667b..000000000
--- a/.github/workflows/local.yml
+++ /dev/null
@@ -1,68 +0,0 @@
-# ---------------------------------------------------------------------------
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# ---------------------------------------------------------------------------
-
-name: local
-
-env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-
-on:
- pull_request:
- branches:
- - main
- - "release-*"
- paths-ignore:
- - 'docs/**'
- - 'proposals/**'
- - '**.adoc'
- - '**.md'
- - 'KEYS'
- - 'LICENSE'
- - 'NOTICE'
- push:
- branches:
- - main
- - "release-*"
- paths-ignore:
- - 'docs/**'
- - 'proposals/**'
- - '**.adoc'
- - '**.md'
- - 'KEYS'
- - 'LICENSE'
- - 'NOTICE'
- workflow_dispatch:
- inputs:
-
-concurrency:
- group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
- cancel-in-progress: true
-
-jobs:
- local-it:
-
- runs-on: ubuntu-20.04
-
- steps:
- - name: Checkout code
- uses: actions/checkout@v2
- with:
- persist-credentials: false
- submodules: recursive
-
- - name: Execute Local Tests
- uses: ./.github/actions/e2e-local
diff --git a/.github/workflows/openshift.yml b/.github/workflows/openshift.yml
deleted file mode 100644
index 479430ed1..000000000
--- a/.github/workflows/openshift.yml
+++ /dev/null
@@ -1,129 +0,0 @@
-# ---------------------------------------------------------------------------
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# ---------------------------------------------------------------------------
-
-name: openshift
-
-env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-
-on:
- pull_request:
- branches:
- - main
- - "release-*"
- paths-ignore:
- - 'docs/**'
- - 'proposals/**'
- - '**.adoc'
- - '**.md'
- - 'KEYS'
- - 'LICENSE'
- - 'NOTICE'
- push:
- branches:
- - main
- - "release-*"
- paths-ignore:
- - 'docs/**'
- - 'proposals/**'
- - '**.adoc'
- - '**.md'
- - 'KEYS'
- - 'LICENSE'
- - 'NOTICE'
- workflow_dispatch:
- inputs:
- pre-built-kamel-image:
- description: 'Kamel image url for skipping building of kamel stages. Used for debugging'
- required: false
- skip-problematic:
- description: 'Whether tests marked as problematic should be skipped - false by default (sets CAMEL_K_TEST_SKIP_PROBLEMATIC)'
- required: false
- default: false
- test-filters:
- description: |
- List of comma-separated key/value pairs to filter the tests in this test suite:
- TEST_INTEGRATION_COMMON_RUN, TEST_INTEGRATION_COMMON_BUILD_RUN, TEST_INTEGRATION_COMMON_CONFIG_RUN,
- TEST_INTEGRATION_COMMON_LANG_RUN, TEST_INTEGRATION_COMMON_TRAITS_RUN
- TEST_SERVICE_RUN, TEST_REGISTRY_MAVEN_WAGON_RUN
- eg. TEST_INTEGRATION_COMMON_RUN=TestBasic will only run tests prefixed with 'TestBasic'
- required: false
-
-concurrency:
- group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
- cancel-in-progress: true
-
-jobs:
- build:
- name: openshift-build
- runs-on: ubuntu-20.04
-
- steps:
- - name: Checkout code
- uses: actions/checkout@v2
- with:
- persist-credentials: false
- submodules: recursive
- - id: prepare-env
- name: Prepare Test Environment
- uses: ./.github/actions/kamel-prepare-env
-
- - id: config-cluster
- name: Configure Platform
- uses: ./.github/actions/kamel-config-cluster
- with:
- cluster-type: 'ocp3'
-
- - id: build-kamel
- name: Build Kamel
- uses: ./.github/actions/kamel-build
- with:
- image-registry-push-host: ${{ steps.config-cluster.outputs.cluster-image-registry-push-host }}
- image-registry-pull-host: ${{ steps.config-cluster.outputs.cluster-image-registry-pull-host }}
- image-namespace: ${{ steps.config-cluster.outputs.cluster-image-namespace }}
- # Builds the bundle if an OLM is available - depends on cluster being tested
- build-bundle: ${{ steps.config-cluster.outputs.cluster-has-olm }}
- # Can be empty and so catalog source will not be created
- catalog-source-namespace: ${{ steps.config-cluster.outputs.cluster-catalog-source-namespace }}
-
- - id: install-kamel-cluster-setup
- name: Install Kamel Cluster Setup
- uses: ./.github/actions/kamel-install-cluster-setup
- with:
- kube-admin-user-ctx: ${{ steps.config-cluster.outputs.cluster-kube-admin-user-ctx }}
-
- - name: Run IT 1
- run: |
- # Then run integration tests
- export CAMEL_K_CLUSTER_OCP3=true
-
- make test-integration
- make test-builder
-
- - id: change-context
- name: Change the Kamel Cluster Context to Admin
- run: |
- ./.github/actions/kamel-config-cluster/change-context.sh \
- -a "${{ steps.config-cluster.outputs.cluster-kube-admin-user-ctx }}"
-
- - name: Run IT 2
- run: |
- # Then run integration tests
- export CAMEL_K_CLUSTER_OCP3=true
-
- make test-quarkus-native
- make test-install
diff --git a/.github/workflows/verify-generate.yml b/.github/workflows/verify-generate.yml
deleted file mode 100644
index 70d6c6de2..000000000
--- a/.github/workflows/verify-generate.yml
+++ /dev/null
@@ -1,68 +0,0 @@
-# ---------------------------------------------------------------------------
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# ---------------------------------------------------------------------------
-
-name: verify-generate
-
-on:
- pull_request:
- branches:
- - main
- - "release-*"
- paths-ignore:
- - 'docs/**'
- - 'proposals/**'
- - '**.adoc'
- - '**.md'
- - 'KEYS'
- - 'LICENSE'
- - 'NOTICE'
- push:
- branches:
- - main
- - "release-*"
- paths-ignore:
- - 'docs/**'
- - 'proposals/**'
- - '**.md'
- - '**.adoc'
- - 'KEYS'
- - 'LICENSE'
- - 'NOTICE'
-
-concurrency:
- group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
- cancel-in-progress: true
-
-jobs:
- verify-generate:
- strategy:
- matrix:
- # TODO: test an all the supported OS
- # [ubuntu-20.04, macos-latest, windows-latest]
- os: [ubuntu-20.04]
-
- runs-on: ${{ matrix.os }}
- steps:
- - name: Check out code
- uses: actions/checkout@v2
- - name: Install Go
- uses: actions/setup-go@v2
- with:
- go-version: 1.18.x
- - name: Test generate
- shell: bash
- run: make generate