task: move files and organize them #198
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- main | |
- "release-*" | |
pull_request: | |
branches: | |
- main | |
- "release-*" | |
concurrency: | |
group: trustify-operator-ci-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
rancher: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
kubernetes_version: | |
[ | |
latest, | |
v1.23.17-k3s1, | |
v1.24.17-k3s1, | |
v1.25.16-k3s4, | |
v1.26.15-k3s1, | |
v1.27.15-k3s2, | |
v1.28.11-k3s2, | |
] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: "temurin" | |
java-version: "21" | |
cache: "maven" | |
- name: Test | |
env: | |
KUBERNETES_VERSION: ${{ matrix.kubernetes_version }} | |
run: mvn verify | |
crc: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
preset: [ "openshift", "microshift" ] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: "temurin" | |
java-version: "21" | |
cache: "maven" | |
- name: Install required virtualization software | |
run: | | |
sudo apt-get update | |
sudo apt install qemu-kvm libvirt-daemon libvirt-daemon-system | |
sudo usermod -a -G libvirt $USER | |
- name: Remove unwanted stuff to free up disk image | |
run: | | |
df -h | |
sudo rm -rf /usr/share/dotnet | |
sudo rm -rf /usr/local/lib/android | |
sudo rm -rf /opt/ghc | |
sudo rm -rf "/usr/local/share/boost" | |
sudo rm -rf /opt/hostedtoolcache/CodeQL | |
sudo docker image prune --all --force | |
sudo swapoff -a | |
sudo rm -f /mnt/swapfile | |
df -h | |
- name: Download crc | |
run: | | |
wget https://developers.redhat.com/content-gateway/file/pub/openshift-v4/clients/crc/2.44.0/crc-linux-amd64.tar.xz | |
mkdir -p bin/ && tar -xJf crc-linux-amd64.tar.xz --strip-components=1 -C bin/ | |
sudo mv ./bin/crc /usr/local/bin/crc && rm -r bin/ | |
- name: Set the crc config | |
run: | | |
echo eyJhdXRocyI6eyJjbG91ZC5vcGVuc2hpZnQuY29tIjp7ImF1dGgiOiJiM0JsYm5Ob2FXWjBMWEpsYkdWaGMyVXRaR1YySzI5amJWOWhZMk5sYzNOZk16RTFaRE16TWpJM09HVXpOR000WTJKbFkyVmxOMlU0TVRoa1pEazNNRGc2VERKSldUVlVUVlZQUTA5VlRraFdTRTFRUjBaRFdEaFBTRUpVTVVaU1RrZEtOMU5EUVZFMlFrOUlPRWRHVERjMVVFeE9UVTB5VFRsUldFZzFSbGMyT1E9PSIsImVtYWlsIjoidHJ1c3QuZ2l0LmJvdEBnbWFpbC5jb20ifSwicXVheS5pbyI6eyJhdXRoIjoiYjNCbGJuTm9hV1owTFhKbGJHVmhjMlV0WkdWMksyOWpiVjloWTJObGMzTmZNekUxWkRNek1qSTNPR1V6TkdNNFkySmxZMlZsTjJVNE1UaGtaRGszTURnNlRESkpXVFZVVFZWUFEwOVZUa2hXU0UxUVIwWkRXRGhQU0VKVU1VWlNUa2RLTjFORFFWRTJRazlJT0VkR1REYzFVRXhPVFUweVRUbFJXRWcxUmxjMk9RPT0iLCJlbWFpbCI6InRydXN0LmdpdC5ib3RAZ21haWwuY29tIn0sInJlZ2lzdHJ5LmNvbm5lY3QucmVkaGF0LmNvbSI6eyJhdXRoIjoiZkhWb1l5MXdiMjlzTFRSak9HTTVOREV5TFRJeFltRXROREUxWmkwNU5UQmxMVEk1TXpWak9HRXhPREk1TmpwbGVVcG9Za2RqYVU5cFNsTlZlbFY0VFdsS09TNWxlVXA2WkZkSmFVOXBTbXhPYWxGNldsUlZNVTFIUlRKT1YwVXdUVEpKTlU5VWFHcFpiVlpzV2tSb2JFMUhSbXhOYW1oc1drTktPUzVuVVRWV05EZHNUalo1U0RCNFFWSnlSRkJPTVhKbFUwNHhTblJaY1ZwdWN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lQwZDNTR1ZtTjJsd2JYYzFXbGxuTnkweFlsVXlhVE16VTJKdVFrSXRaRkIwVWpWMGExSXlRMlZSVlRGU01tWlVZMUJNZW1GallrZHFka1IyVDJsdmVYQm5kalZvWmxneGNUVnpRak4wVlRObWJ6WjFVemxEZVdwVWFXUndaME5NTVVwcFJFNU9Ra2hYUVVOeFpFbzNPRmhvVTNGclQwVkRiRWxLTUZSNVdsaHJOblUwUkRCeGMxRlZhM2xRZDB0MFpVOWhkRmxoTFZKSE1USmZSMDFDTUhGSGFrVkhkSGw2WlRKSGMzUndkbDk2VDJWTmEyUjBRM2xIVjJkNGRtRmZSVk5QTVZKSVpFVkdSMFkzYVRrdGJrVXpkMEpSWDIxNWVYWnlNSFZTVlZSVFRWSnhNWGN6WkRsaFNVdHpXWE54WkVkdWVsRjFjWFJLVlZCYVRpMUVURU54UTBOd1FrUnJabkZCVmw4d1FYVlFWa3hoTmtaVmFtSmFRVE5yVERrMlRWTnZMVmh5VTFwME1UWjVORmQzTTJadGJpMTBVbDlXUVE9PSIsImVtYWlsIjoidHJ1c3QuZ2l0LmJvdEBnbWFpbC5jb20ifX19 | base64 --decode > pull-secret.txt | |
crc config set preset ${{ matrix.preset }} | |
crc config set pull-secret-file pull-secret.txt | |
crc config set network-mode user | |
crc config set consent-telemetry no | |
- name: Setup and Start the crc | |
run: | | |
sudo -su $USER crc setup | |
sudo -su $USER crc start | |
sleep 60 | |
- name: Copy OpenShift client | |
run: sudo cp /home/$USER/.crc/bin/oc/oc /usr/bin/ | |
- name: Copy the kubeconfig file to required location | |
run: | | |
mkdir -p /home/$USER/.kube | |
cp /home/$USER/.crc/machines/crc/kubeconfig /home/$USER/.kube/config | |
oc get pods -A | |
- name: Test | |
run: | | |
export HOST_KUBERNETES_CONFIG_FILE=/home/$USER/.kube/config | |
echo "Using ${HOST_KUBERNETES_CONFIG_FILE} as host k8s" | |
mvn verify | |
build-operator-bundle: | |
runs-on: ubuntu-latest | |
env: | |
IMG: ttl.sh/trustify-operator-${{ github.sha }}:2h | |
BUNDLE_IMG: ttl.sh/trustify-operator-bundle-${{ github.sha }}:2h | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Create operator | |
run: DOCKERFILE=Dockerfile.jvm make docker-build docker-push | |
- name: Create operator-bundle | |
run: make bundle-build bundle-push | |
run-ci: | |
needs: build-operator-bundle | |
uses: trustification/trustify-ci/.github/workflows/global-ci.yml@main | |
with: | |
operator_bundle: ttl.sh/trustify-operator-bundle-${{ github.sha }}:2h |