-
Notifications
You must be signed in to change notification settings - Fork 307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DAOS-16262 build: Add weekly bullseye build and test GHA #15287
Closed
Closed
Changes from 15 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
0905646
DAOS-16262 build: Add weekly bullseye build and test GHA
phender fbbfa79
Merge branch 'master' into pahender/DAOS-16285_master2
phender b973d2c
Avoid code re-use with compositre actions.
phender 94163e2
Updates.
phender 007d69f
Build-rpm action updates
phender a3d7efd
Fix actions syntax
phender ae4bf42
Using composite actions.
phender 09ccb80
Merge branch 'master' into pahender/DAOS-16285_master2
phender f3d71a3
Attempt to resolve action errors.
phender 3520c1a
Add missing 'shell: bash'.
phender 5c5ee7d
Fix missing required property.
phender ccc327b
Fix build-variables.
phender caf8861
More fixes.
phender cb2c7ab
Updates.
phender 8a76f64
functional-test updates.
phender c782bbc
Fix secrets error.
phender 1d6949b
Pass secret as input to composite action.
phender cc7116a
Fix typo.
phender File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,148 @@ | ||
name: 'Build RPM' | ||
description: 'Build DAOS RPMs' | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
distro: | ||
type: choice | ||
options: | ||
- el8 | ||
- el9 | ||
- leap15 | ||
version: | ||
type: string | ||
required: true | ||
build_version: | ||
type: string | ||
required: true | ||
covfn_disabled: | ||
type: bool | ||
default: true | ||
repo_file_url: | ||
type: string | ||
required: true | ||
jenkins_url: | ||
type: string | ||
required: true | ||
daos_full_name: | ||
type: string | ||
required: true | ||
daos_email: | ||
type: string | ||
required: true | ||
artifactory_url: | ||
type: string | ||
required: true | ||
repo_path: | ||
type: string | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Set build variables | ||
id: build-vars | ||
uses: ./.github/actions/build-variables | ||
with: | ||
distro: ${{ inputs.distro }} | ||
version: ${{ inputs.version }} | ||
build_version: ${{ inputs.build_version }} | ||
- name: Checkout code | ||
uses: actions/[email protected] | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
- name: Build RPM Docker image | ||
id: build-rpm-docker-image | ||
continue-on-error: true | ||
run: docker build --file utils/rpms/packaging/Dockerfile.mockbuild | ||
--build-arg CACHEBUST=$(date +%s%3N) | ||
--build-arg CB0=$(date +%V) | ||
--build-arg REPO_FILE_URL=${{ inputs.repo_file_url }} | ||
--build-arg UID=$(id -u) | ||
--build-arg FVERSION=${{ steps.build-vars.outputs.fversion }} | ||
--build-arg JENKINS_URL=${{ inputs.jenkins_url }} | ||
--tag mock-build | ||
utils/rpms | ||
shell: bash | ||
- name: Build RPM | ||
id: build-rpm | ||
continue-on-error: true | ||
# yamllint disable rule:line-length | ||
run: rm -rf mock_result; | ||
mkdir -p mock_result; | ||
docker run --name mock-build-${{ github.run_id }}-${{ github.run_attempt }}-${{ inputs.distro }} | ||
--user build | ||
-v "$PWD":"$PWD" -w "$PWD" | ||
-v "$PWD"/mock_result:/var/lib/mock/${{ steps.build-vars.outputs.chroot_name }}/result | ||
--privileged=true | ||
-e DAOS_FULLNAME="${{ inputs.daos_full_name }}" | ||
-e DAOS_EMAIL="${{ inputs.daos_email }}" | ||
-e DISTRO_VERSION="${{ steps.build-vars.outputs.distro_version }}" | ||
-e STAGE_NAME="Build RPM on ${{ steps.build-vars.outputs.build_name }}" | ||
-e CHROOT_NAME="${{ steps.build-vars.outputs.chroot_name}}" | ||
-e ARTIFACTORY_URL="${{ inputs.artifactory_url}}" | ||
-e REPO_FILE_URL="${{ inputs.repo_file_url }}" | ||
-e JENKINS_URL=${{ inputs.jenkins_url }} | ||
-e TARGET="${{ inputs.distro }}" | ||
-e COVFN_DISABLED="${{ inputs.covfn_disabled }}" | ||
mock-build ci/rpm/build.sh | ||
shell: bash | ||
- name: Build RPM failure log | ||
id: build-rpm-fail-log | ||
continue-on-error: true | ||
if: steps.build-rpm.outcome != 'success' | ||
run: cat mock_result/root.log; | ||
cat mock_result/build.log | ||
shell: bash | ||
- name: Save RPM build logs | ||
continue-on-error: true | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ steps.build-vars.outputs.stage_name }} logs | ||
path: | | ||
mock_result/root.log | ||
mock_result/build.log | ||
- name: Create lastBuild and lastSuccessfulBuild symlinks | ||
if: steps.build-rpm.outcome == 'success' | ||
run: . ci/gha_functions.sh; | ||
mkdir -p ${REPO_PATH}; | ||
rm -f ${REPO_PATH}last{,Successful}Build; | ||
ln -s ${{ github.run_number }} ${REPO_PATH}lastBuild; | ||
ln -s ${{ github.run_number }} ${REPO_PATH}lastSuccessfulBuild | ||
shell: bash | ||
- name: Create repo | ||
id: create-repo | ||
if: steps.build-rpm.outcome == 'success' | ||
continue-on-error: true | ||
run: ci/rpm/create_repo.sh | ||
shell: bash | ||
env: | ||
TARGET: ${{ inputs.distro }} | ||
- name: Test repo | ||
id: test-repo | ||
if: steps.create-repo.outcome == 'success' | ||
continue-on-error: true | ||
run: . ci/gha_functions.sh; | ||
dnf --disablerepo=\* --repofrompath testrepo,file://${REPO_FILE} repoquery -a | ||
shell: bash | ||
env: | ||
# yamllint disable-line rule:line-length | ||
REPO_FILE: ${{ inputs.repo_path }}${{ github.run_number }}/artifact/artifacts/${{ inputs.distro }} | ||
- name: Remove lastSuccessfulBuild link and exit failure | ||
if: steps.test-repo.outcome != 'success' | ||
run: rm -f ${{ inputs.repo_path }}lastSuccessfulBuild; | ||
exit 1 | ||
shell: bash | ||
- name: Publish RPMs | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
# yamllint disable-line rule:line-length | ||
name: ${{ steps.build-vars.outputs.distro_name }} ${{ steps.build-vars.outputs.distro_version }} RPM repository | ||
path: ${{ inputs.REPO_PATH}}${{ github.run_number }}/artifact/artifacts/${{ inputs.distro }} | ||
- name: Update commit status | ||
uses: ouzi-dev/commit-status-updater@v2 | ||
with: | ||
# yamllint disable-line rule:line-length | ||
name: 'build/Build RPM on ${{ steps.build-vars.outputs.distro_name }} ${{ steps.build-vars.outputs.commit_status_distro_version }}' | ||
status: "${{ job.status }}" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
name: 'Build Variables' | ||
description: 'Set variables for build based upon distro version' | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
distro: | ||
type: choice | ||
options: | ||
- el8 | ||
- el9 | ||
- leap15 | ||
version: | ||
type: string | ||
required: true | ||
build_version: | ||
type: string | ||
required: true | ||
|
||
outputs: | ||
fversion: | ||
value: ${{ steps.set-variables.outputs.fversion }} | ||
inst_rpms: | ||
value: ${{ steps.set-variables.outputs.inst_rpms }} | ||
chroot_name: | ||
value: ${{ steps.set-variables.outputs.chroot_name }} | ||
distro_name: | ||
value: ${{ steps.set-variables.outputs.distro_name }} | ||
distro_name_upper: | ||
value: ${{ steps.set-variables.outputs.distro_name_upper }} | ||
distro_name_lower: | ||
value: ${{ steps.set-variables.outputs.distro_name_lower }} | ||
distro_version: | ||
value: ${{ steps.set-variables.outputs.distro_version }} | ||
distro_version_major: | ||
value: ${{ steps.set-variables.outputs.distro_version_major }} | ||
commit_status_distro_version: | ||
value: ${{ steps.set-variables.outputs.commit_status_distro_version }} | ||
openmpi: | ||
value: ${{ steps.set-variables.outputs.openmpi }} | ||
build_chroot: | ||
value: ${{ steps.set-variables.outputs.build_chroot }} | ||
build_name: | ||
value: ${{ steps.set-variables.outputs.build_name }} | ||
distro: | ||
value: ${{ steps.set-variables.outputs.distro }} | ||
provision_distro: | ||
value: ${{ steps.set-variables.outputs.provision_distro }} | ||
local_repo_name: | ||
value: ${{ steps.set-variables.outputs.local_repo_name }} | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Set variables | ||
id: set-variables | ||
run: | | ||
FVERSION="38" | ||
INST_RPMS="daos-client daos-tests daos-server daos-serialize daos-tests-internal" | ||
case ${{ inputs.distro }} in | ||
'el8') | ||
CHROOT_NAME="rocky+epel-8-x86_64" | ||
DISTRO_NAME="EL" | ||
DISTRO_NAME_UPPER="EL" | ||
DISTRO_NAME_LOWER="el" | ||
DISTRO_VERSION="${{ inputs.build_version }}" | ||
DISTRO_VERSION_MAJOR="8" | ||
PROVISION_VERSION_MAJOR="8" | ||
COMMIT_STATUS_DISTRO_VERSION="8" | ||
OPENMPI="openmpi" | ||
;; | ||
'el9') | ||
CHROOT_NAME="rocky+epel-9-x86_64" | ||
DISTRO_NAME="EL" | ||
DISTRO_NAME_UPPER="EL" | ||
DISTRO_NAME_LOWER="el" | ||
DISTRO_VERSION="${{ inputs.build_version }}" | ||
DISTRO_VERSION_MAJOR="9" | ||
PROVISION_VERSION_MAJOR="8" | ||
COMMIT_STATUS_DISTRO_VERSION="${{ inputs.build_version }}" | ||
OPENMPI="openmpi" | ||
;; | ||
'leap15') | ||
CHROOT_NAME="opensuse-leap-${{ inputs.build_version }}-x86_64" | ||
DISTRO_NAME="Leap" | ||
DISTRO_NAME_UPPER="LEAP" | ||
DISTRO_NAME_LOWER="leap" | ||
DISTRO_VERSION="${{ inputs.build_version }}" | ||
DISTRO_VERSION_MAJOR="15" | ||
PROVISION_VERSION_MAJOR="15" | ||
COMMIT_STATUS_DISTRO_VERSION="${{ inputs.build_version }}" | ||
OPENMPI="openmpi3" | ||
;; | ||
esac | ||
echo "fversion=${FVERSION}" >> $GITHUB_OUTPUT | ||
echo "inst_rpms=${INST_RPMS}" >> $GITHUB_OUTPUT | ||
echo "chroot_name=${CHROOT_NAME}" >> $GITHUB_OUTPUT | ||
echo "distro_name=${DISTRO_NAME}" >> $GITHUB_OUTPUT | ||
echo "distro_name_upper=${DISTRO_NAME_UPPER}" >> $GITHUB_OUTPUT | ||
echo "distro_name_lower=${DISTRO_NAME_LOWER}" >> $GITHUB_OUTPUT | ||
echo "distro_version=${DISTRO_VERSION}" >> $GITHUB_OUTPUT | ||
echo "distro_version_major=${DISTRO_VERSION_MAJOR}" >> $GITHUB_OUTPUT | ||
echo "commit_status_distro_version=${COMMIT_STATUS_DISTRO_VERSION}" >> $GITHUB_OUTPUT | ||
echo "openmpi=${OPENMPI}" >> $GITHUB_OUTPUT | ||
echo "build_chroot=/var/lib/mock/${CHROOT_NAME}-${{ github.run_id }}/" >> $GITHUB_OUTPUT | ||
echo "build_name=${DISTRO_NAME} ${DISTRO_VERSION}" >> $GITHUB_OUTPUT | ||
echo "distro=${DISTRO_NAME_UPPER}_${DISTRO_VERSION_MAJOR}" >> $GITHUB_OUTPUT | ||
echo "provision_distro=${DISTRO_NAME_UPPER}_${PROVISION_VERSION_MAJOR}" >> $GITHUB_OUTPUT | ||
echo "local_repo_name=${DISTRO_NAME_UPPER}_${PROVISION_VERSION_MAJOR}" >> $GITHUB_OUTPUT | ||
|
||
# echo -n "DAOS_STACK_${DISTRO_NAME_UPPER}_" >> $GITHUB_ENV | ||
# echo "${PROV_DISTRO_VERSION_MAJOR:-$DISTRO_VERSION_MAJOR}_LOCAL_REPO=not_used" >> \ | ||
# $GITHUB_ENV | ||
shell: bash |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
name: 'Functional Test' | ||
description: 'Run VM functional tests against DAOS RPMs' | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
distro: | ||
type: choice | ||
options: | ||
- el8 | ||
- el9 | ||
- leap15 | ||
version: | ||
type: string | ||
required: true | ||
build_version: | ||
type: string | ||
required: true | ||
cluster_label: | ||
type: string | ||
default: true | ||
tags: | ||
type: string | ||
required: true | ||
ftest_args: | ||
type: string | ||
default: "--nvme=auto" | ||
jenkins_url: | ||
type: string | ||
default: https://build.hpdd.intel.com/ | ||
secrets: | ||
GITHUB_TOKEN: | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Set build variables | ||
id: build-vars | ||
uses: ./.github/actions/build-variables | ||
with: | ||
distro: ${{ inputs.distro }} | ||
version: ${{ inputs.version }} | ||
build_version: ${{ inputs.build_version }} | ||
- name: Set variables | ||
run: | | ||
set -eux | ||
env | ||
echo "CHROOT_NAME=${{ steps.build-vars.outputs.chroot_name }}" >> $GITHUB_ENV | ||
echo "DISTRO_NAME=${{ steps.build-vars.outputs.distro_name }}" >> $GITHUB_ENV | ||
echo "DISTRO_VERSION=${{ steps.build-vars.outputs.distro_version }}" >> $GITHUB_ENV | ||
echo -n "DISTRO_WITH_VERSION=" >> $GITHUB_ENV | ||
echo -n "${{ steps.build-vars.outputs.distro_name_lower }}" >> $GITHUB_ENV | ||
echo "${{ steps.build-vars.outputs.distro_version }}" >> $GITHUB_ENV | ||
echo "BUILD_CHROOT=${{ steps.build-vars.outputs.build_chroot }}" >> $GITHUB_ENV | ||
echo "STAGE_NAME=Functional on ${{ steps.build-vars.outputs.build_name }}" >> $GITHUB_ENV | ||
echo "STAGE_TAGS=${{ inputs.tags }}" >> $GITHUB_ENV | ||
echo "FTEST_ARG=${{ inputs.ftest_args }}" >> $GITHUB_ENV | ||
echo "DISTRO=${{ steps.build-vars.outputs.distro }}" >> $GITHUB_ENV | ||
echo "PROVISION_DISTRO=${{ steps.build-vars.outputs.provision_distro }}" >> $GITHUB_ENV | ||
echo -n "DAOS_STACK_${{ steps.build-vars.outputs.local_repo_name }}" >> $GITHUB_ENV | ||
echo "_LOCAL_REPO=not_used" >> $GITHUB_ENV | ||
echo "LABEL=${{ inputs.cluster_label }}" >> $GITHUB_ENV | ||
echo "INST_RPMS=${{ steps.build-vars.outputs.inst_rpms }}" >> $GITHUB_ENV | ||
shell: bash | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
fetch-depth: 500 | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
- name: Request and Provision a Cluster | ||
uses: ./.github/actions/provision-cluster | ||
- name: Run Test | ||
id: run-test | ||
run: | | ||
. ci/gha_functions.sh | ||
NODE_COUNT="$NODE_COUNT" | ||
TEST_TAG=${{ inputs.tags }} | ||
FTEST_ARG="${{ inputs.ftest_args }}" ci/functional/test_main.sh | ||
shell: bash | ||
- name: Cancel cluster request (if cancelled after requesting) | ||
if: cancelled() | ||
run: | | ||
set -eux | ||
. ci/gha_functions.sh | ||
if ! JENKINS_URL="${{ inputs.jenkins_url }}" QUEUE_URL="${{ env.QUEUE_URL }}" \ | ||
cancel_provision; then | ||
# probably already provisioned and needs un-provisioning | ||
if ! cleanup_provision_request "${{ inputs.cluster_request_reqid }}"; then | ||
exit 1 | ||
fi | ||
fi | ||
shell: bash | ||
- name: Job cleanup | ||
if: (!cancelled() && (success() || failure())) | ||
run: | | ||
set -eux | ||
. ci/gha_functions.sh | ||
NODELIST=${{ env.NODESTRING }} ci/functional/job_cleanup.sh || true | ||
cleanup_provision_request "${{ env.CLUSTER_REQUEST_reqid }}" | ||
shell: bash | ||
- name: Publish test results | ||
if: (!cancelled()) && (success() || failure()) && | ||
steps.run-test.outcome != 'skipped' | ||
uses: EnricoMi/publish-unit-test-result-action@v2 | ||
with: | ||
check_name: ${{ env.STAGE_NAME }} Test Results (old) | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
junit_files: ${{ env.STAGE_NAME }}/**/results.xml | ||
- name: Publish artifacts | ||
if: (!cancelled()) && (success() || failure()) && | ||
steps.run-test.outcome != 'skipped' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ env.STAGE_NAME }} artifacts | ||
path: ${{ env.STAGE_NAME }}/** | ||
- name: Upload test results | ||
if: (success() || failure()) && | ||
steps.run-test.outcome != 'skipped' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ env.STAGE_NAME }} test-results | ||
path: ${{ env.STAGE_NAME }}/**/results.xml | ||
- name: Update commit status | ||
uses: ouzi-dev/commit-status-updater@v2 | ||
with: | ||
# yamllint disable-line rule:line-length | ||
name: 'test/Functional on ${{ env.DISTRO_NAME }} ${{ env.COMMIT_STATUS_DISTRO_VERSION && env.COMMIT_STATUS_DISTRO_VERSION || env.DISTRO_VERSION }}' | ||
status: "${{ job.status }}" |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can't do this. Per SDL, we are not allowed to distribute unsigned binaries.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the same code as https://github.com/daos-stack/daos/blob/master/.github/workflows/rpm-build-and-test.yml#L301-L305. Doesn't it just add the RPMs to Artifactory so that the functional test stages can install those RPMs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which is being replaced by https://github.com/daos-stack/actions-lib/pull/1/files#diff-46a90c32d59a22431144045d82ce732bc5a498ea20229b697bc2fd2154899662R423-R428 and https://github.com/daos-stack/daos/pull/14177/files#diff-681a2eb462568f244d2fd51eff96c3d9945e33dec02ee489c680a742a0bdcef4R79-R85 which you can see comments out that upload.
No. That uploads them to the artifacts in GitHub, where anyone can download them. This is the part that puts us off-side of the SDL.
Moreover, we don't put RPMs from PRs into Artifactory. With Jenkins, we install them from the artifacts of the Jenkins job itself and in GHA they are stored in this location https://github.com/daos-stack/daos/pull/14177/files#diff-681a2eb462568f244d2fd51eff96c3d9945e33dec02ee489c680a742a0bdcef4R79-R85 by ci/rpm/create_repo.sh.