Update node ignore_changes. #177
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: Minimal tests | |
on: | |
pull_request: | |
paths-ignore: | |
- "**.md" | |
- "examples/**" | |
- ".github/workflows/*" | |
- "!.github/workflows/test-fast.yaml" | |
push: | |
paths-ignore: | |
- "**.md" | |
- "examples/**" | |
- ".github/workflows/*" | |
- "!.github/workflows/test-fast.yaml" | |
jobs: | |
minimal: | |
runs-on: ubuntu-latest | |
env: | |
SONOBUOY_VERSION: 0.51.0 | |
WORKING_DIR: "examples/minimal" | |
OS_AUTH_URL: ${{ secrets.OS_AUTH_URL }} | |
OS_IDENTITY_API_VERSION: ${{ secrets.OS_IDENTITY_API_VERSION }} | |
OS_PASSWORD: ${{ secrets.OS_PASSWORD }} | |
OS_PROJECT_ID: ${{ secrets.OS_PROJECT_ID }} | |
OS_PROJECT_NAME: ${{ secrets.OS_PROJECT_NAME }} | |
OS_REGION_NAME: ${{ secrets.OS_REGION_NAME }} | |
OS_USERNAME: ${{ secrets.OS_USERNAME }} | |
OS_USER_DOMAIN_NAME: ${{ secrets.OS_USER_DOMAIN_NAME }} | |
environment: nova | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: hashicorp/setup-terraform@v3 | |
with: | |
terraform_version: 1.0.0 | |
terraform_wrapper: false | |
- name: Set up ssh-agent | |
run: ssh-agent -s |grep -E '^(SSH_AUTH_SOCK|SSH_AGENT_PID)'|cut -f1 -d ';' >> $GITHUB_ENV | |
- name: Create and add key to ssh-agent | |
run: ssh-keygen -t rsa -N '' -f ~/.ssh/id_rsa && ssh-add | |
- name: Using local module source | |
run: sed -i "s+remche/rke2/openstack+./../..+" main.tf | |
working-directory: ${{ env.WORKING_DIR }} | |
- name: Terraform init | |
run: terraform init | |
working-directory: ${{ env.WORKING_DIR }} | |
- name: Terraform apply | |
run: TF_VAR_cluster_name=$GITHUB_RUN_ID terraform apply -auto-approve -lock=false | grep -v remote-exec | |
working-directory: ${{ env.WORKING_DIR }} | |
- name: Wait for cluster to be available | |
run: | | |
K8S_API_SERVER=$(terraform output -raw server_ip) | |
until (nc -z $K8S_API_SERVER 6443); do echo Wait for master node && sleep 10; done; | |
working-directory: ${{ env.WORKING_DIR }} | |
- uses: azure/setup-kubectl@v3.2 | |
- name: Wait for nodes to be ready | |
run: kubectl wait nodes --all --for=condition=ready --kubeconfig $(pwd)/rke2.yaml --timeout -1s | |
working-directory: ${{ env.WORKING_DIR }} | |
- name: Download and run Sonobuoy | |
run: | | |
curl -L https://github.com/vmware-tanzu/sonobuoy/releases/download/v{$SONOBUOY_VERSION}/sonobuoy_${SONOBUOY_VERSION}_linux_amd64.tar.gz -o -| tar xvz sonobuoy | |
./sonobuoy run --kubeconfig $(pwd)/rke2.yaml --wait --mode quick | |
working-directory: ${{ env.WORKING_DIR }} | |
- name: Terraform destroy | |
if: ${{ always() }} | |
run: TF_VAR_cluster_name=$GITHUB_RUN_ID terraform destroy -auto-approve -lock=false | |
working-directory: ${{ env.WORKING_DIR }} |