Aurora IT tests failing periodically with download of node (#34107)
Closes #33767 Co-authored-by: Jon Koops <jonkoops@gmail.com> Signed-off-by: Ryan Emerson <remerson@redhat.com>
This commit is contained in:
parent
358d234538
commit
044d71bd77
6 changed files with 41 additions and 17 deletions
18
.github/actions/maven-cache/action.yml
vendored
18
.github/actions/maven-cache/action.yml
vendored
|
@ -54,18 +54,6 @@ runs:
|
|||
key: ${{ steps.weekly-cache-key.outputs.key }}
|
||||
enableCrossOsArchive: true
|
||||
|
||||
- name: Get Node.js and PNPM versions
|
||||
id: tooling-versions
|
||||
shell: bash
|
||||
run: |
|
||||
echo "node=$(mvn help:evaluate -Dexpression=node.version -q -DforceStdout | cut -c 2-)" >> $GITHUB_OUTPUT
|
||||
echo "pnpm=$(mvn help:evaluate -Dexpression=pnpm.version -q -DforceStdout)" >> $GITHUB_OUTPUT
|
||||
|
||||
# Downloading Node.js often fails due to network issues, therefore we cache the artifacts downloaded by the frontend plugin.
|
||||
- uses: actions/cache@v4
|
||||
name: Cache Node.js related artifacts
|
||||
with:
|
||||
path: |
|
||||
~/.m2/repository/com/github/eirslett/node
|
||||
~/.m2/repository/com/github/eirslett/pnpm
|
||||
key: ${{ runner.os }}-frontend-plugin-artifacts-${{ steps.tooling-versions.outputs.node }}-${{ steps.tooling-versions.outputs.pnpm }}
|
||||
- id: node-cache
|
||||
name: Node cache
|
||||
uses: ./.github/actions/node-cache
|
||||
|
|
21
.github/actions/node-cache/action.yml
vendored
Normal file
21
.github/actions/node-cache/action.yml
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
name: Node Cache
|
||||
description: Caches Node and PNPM binaries
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Get Node.js and PNPM versions
|
||||
id: tooling-versions
|
||||
shell: bash
|
||||
run: |
|
||||
echo "node=$(mvn help:evaluate -Dexpression=node.version -q -DforceStdout | cut -c 2-)" >> $GITHUB_OUTPUT
|
||||
echo "pnpm=$(mvn help:evaluate -Dexpression=pnpm.version -q -DforceStdout)" >> $GITHUB_OUTPUT
|
||||
|
||||
# Downloading Node.js often fails due to network issues, therefore we cache the artifacts downloaded by the frontend plugin.
|
||||
- uses: actions/cache@v4
|
||||
name: Cache Node.js and PNPM binaries
|
||||
with:
|
||||
path: |
|
||||
~/.m2/repository/com/github/eirslett/node
|
||||
~/.m2/repository/com/github/eirslett/pnpm
|
||||
key: ${{ runner.os }}-frontend-plugin-artifacts-${{ steps.tooling-versions.outputs.node }}-${{ steps.tooling-versions.outputs.pnpm }}
|
|
@ -9,6 +9,8 @@ fi
|
|||
REGION=$1
|
||||
CLUSTER_NAME=$2
|
||||
KEYCLOAK_SRC=$3
|
||||
MAVEN_ARCHIVE=$4
|
||||
|
||||
ansible-playbook -i ${CLUSTER_NAME}_${REGION}_inventory.yml keycloak.yml \
|
||||
-e "keycloak_src=\"${KEYCLOAK_SRC}\""
|
||||
-e "keycloak_src=\"${KEYCLOAK_SRC}\"" \
|
||||
-e "maven_archive=\"${MAVEN_ARCHIVE}\""
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
ansible_ssh_user: ec2-user
|
||||
# Workspace on the remote hosts
|
||||
kc_home: /opt/keycloak
|
||||
m2_home: ~/.m2
|
||||
update_system_packages: no
|
||||
install_java: yes
|
||||
java_version: 21
|
||||
|
|
|
@ -27,3 +27,10 @@
|
|||
src: "{{ keycloak_src }}"
|
||||
dest: "{{ kc_home }}"
|
||||
owner: "{{ ansible_ssh_user }}"
|
||||
|
||||
- name: Install Maven repository on the remote hosts
|
||||
unarchive:
|
||||
src: "{{ maven_archive }}"
|
||||
creates: "{{ kc_home }}"
|
||||
dest: "{{ kc_home }}"
|
||||
owner: "{{ ansible_ssh_user }}"
|
||||
|
|
7
.github/workflows/ci.yml
vendored
7
.github/workflows/ci.yml
vendored
|
@ -418,6 +418,10 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- id: node-cache
|
||||
name: Node cache
|
||||
uses: ./.github/actions/node-cache
|
||||
|
||||
- id: aurora-init
|
||||
name: Initialize Aurora environment
|
||||
run: |
|
||||
|
@ -457,6 +461,7 @@ jobs:
|
|||
|
||||
git archive --format=zip --output /tmp/keycloak.zip $GITHUB_REF
|
||||
zip -u /tmp/keycloak.zip aws.pem
|
||||
tar -C ~/ -czvf m2.tar.gz .m2
|
||||
|
||||
cd .github/scripts/ansible
|
||||
python3 -m venv .venv
|
||||
|
@ -464,7 +469,7 @@ jobs:
|
|||
./aws_ec2.sh requirements
|
||||
pipx inject ansible-core boto3 botocore
|
||||
./aws_ec2.sh create ${AWS_REGION} ${EC2_CLUSTER_NAME}
|
||||
./keycloak_ec2_installer.sh ${AWS_REGION} ${EC2_CLUSTER_NAME} /tmp/keycloak.zip
|
||||
./keycloak_ec2_installer.sh ${AWS_REGION} ${EC2_CLUSTER_NAME} /tmp/keycloak.zip m2.tar.gz
|
||||
./mvn_ec2_runner.sh ${AWS_REGION} ${EC2_CLUSTER_NAME} "clean install -B -DskipTests -Pdistribution"
|
||||
./mvn_ec2_runner.sh ${AWS_REGION} ${EC2_CLUSTER_NAME} "clean install -B -DskipTests -pl testsuite/integration-arquillian/servers/auth-server/quarkus -Pauth-server-quarkus -Pdb-aurora-postgres -Dmaven.build.cache.enabled=true"
|
||||
|
||||
|
|
Loading…
Reference in a new issue