Skip to content

Commit

Permalink
Merge branch 'master' into spacecmd_update_ssl
Browse files Browse the repository at this point in the history
  • Loading branch information
blu-base authored Jul 9, 2023
2 parents 42634e2 + 9d8994e commit cfc0ce4
Show file tree
Hide file tree
Showing 4,795 changed files with 538,413 additions and 1,855,661 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
6 changes: 5 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ rel-eng/ @uyuni-project/release-engineering
tito.props @uyuni-project/release-engineering

# Cobbler
java/conf/cobbler/snippets/ @SchoolGuy
java/conf/cobbler/snippets/ @uyuni-project/python

# Python
*.py @uyuni-project/python
Expand Down Expand Up @@ -66,6 +66,10 @@ testsuite/ @uyuni-project/qe
# mgr-libmod
susemanager-utils/mgr-libmod/ @cbbayburt

# Generic fallback for Java, apart from changelog files
java/ @uyuni-project/java
java/*.changes*

# Individual Java packages

# XMLRPC API
Expand Down
19 changes: 0 additions & 19 deletions .github/scripts/changelog.rb

This file was deleted.

30 changes: 30 additions & 0 deletions .github/scripts/test_covering_pr.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
const Redis = require('ioredis');
const fs = require('fs').promises;

const main = async () => {
const changedFiles = process.argv.slice(2)
const redis = new Redis({
host: process.env.REDIS_HOST,
port: process.env.REDIS_PORT,
username: process.env.REDIS_USER,
password: process.env.REDIS_PASS,
enableReadyCheck: false
});
let tests = new Set();

/**
* Loop over all the files changed in the PR and check if it's covered by a test
**/
for (const filepath of changedFiles) {
var classpath = filepath.replace('java/code/src/', '');
await redis.smembers(classpath, function(err, test_names) {
test_names.forEach(function(test) {
tests.add(test);
});
});
}

console.log('<details><summary>Suggested tests to cover this Pull Request</summary><ul><li>%s</ul></details><suggested_tests>', Array.from(tests).join('<li>'));
process.exit(0);
}
main();
87 changes: 87 additions & 0 deletions .github/workflows/acceptance_tests_common.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: acceptance-tests-common
on:
workflow_call:
inputs:
secondary_tests:
required: true
type: string
env:
UYUNI_PROJECT: uyuni-project
UYUNI_VERSION: master
CUCUMBER_PUBLISH_TOKEN: ${{ secrets.CUCUMBER_PUBLISH_TOKEN }}
jobs:
test-uyuni:
runs-on: ubuntu-22.04
steps:
- name: fix podman
run: sudo apt install podman=3.4.4+ds1-1ubuntu1 --allow-downgrades
- name: welcome_message
run: echo "Running acceptance tests. More info at https://github.com/uyuni-project/uyuni/wiki/Running-Acceptance-Tests-at-PR"
- uses: actions/checkout@v3
- name: Cache-jar-files
uses: actions/cache@v3
with:
path: java/buildconf/ivy/repository/
key: ${{ runner.os }}-build-cache-uyuni-jars-${{ hashFiles('**/java/buildconf/ivy/*.xml') }}
restore-keys: |
${{ runner.os }}-build-cache-uyuni-jars-
- name: Cache-obs-to-maven files
uses: actions/cache@v3
with:
path: java/.obs-to-maven-cache
key: ${{ runner.os }}-build-cache-uyuni-obs-to-maven-${{ hashFiles('**/java/buildconf/ivy/obs-maven-config.yaml') }}
restore-keys: |
${{ runner.os }}-build-cache-uyuni-obs-to-maven-
- name: Cache-nodejs
uses: actions/cache@v3
with:
path: web/html/src/node_modules
key: ${{ runner.os }}-build-cache-uyuni-nodejs-${{ hashFiles('**/web/html/src/yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-cache-uyuni-nodejs-
- name: create_tmp
run: ./testsuite/podman_runner/01_setup_tmp_dirs.sh
- name: create-podman-network
run: ./testsuite/podman_runner/02_setup_network.sh
- name: start_controller
run: ./testsuite/podman_runner/03_run_controller.sh
- name: create_ssh_conf
run: ./testsuite/podman_runner/04_setup_ssh_controller.sh
- name: install_gems_in_controller
run: ./testsuite/podman_runner/05_install_gems_in_controller.sh
- name: start-server-container
run: ./testsuite/podman_runner/06_start_server.sh
- name: mgr-setup
run: ./testsuite/podman_runner/07_manager_setup.sh
- name: build_code
run: ./testsuite/podman_runner/08_build_server_code.sh
# - name: copy_ca
# run: podman exec uyuni-server-all-in-one-test bash -c "cp /etc/pki/tls/certs/spacewalk.crt /tmp"
# - name: update_ca_in_controller
# run: podman exec controller-test bash -c "cat /tmp/spacewalk.crt >> /etc/ssl/ca-bundle.pem"
- name: sle-sshminion
run: ./testsuite/podman_runner/09_run_sshminion.sh
- name: test_from_host
run: curl --insecure https://localhost:8443/rhn/help/Copyright.do
- name: test_from_container
run: sudo -i podman exec opensusessh curl --insecure https://uyuni-server-all-in-one-test:443/rhn/help/Copyright.do
- name: setup_sshd
run: ./testsuite/podman_runner/10_setup_sshd.sh
- name: run_cucumber_core
run: ./testsuite/podman_runner/11_run_core_tests.sh
- name: sle-salt-minion
run: ./testsuite/podman_runner/12_run_salt_sle_minion.sh
- name: rhlike-minion
run: ./testsuite/podman_runner/13_run_salt_rhlike_minion.sh
- name: deblike-minion
run: ./testsuite/podman_runner/14_run_salt_deblike_minion.sh
- name: accept_keys
run: ./testsuite/podman_runner/15_accept_all_keys.sh
- name: run_cucumber_clients
run: ./testsuite/podman_runner/16_run_init_clients_tests.sh
- name: split_secondary
run: ./testsuite/podman_runner/18_split_secondary_p_tests.sh
- name: run_secondary_tests
run: ./testsuite/podman_runner/${{ inputs.secondary_tests }}

16 changes: 16 additions & 0 deletions .github/workflows/acceptance_tests_secondary.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: acceptance-tests-secondary
on:
pull_request:
paths:
- 'java/**'
- 'web/html/src/**'
- 'testsuite/**'
- '.github/workflows/acceptance_tests_secondary.yml'
- '.github/workflows/acceptance_tests_common.yml'
- '!java/*.changes*'
jobs:
test-uyuni:
uses: ./.github/workflows/acceptance_tests_common.yml
with:
secondary_tests: "17_run_secondary_tests.sh"

19 changes: 19 additions & 0 deletions .github/workflows/acceptance_tests_secondary_parallel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: acceptance-tests-secondary-parallel
on:
pull_request:
paths:
- 'java/**'
- 'web/html/src/**'
- 'testsuite/**'
- '.github/workflows/acceptance_tests_secondary_parallel.yml'
- '.github/workflows/acceptance_tests_common.yml'
- '!java/*.changes*'
jobs:
test-uyuni:
uses: ./.github/workflows/acceptance_tests_common.yml
strategy:
fail-fast: false
matrix:
set: ['1', '2', '3', '4', '5']
with:
secondary_tests: "18_run_secondary_parallelizable_tests_subset.sh ${{ matrix.set }}"
2 changes: 1 addition & 1 deletion .github/workflows/automatic-frontend-lint-fix-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

strategy:
matrix:
node-version: [14.x]
node-version: [16.x]

steps:
- uses: actions/checkout@v3
Expand Down
191 changes: 191 additions & 0 deletions .github/workflows/build_containers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
name: Create and publish docker images used for the CI

on: workflow_dispatch

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build-and-push-server-all-in-one-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/ci-test-server-all-in-one

- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: ./testsuite/dockerfiles/server-all-in-one/
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-and-push-server-all-in-one-dev-image:
needs: build-and-push-server-all-in-one-image
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/ci-test-server-all-in-one-dev

- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: ./testsuite/dockerfiles/server-all-in-one-dev/
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
BASE=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/ci-test-server-all-in-one
VERSION=master
build-and-push-ubuntu-minion-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/ci-test-ubuntu-minion

- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: ./testsuite/dockerfiles/ubuntu-minion/
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-and-push-opensuse-minion-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/ci-test-opensuse-minion

- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: ./testsuite/dockerfiles/opensuse-minion/
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-and-push-rocky-minion-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/ci-test-rocky-minion

- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: ./testsuite/dockerfiles/rocky-minion/
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-and-push-controller-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/ci-test-controller-dev

- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: ./testsuite/dockerfiles/controller-dev/
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Loading

0 comments on commit cfc0ce4

Please sign in to comment.