You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by da...@apache.org on 2023/03/14 15:22:52 UTC
[cloudstack] 01/01: backport gha for 4.17
This is an automated email from the ASF dual-hosted git repository.
dahn pushed a commit to branch 4.17-gha-backport
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
commit deb8574eab7c7de06299ccf862c7908b64ce514d
Author: Daan Hoogland <da...@onecht.net>
AuthorDate: Tue Mar 14 16:22:32 2023 +0100
backport gha for 4.17
---
.github/boring-cyborg.yml | 4 +-
.github/workflows/build.yml | 66 +++++
.github/workflows/ci.yml | 281 ++++++++++++++++++++++
.github/workflows/codecov.yml | 7 +-
.github/workflows/coverage-check.yml | 15 +-
.github/workflows/docker-cloudstack-simulator.yml | 65 +++++
.github/workflows/linter.yml | 44 +++-
.github/workflows/main-coverage.yml | 4 +-
.github/workflows/merge-conflict-checker.yml | 11 +-
.github/workflows/{codecov.yml => rat.yml} | 41 ++--
.github/workflows/{linter.yml => ui.yml} | 40 ++-
11 files changed, 533 insertions(+), 45 deletions(-)
diff --git a/.github/boring-cyborg.yml b/.github/boring-cyborg.yml
index cc0fabdc0d2..dfab81d0f79 100644
--- a/.github/boring-cyborg.yml
+++ b/.github/boring-cyborg.yml
@@ -137,8 +137,8 @@ labelPRBasedOnFilePath:
- systemvm/debian/etc/systemd/*
"component:templates":
- tools/appliance/*
- "component:travis":
- - ".travis.yml"
+ "component:integration":
+ - ".github/workflows/*"
"component:UI":
- ui/*
"component:unit-test":
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 00000000000..f64d73db60a
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,66 @@
+# 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: Build
+
+on: [push, pull_request]
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
+ cancel-in-progress: true
+
+jobs:
+ build:
+ runs-on: ubuntu-22.04
+ steps:
+ - uses: actions/checkout@v3
+
+ - name: Set up JDK 11
+ uses: actions/setup-java@v3
+ with:
+ java-version: '11'
+ distribution: 'adopt'
+ architecture: x64
+ cache: maven
+
+ - name: Set up Python
+ uses: actions/setup-python@v4
+ with:
+ python-version: '3.8'
+ architecture: 'x64'
+
+ - name: Install Build Dependencies
+ run: |
+ sudo apt-get update
+ sudo apt-get install -y git uuid-runtime genisoimage netcat ipmitool build-essential libgcrypt20 libgpg-error-dev libgpg-error0 libopenipmi0 ipmitool libpython3-dev libssl-dev libffi-dev python3-openssl python3-dev python3-setuptools
+
+ - name: Env details
+ run: |
+ uname -a
+ whoami
+ javac -version
+ mvn -v
+ python3 --version
+ free -m
+ nproc
+ git status
+
+ - name: Noredist Build
+ run: |
+ git clone https://github.com/shapeblue/cloudstack-nonoss.git nonoss && cd nonoss && bash -x install-non-oss.sh && cd ..
+ rm -fr nonoss
+ mvn -B -P developer,systemvm -Dsimulator -Dnoredist clean install
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 00000000000..fadf33f2043
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,281 @@
+# 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: Simulator CI
+
+on: [push, pull_request]
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
+ cancel-in-progress: true
+
+jobs:
+ build:
+ runs-on: ubuntu-22.04
+
+ strategy:
+ fail-fast: false
+ matrix:
+ tests: [ "smoke/test_accounts
+ smoke/test_affinity_groups
+ smoke/test_affinity_groups_projects
+ smoke/test_annotations
+ smoke/test_async_job
+ smoke/test_attach_multiple_volumes
+ smoke/test_backup_recovery_dummy
+ smoke/test_certauthority_root
+ smoke/test_console_endpoint
+ smoke/test_create_list_domain_account_project
+ smoke/test_create_network
+ smoke/test_deploy_vgpu_enabled_vm
+ smoke/test_deploy_virtio_scsi_vm
+ smoke/test_deploy_vm_extra_config_data
+ smoke/test_deploy_vm_iso
+ smoke/test_deploy_vm_iso_uefi
+ smoke/test_deploy_vm_root_resize
+ smoke/test_deploy_vm_with_userdata
+ smoke/test_deploy_vms_in_parallel
+ smoke/test_deploy_vms_with_varied_deploymentplanners
+ smoke/test_diagnostics
+ smoke/test_direct_download
+ smoke/test_disk_offerings
+ smoke/test_disk_provisioning_types
+ smoke/test_domain_disk_offerings
+ smoke/test_domain_network_offerings
+ smoke/test_domain_service_offerings
+ smoke/test_domain_vpc_offerings",
+ "smoke/test_dynamicroles
+ smoke/test_enable_account_settings_for_domain
+ smoke/test_enable_role_based_users_in_projects
+ smoke/test_events_resource
+ smoke/test_global_settings
+ smoke/test_guest_vlan_range
+ smoke/test_host_maintenance
+ smoke/test_hostha_kvm
+ smoke/test_hostha_simulator
+ smoke/test_internal_lb
+ smoke/test_ipv6_infra
+ smoke/test_iso
+ smoke/test_kubernetes_clusters
+ smoke/test_kubernetes_supported_versions
+ smoke/test_list_ids_parameter
+ smoke/test_loadbalance
+ smoke/test_login
+ smoke/test_2fa
+ smoke/test_metrics_api
+ smoke/test_migration
+ smoke/test_multipleips_per_nic
+ smoke/test_nested_virtualization",
+ "smoke/test_network
+ smoke/test_network_acl
+ smoke/test_network_ipv6
+ smoke/test_network_permissions
+ smoke/test_nic
+ smoke/test_nic_adapter_type
+ smoke/test_non_contigiousvlan
+ smoke/test_outofbandmanagement
+ smoke/test_outofbandmanagement_nestedplugin
+ smoke/test_over_provisioning
+ smoke/test_password_server
+ smoke/test_persistent_network
+ smoke/test_portable_publicip
+ smoke/test_portforwardingrules
+ smoke/test_primary_storage
+ smoke/test_privategw_acl
+ smoke/test_privategw_acl_ovs_gre
+ smoke/test_projects
+ smoke/test_public_ip_range
+ smoke/test_pvlan
+ smoke/test_regions
+ smoke/test_register_userdata
+ smoke/test_reset_configuration_settings
+ smoke/test_reset_vm_on_reboot
+ smoke/test_resource_accounting
+ smoke/test_resource_detail",
+ "smoke/test_router_dhcphosts
+ smoke/test_router_dns
+ smoke/test_router_dnsservice
+ smoke/test_routers
+ smoke/test_routers_iptables_default_policy
+ smoke/test_routers_network_ops
+ smoke/test_scale_vm
+ smoke/test_secondary_storage
+ smoke/test_service_offerings
+ smoke/test_snapshots
+ smoke/test_ssvm
+ smoke/test_staticroles
+ smoke/test_templates
+ smoke/test_update_security_group
+ smoke/test_usage
+ smoke/test_usage_events
+ smoke/test_vm_deployment_planner
+ smoke/test_vm_life_cycle
+ smoke/test_vm_lifecycle_unmanage_import
+ smoke/test_vm_snapshot_kvm
+ smoke/test_vm_snapshots
+ smoke/test_volumes
+ smoke/test_vpc_ipv6
+ smoke/test_vpc_redundant
+ smoke/test_vpc_router_nics
+ smoke/test_vpc_vpn",
+ "component/find_hosts_for_migration
+ component/test_acl_isolatednetwork
+ component/test_acl_isolatednetwork_delete
+ component/test_acl_listsnapshot",
+ "component/test_acl_listvm
+ component/test_acl_listvolume",
+ "component/test_acl_sharednetwork
+ component/test_acl_sharednetwork_deployVM-impersonation
+ component/test_user_private_gateway
+ component/test_user_shared_network",
+ "component/test_affinity_groups_projects
+ component/test_allocation_states
+ component/test_assign_vm",
+ "component/test_concurrent_snapshots_limit
+ component/test_cpu_domain_limits
+ component/test_cpu_limits
+ component/test_cpu_max_limits
+ component/test_cpu_project_limits
+ component/test_deploy_vm_userdata_multi_nic",
+ "component/test_egress_fw_rules
+ component/test_invalid_gw_nm
+ component/test_ip_reservation",
+ "component/test_lb_secondary_ip
+ component/test_list_nics
+ component/test_list_pod
+ component/test_memory_limits",
+ "component/test_mm_domain_limits
+ component/test_mm_max_limits
+ component/test_mm_project_limits
+ component/test_network_offering
+ component/test_non_contiguous_vlan",
+ "component/test_persistent_networks
+ component/test_project_configs
+ component/test_project_limits
+ component/test_project_resources",
+ "component/test_project_usage
+ component/test_protocol_number_security_group
+ component/test_public_ip
+ component/test_resource_limits",
+ "component/test_regions_accounts
+ component/test_routers
+ component/test_snapshots
+ component/test_stopped_vm
+ component/test_tags
+ component/test_templates
+ component/test_updateResourceCount
+ component/test_update_vm",
+ "component/test_volumes
+ component/test_vpc
+ component/test_vpc_distributed_routing_offering
+ component/test_vpc_network
+ component/test_vpc_offerings
+ component/test_vpc_routers
+ component/test_vpn_users",
+ "component/test_vpc_network_lbrules" ]
+
+ steps:
+ - uses: actions/checkout@v3
+
+ - name: Set up JDK
+ uses: actions/setup-java@v3
+ with:
+ java-version: '11'
+ distribution: 'adopt'
+ architecture: x64
+ cache: maven
+
+ - name: Set up Python
+ uses: actions/setup-python@v4
+ with:
+ python-version: '3.8'
+ architecture: 'x64'
+
+ - name: Install Build Dependencies
+ run: |
+ sudo apt-get update
+ sudo apt-get install -y git uuid-runtime genisoimage netcat ipmitool build-essential libgcrypt20 libgpg-error-dev libgpg-error0 libopenipmi0 ipmitool libpython3-dev libssl-dev libffi-dev python3-openssl python3-dev python3-setuptools
+
+ - name: Install Python dependencies
+ run: |
+ python3 -m pip install --user --upgrade urllib3 lxml paramiko nose texttable ipmisim pyopenssl pycrypto mock flask netaddr pylint pycodestyle six astroid
+
+ - name: Env details
+ run: |
+ uname -a
+ whoami
+ javac -version
+ mvn -v
+ python3 --version
+ free -m
+ nproc
+ git status
+ ipmitool -V
+
+ - name: Setup MySQL Server
+ run: |
+ # https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2004-Readme.md#mysql
+ sudo apt-get install -y mysql-server
+ sudo systemctl start mysql
+ sudo mysql -uroot -proot -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY ''; FLUSH PRIVILEGES;"
+ sudo systemctl restart mysql
+ sudo mysql -uroot -e "SELECT VERSION();"
+
+ - name: Build with Maven
+ run: |
+ mvn -B -P developer,systemvm -Dsimulator clean install -DskipTests=true
+
+ - name: Setup Simulator Prerequisites
+ run: |
+ sudo python3 -m pip install --upgrade netaddr mysql-connector-python
+ python3 -m pip install --user --upgrade tools/marvin/dist/Marvin-*.tar.gz
+ mvn -q -Pdeveloper -pl developer -Ddeploydb
+ mvn -q -Pdeveloper -pl developer -Ddeploydb-simulator
+
+ - name: Start CloudStack Management Server with Simulator
+ run: |
+ export MAVEN_OPTS="-Xmx4096m -XX:MaxPermSize=800m -Djava.security.egd=file:/dev/urandom"
+ echo -e "\nStarting simulator"
+ set +e
+ mvn -Dsimulator -Dorg.eclipse.jetty.annotations.maxWait=120 -pl :cloud-client-ui jetty:run 2>&1 > /tmp/jetty-log || true &
+ while ! nc -vzw 5 localhost 8096 2>&1 > /dev/null; do grep Exception /tmp/jetty-log; sleep 10; done
+ set -e
+ echo -e "\nStarting Advanced Zone DataCenter deployment"
+ python3 tools/marvin/marvin/deployDataCenter.py -i setup/dev/advanced.cfg 2>&1 || true
+
+ - name: Run Integration Tests with Simulator
+ run: |
+ mkdir -p integration-test-results/smoke/misc
+ mkdir -p integration-test-results/component
+ set -e
+ TESTS="${{ matrix.tests }}"
+ echo "Tests in this job: $TESTS"
+
+ TESTS=($(echo $TESTS | tr -d '\n' | tr -s ' '))
+ for suite in "${TESTS[@]}" ; do
+ echo -e "Currently running test: $suite\n"
+ time nosetests-3.4 --with-xunit --xunit-file=integration-test-results/$suite.xml --with-marvin --marvin-config=setup/dev/advanced.cfg test/integration/$suite.py -s -a tags=advanced,required_hardware=false --zone=Sandbox-simulator --hypervisor=simulator || true ;
+ done
+
+ echo -e "Stopping Simulator, integration tests run completed\n"
+ mvn -Dsimulator -pl client jetty:stop 2>&1
+ find /tmp//MarvinLogs -type f -exec echo -e "Printing marvin logs {} :\n" \; -exec cat {} \;
+
+ - name: Integration Tests Result
+ run: |
+ echo -e "Simulator CI Test Results: (only failures listed)\n"
+ python3 ./tools/marvin/xunit-reader.py integration-test-results/
diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml
index b21061fb681..e4eaa041044 100644
--- a/.github/workflows/codecov.yml
+++ b/.github/workflows/codecov.yml
@@ -22,10 +22,15 @@ on: [pull_request, push]
permissions:
contents: read
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
+ cancel-in-progress: true
+
jobs:
build:
+ if: github.repository == 'apache/cloudstack'
name: codecov
- runs-on: ubuntu-latest
+ runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
diff --git a/.github/workflows/coverage-check.yml b/.github/workflows/coverage-check.yml
index 0a51702f11f..b94c2aa5080 100644
--- a/.github/workflows/coverage-check.yml
+++ b/.github/workflows/coverage-check.yml
@@ -19,10 +19,18 @@ name: PR Quality Check
on: [pull_request_target]
+permissions:
+ contents: read
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
+ cancel-in-progress: true
+
jobs:
build:
- name: JaCoCo Coverage
- runs-on: ubuntu-latest
+ if: github.repository == 'apache/cloudstack'
+ name: Sonar JaCoCo Coverage
+ runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
@@ -88,7 +96,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
PR_ID: ${{ github.event.pull_request.number }}
+ HEADREF: ${{ github.event.pull_request.head.ref }}
run: |
git clone https://github.com/shapeblue/cloudstack-nonoss.git nonoss
cd nonoss && bash -x install-non-oss.sh && cd ..
- mvn -P quality -Dsimulator -Dnoredist clean install org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=apache_cloudstack -Dsonar.pullrequest.key=$PR_ID -Dsonar.pullrequest.branch=${{ github.event.pull_request.head.ref }} -Dsonar.pullrequest.github.repository=apache/cloudstack -Dsonar.pullrequest.provider=GitHub -Dsonar.pullrequest.github.summary_comment=true
+ mvn -P quality -Dsimulator -Dnoredist clean install org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=apache_cloudstack -Dsonar.pullrequest.key="$PR_ID" -Dsonar.pullrequest.branch="$HEADREF" -Dsonar.pullrequest.github.repository=apache/cloudstack -Dsonar.pullrequest.provider=GitHub -Dsonar.pullrequest.github.summary_comment=true
diff --git a/.github/workflows/docker-cloudstack-simulator.yml b/.github/workflows/docker-cloudstack-simulator.yml
new file mode 100644
index 00000000000..ac6a6bfb2dc
--- /dev/null
+++ b/.github/workflows/docker-cloudstack-simulator.yml
@@ -0,0 +1,65 @@
+# 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: Docker Image Build
+
+on:
+ push:
+ branches:
+ - main
+ tags:
+ - 4.*
+ - 5.*
+
+permissions:
+ contents: read
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
+ cancel-in-progress: true
+
+jobs:
+ build:
+ if: github.repository == 'apache/cloudstack'
+ runs-on: ubuntu-22.04
+ steps:
+ - name: Login to Docker Registry
+ uses: docker/login-action@v2
+ with:
+ registry: ${{ secrets.DOCKER_REGISTRY }}
+ username: ${{ secrets.DOCKERHUB_USER }}
+ password: ${{ secrets.DOCKERHUB_TOKEN }}
+
+ - name: Set Docker repository name
+ run: echo "DOCKER_REPOSITORY=apache" >> $GITHUB_ENV
+
+ - uses: actions/checkout@v3
+
+ - name: Set ACS version
+ run: echo "ACS_VERSION=$(grep '<version>' pom.xml | head -2 | tail -1 | cut -d'>' -f2 |cut -d'<' -f1)" >> $GITHUB_ENV
+
+ - name: Set Docker image TAG
+ run: echo "TAG=$(if [ "${{ github.ref_type }}" = "tag" ];then echo ${{ github.ref_name }}; elif [[ "${ACS_VERSION}" =~ .*-SNAPSHOT ]];then echo ${ACS_VERSION}-$(date +'%Y%m%d-%H%M%S');else echo ${ACS_VERSION};fi)" >> $GITHUB_ENV
+
+ - name: Set Docker image FULL TAG
+ run: echo "FULL_TAG=$(if [ "${{ secrets.DOCKER_REGISTRY }}" = "" ];then echo ${DOCKER_REPOSITORY}/cloudstack-simulator:${TAG};else echo ${{ secrets.DOCKER_REGISTRY }}/${DOCKER_REPOSITORY}/cloudstack-simulator:${TAG};fi)" >> $GITHUB_ENV
+
+ - name: Build the Docker image for cloudstack-simulator
+ run: cd tools/docker && docker build ../.. --file Dockerfile --tag ${FULL_TAG}
+
+ - name: Push Docker image to Docker Registry
+ run: docker push ${FULL_TAG}
diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml
index 32ba10adf27..e29e7014ca8 100644
--- a/.github/workflows/linter.yml
+++ b/.github/workflows/linter.yml
@@ -19,14 +19,48 @@ name: Lint Code Base
on: [pull_request]
+permissions:
+ contents: read
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
+ cancel-in-progress: true
+
jobs:
build:
- name: SuperLinter Check
- runs-on: ubuntu-latest
+ permissions:
+ contents: read # for actions/checkout to fetch code
+ statuses: write # for github/super-linter to mark status of each linter run
+ name: Super-Linter Check
+ runs-on: ubuntu-22.04
steps:
- - uses: actions/checkout@v3
+ - name: Checkout Code
+ uses: actions/checkout@v3
+ with:
+ # Full git history is needed to get a proper list of changed files within `super-linter`
+ fetch-depth: 0
- name: SuperLinter
- uses: github/super-linter@v4
+ uses: github/super-linter/slim@v4.9.6
env:
- VALIDATE_PYTHON_FLAKE8: true
+ DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ VALIDATE_ALL_CODEBASE: false
+ VALIDATE_PYTHON_FLAKE8: true
+ pre-commit:
+ name: Run pre-commit
+ runs-on: ubuntu-22.04
+ steps:
+ - name: Check Out
+ uses: actions/checkout@v3
+ - name: Install
+ run: |
+ python -m pip install --upgrade pip
+ pip install pre-commit
+ - name: Set PY
+ run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
+ - uses: actions/cache@v3
+ with:
+ path: ~/.cache/pre-commit
+ key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
+ - name: Run pre-commit
+ run: pre-commit run --all-files
diff --git a/.github/workflows/main-coverage.yml b/.github/workflows/main-coverage.yml
index cd54d7d82a5..42efa4d17c8 100644
--- a/.github/workflows/main-coverage.yml
+++ b/.github/workflows/main-coverage.yml
@@ -24,8 +24,8 @@ on:
jobs:
build:
- name: Main Build
- runs-on: ubuntu-latest
+ name: Main Sonar JaCoCo Build
+ runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
diff --git a/.github/workflows/merge-conflict-checker.yml b/.github/workflows/merge-conflict-checker.yml
index 4eb950c9421..860e1c1b561 100644
--- a/.github/workflows/merge-conflict-checker.yml
+++ b/.github/workflows/merge-conflict-checker.yml
@@ -21,9 +21,18 @@ on:
pull_request_target:
types: [synchronize]
+permissions: # added using https://github.com/step-security/secure-workflows
+ contents: read
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
+ cancel-in-progress: true
+
jobs:
triage:
- runs-on: ubuntu-latest
+ permissions:
+ pull-requests: write # for eps1lon/actions-label-merge-conflict to label PRs
+ runs-on: ubuntu-22.04
steps:
- name: Conflict Check
uses: eps1lon/actions-label-merge-conflict@v2.0.0
diff --git a/.github/workflows/codecov.yml b/.github/workflows/rat.yml
similarity index 59%
copy from .github/workflows/codecov.yml
copy to .github/workflows/rat.yml
index b21061fb681..81a9573eb70 100644
--- a/.github/workflows/codecov.yml
+++ b/.github/workflows/rat.yml
@@ -15,36 +15,33 @@
# specific language governing permissions and limitations
# under the License.
-name: Coverage Check
+name: License Check
-on: [pull_request, push]
+on: [push, pull_request]
-permissions:
- contents: read
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
+ cancel-in-progress: true
jobs:
build:
- name: codecov
- runs-on: ubuntu-latest
+ runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
-
- - name: Set up JDK11
+ - name: Set up JDK 11
uses: actions/setup-java@v3
with:
- distribution: 'temurin'
java-version: '11'
- cache: 'maven'
-
- - name: Build CloudStack with Quality Checks
+ distribution: 'adopt'
+ architecture: x64
+ cache: maven
+ - name: RAT licence checks
run: |
- git clone https://github.com/shapeblue/cloudstack-nonoss.git nonoss
- cd nonoss && bash -x install-non-oss.sh && cd ..
- mvn -P quality -Dsimulator -Dnoredist clean install
-
- - uses: codecov/codecov-action@v3
- with:
- files: ./client/target/site/jacoco-aggregate/jacoco.xml
- fail_ci_if_error: true
- verbose: true
- name: codecov
+ git clone https://github.com/shapeblue/cloudstack-nonoss.git nonoss && cd nonoss && bash -x install-non-oss.sh && cd ..
+ rm -fr nonoss
+ mvn -P developer,systemvm -Dsimulator -Dnoredist -pl . org.apache.rat:apache-rat-plugin:0.12:check
+ - name: Rat Report
+ if: always()
+ run: |
+ echo -e "Printing RAT report\n"
+ cat target/rat.txt || true
diff --git a/.github/workflows/linter.yml b/.github/workflows/ui.yml
similarity index 55%
copy from .github/workflows/linter.yml
copy to .github/workflows/ui.yml
index 32ba10adf27..8b60f470682 100644
--- a/.github/workflows/linter.yml
+++ b/.github/workflows/ui.yml
@@ -15,18 +15,40 @@
# specific language governing permissions and limitations
# under the License.
-name: Lint Code Base
+name: UI Build
-on: [pull_request]
+on: [push, pull_request]
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
+ cancel-in-progress: true
jobs:
build:
- name: SuperLinter Check
- runs-on: ubuntu-latest
+ runs-on: ubuntu-22.04
+
steps:
- uses: actions/checkout@v3
- - name: SuperLinter
- uses: github/super-linter@v4
- env:
- VALIDATE_PYTHON_FLAKE8: true
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Set up Node
+ uses: actions/setup-node@v3
+ with:
+ node-version: 14
+
+ - name: Env details
+ run: |
+ uname -a
+ whoami
+ free -m
+ nproc
+ npm version
+
+ - name: Build UI
+ run: |
+ cd ui
+ sudo npm install -g @vue/cli npm-check-updates
+ rm -f package-lock.json
+ npm install
+ npm run build
+ npm run lint
+ npm run test:unit