This is an automated email from the ASF dual-hosted git repository.

pcongiusti pushed a commit to branch release-1.10.x
in repository https://gitbox.apache.org/repos/asf/camel-k.git


The following commit(s) were added to refs/heads/release-1.10.x by this push:
     new 4329bdd39 Remove unused ocp3 option from CI cluster config
4329bdd39 is described below

commit 4329bdd390dc9b918c2183e118cc61122d8807cc
Author: Claudio Miranda <[email protected]>
AuthorDate: Wed May 17 20:35:59 2023 -0300

    Remove unused ocp3 option from CI cluster config
---
 .../actions/kamel-config-cluster-ocp3/action.yml   | 233 ---------------------
 .github/actions/kamel-config-cluster/action.yaml   |  23 +-
 .github/workflows/openshift.yml                    | 129 ------------
 3 files changed, 3 insertions(+), 382 deletions(-)

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 6f26853d6..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
-
-        sudo rm -f /etc/resolv.conf
-        sudo ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf
-        sudo sh -c 'echo "DNS=8.8.8.8 4.4.4.4" >> /etc/systemd/resolved.conf'
-        sudo service systemd-resolved restart
-
-        # set docker0 to promiscuous mode
-        sudo ip link set docker0 promisc on
-
-        # Download and install the oc binary
-        sudo mount --make-shared /
-
-        sudo service docker stop
-        sudo echo '{"insecure-registries": ["172.30.0.0/16"]}' | sudo tee 
/etc/docker/daemon.json > /dev/null
-        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
-        sudo mv oc.bin /usr/local/bin/oc
-        sudo chmod 755 /usr/local/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
-        sudo mkdir -p /home/runner/lib/oc
-        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 "::set-output name=cluster-kube-admin-user-ctx::$(oc config 
current-context)"
-
-        # 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 "::set-output name=cluster-kube-user-ctx::$(oc config 
current-context)"
-
-    - id: extract-config
-      shell: bash
-      if: ${{ env.CLUSTER_OCP3_CONFIGURED != 'true' }}
-      run: |
-        echo "::set-output name=cluster-image-registry-pull-host::"
-        echo "::set-output name=cluster-image-registry-push-host::"
-        echo "::set-output name=cluster-image-registry-insecure::$(echo true)"
-        echo "::set-output name=cluster-has-olm::$(echo false)"
-        echo "::set-output name=cluster-image-namespace::$(echo apache)"
-        echo "::set-output name=cluster-global-operator-namespace::$(echo 
openshift-operators)"
-        /* 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/actions/kamel-config-cluster/action.yaml 
b/.github/actions/kamel-config-cluster/action.yaml
index f58327aad..a77b8dc99 100644
--- a/.github/actions/kamel-config-cluster/action.yaml
+++ b/.github/actions/kamel-config-cluster/action.yaml
@@ -20,7 +20,7 @@ description: 'Delegates to respective cluster action 
depending on type of reques
 
 inputs:
   cluster-type:
-    description: 'The type of cluster required: [kind, ocp3, custom]'
+    description: 'The type of cluster required: [kind, custom]'
     required: true
     default: 'kind'
   cluster-config-data:
@@ -54,11 +54,6 @@ runs:
       uses: ./.github/actions/kamel-config-cluster-kind
       if: ${{ env.CLUSTER_TYPE == 'kind' }}
 
-    - id: execute-ocp3
-      name: Maybe Execute Minishift Cluster
-      uses: ./.github/actions/kamel-config-cluster-ocp3
-      if: ${{ env.CLUSTER_TYPE == 'ocp3' }}
-
     - id: execute-custom
       name: Maybe Execute Custom Cluster
       uses: ./.github/actions/kamel-config-cluster-custom
@@ -69,10 +64,10 @@ runs:
 
     - id: execute-invalid
       name: Execute Invalid Cluster
-      if: ${{ env.CLUSTER_TYPE != 'kind' &&  env.CLUSTER_TYPE != 'ocp3' &&  
env.CLUSTER_TYPE != 'custom' }}
+      if: ${{ env.CLUSTER_TYPE != 'kind' &&  env.CLUSTER_TYPE != 'custom' }}
       shell: bash
       run: |
-        echo "Error: Unrecognised cluster request for type of cluster. Should 
be kind, ocp3 or custom."
+        echo "Error: Unrecognised cluster request for type of cluster. Should 
be kind or custom."
         exit 1
 
     - id: cluster-config
@@ -105,18 +100,6 @@ runs:
             -s "${{ 
steps.execute-custom.outputs.cluster-image-registry-insecure }}" \
             -u "${{ steps.execute-custom.outputs.cluster-kube-user-ctx }}"
             ;;
-        ocp3)
-          # Does not require cluster-catalog-source-name or namespace
-          ./.github/actions/kamel-config-cluster/output-config.sh \
-            -a "${{ steps.execute-ocp3.outputs.cluster-kube-admin-user-ctx }}" 
\
-            -g "${{ 
steps.execute-ocp3.outputs.cluster-global-operator-namespace }}" \
-            -n "${{ steps.execute-ocp3.outputs.cluster-image-namespace }}" \
-            -o "${{ steps.execute-ocp3.outputs.cluster-has-olm }}" \
-            -p "${{ 
steps.execute-ocp3.outputs.cluster-image-registry-push-host }}" \
-            -q "${{ 
steps.execute-ocp3.outputs.cluster-image-registry-pull-host }}" \
-            -s "${{ steps.execute-ocp3.outputs.cluster-image-registry-insecure 
}}" \
-            -u "${{ steps.execute-ocp3.outputs.cluster-kube-user-ctx }}"
-            ;;
         esac
 
       #
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

Reply via email to