Skip to content

Commit 13c67f0

Browse files
authored
[CI/CD] Refactor release pipeline: verify tags and streamline outputs (#1843)
- Added tag name verification to ensure code version matches tag. - Updated packaging outputs to include `cueman` and `cuegui`. - Removed unused Docker image build steps.
1 parent 9a4412f commit 13c67f0

File tree

2 files changed

+16
-45
lines changed

2 files changed

+16
-45
lines changed

.github/workflows/packaging-pipeline.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,13 @@ jobs:
1212
container: python:3.7
1313
outputs:
1414
opencue_proto_path: ${{ steps.package_outputs.outputs.opencue_proto_path }}
15+
opencue_rqd_path: ${{ steps.package_outputs.outputs.opencue_rqd_path }}
1516
opencue_pycue_path: ${{ steps.package_outputs.outputs.opencue_pycue_path }}
1617
opencue_pyoutline_path: ${{ steps.package_outputs.outputs.opencue_pyoutline_path }}
1718
opencue_cueadmin_path: ${{ steps.package_outputs.outputs.opencue_cueadmin_path }}
1819
opencue_cueman_path: ${{ steps.package_outputs.outputs.opencue_cueman_path }}
1920
opencue_cuesubmit_path: ${{ steps.package_outputs.outputs.opencue_cuesubmit_path }}
20-
opencue_rqd_path: ${{ steps.package_outputs.outputs.opencue_rqd_path }}
21+
opencue_cuegui_path: ${{ steps.package_outputs.outputs.opencue_cuegui_path }}
2122
steps:
2223
- uses: actions/checkout@v4
2324
with:
@@ -69,6 +70,7 @@ jobs:
6970
export OPENCUE_CUEADMIN_PACKAGE_PATH="${{ needs.build_opencue_packages.outputs.opencue_cueadmin_path }}"
7071
export OPENCUE_CUEMAN_PACKAGE_PATH="${{ needs.build_opencue_packages.outputs.opencue_cueman_path }}"
7172
export OPENCUE_CUESUBMIT_PACKAGE_PATH="${{ needs.build_opencue_packages.outputs.opencue_cuesubmit_path }}"
73+
export OPENCUE_CUEGUI_PACKAGE_PATH="${{ needs.build_opencue_packages.outputs.opencue_cuegui_path }}"
7274
export OPENCUE_RQD_PACKAGE_PATH="${{ needs.build_opencue_packages.outputs.opencue_rqd_path }}"
7375
ci/run_integration_test.sh
7476

.github/workflows/release-pipeline.yml

Lines changed: 13 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,16 @@ on:
88

99
jobs:
1010
build_opencue_packages:
11+
name: Build Python Packages
1112
runs-on: ubuntu-22.04
1213
container: python:3.7
13-
name: "Build Python Packages"
1414
outputs:
1515
opencue_proto_path: ${{ steps.package_outputs.outputs.opencue_proto_path }}
1616
opencue_rqd_path: ${{ steps.package_outputs.outputs.opencue_rqd_path }}
1717
opencue_pycue_path: ${{ steps.package_outputs.outputs.opencue_pycue_path }}
1818
opencue_pyoutline_path: ${{ steps.package_outputs.outputs.opencue_pyoutline_path }}
1919
opencue_cueadmin_path: ${{ steps.package_outputs.outputs.opencue_cueadmin_path }}
20+
opencue_cueman_path: ${{ steps.package_outputs.outputs.opencue_cueman_path }}
2021
opencue_cuesubmit_path: ${{ steps.package_outputs.outputs.opencue_cuesubmit_path }}
2122
opencue_cuegui_path: ${{ steps.package_outputs.outputs.opencue_cuegui_path }}
2223
steps:
@@ -28,18 +29,19 @@ jobs:
2829
- name: Mark repository as safe (Fix for https://github.com/actions/checkout/issues/1048)
2930
run: git config --global --add safe.directory $GITHUB_WORKSPACE
3031

31-
- uses: ./.github/actions/build-python-packages
32+
- name: Get current tag name
33+
run: echo "TAG_NAME=${GITHUB_REF/refs\/tags\//}" >> ${GITHUB_ENV}
3234

33-
- name: Gather package paths
34-
id: package_outputs
35+
- name: Verify tag name and version match
3536
run: |
36-
echo "opencue_proto_path=$(ls -a packages/opencue_proto-*.whl)" >> $GITHUB_OUTPUT
37-
echo "opencue_rqd_path=$(ls -a packages/opencue_rqd-*.whl)" >> $GITHUB_OUTPUT
38-
echo "opencue_pycue_path=$(ls -a packages/opencue_pycue-*.whl)" >> $GITHUB_OUTPUT
39-
echo "opencue_pyoutline_path=$(ls -a packages/opencue_pyoutline-*.whl)" >> $GITHUB_OUTPUT
40-
echo "opencue_cuesubmit_path=$(ls -a packages/opencue_cuesubmit-*.whl)" >> $GITHUB_OUTPUT
41-
echo "opencue_cueadmin_path=$(ls -a packages/opencue_cueadmin-*.whl)" >> $GITHUB_OUTPUT
42-
echo "opencue_cuegui_path=$(ls -a packages/opencue_cuegui-*.whl)" >> $GITHUB_OUTPUT
37+
set -e
38+
if [ "v$(ci/generate_version_number.py)" != "${TAG_NAME}" ]; then
39+
echo "Version check failed: code version v$(ci/generate_version_number.py) does not match tag name ${TAG_NAME}"
40+
echo "Original GITHUB_REF: ${GITHUB_REF}"
41+
exit 1
42+
fi
43+
44+
- uses: ./.github/actions/build-python-packages
4345

4446
upload_python_packages_test:
4547
needs: build_opencue_packages
@@ -64,39 +66,6 @@ jobs:
6466
python3 -m pip install --upgrade twine
6567
python3 -m twine upload --verbose packages/opencue_*
6668
67-
build_docker_images:
68-
needs: build_opencue_packages
69-
runs-on: ubuntu-22.04
70-
name: "Build Docker Images"
71-
strategy:
72-
matrix:
73-
# Disable cuebot for now
74-
component: [pycue, rqd, pyoutline, cuesubmit, cueadmin, cuegui]
75-
76-
steps:
77-
- uses: actions/checkout@v4
78-
with:
79-
fetch-tags: true
80-
fetch-depth: 0
81-
82-
- name: Download a single artifact
83-
uses: actions/download-artifact@v4
84-
with:
85-
name: opencue_packages
86-
path: packages/
87-
88-
- name: Build ${{ matrix.component }} Docker Image
89-
run: |
90-
docker build \
91-
--build-arg OPENCUE_PROTO_PACKAGE_PATH="${{ needs.build_opencue_packages.outputs.opencue_proto_path }}" \
92-
--build-arg OPENCUE_RQD_PACKAGE_PATH="${{ needs.build_opencue_packages.outputs.opencue_rqd_path }}" \
93-
--build-arg OPENCUE_PYCUE_PACKAGE_PATH="${{ needs.build_opencue_packages.outputs.opencue_pycue_path }}" \
94-
--build-arg OPENCUE_PYOUTLINE_PACKAGE_PATH="${{ needs.build_opencue_packages.outputs.opencue_pyoutline_path }}" \
95-
--build-arg OPENCUE_CUESUBMIT_PACKAGE_PATH="${{ needs.build_opencue_packages.outputs.opencue_cuesubmit_path }}" \
96-
--build-arg OPENCUE_CUEGUI_PACKAGE_PATH="${{ needs.build_opencue_packages.outputs.opencue_cuegui_path }}" \
97-
--build-arg OPENCUE_CUEADMIN_PACKAGE_PATH="${{ needs.build_opencue_packages.outputs.opencue_cueadmin_path }}" \
98-
-f ${{ matrix.component }}/Dockerfile .
99-
10069
release_docker_images:
10170
# needs: preflight
10271
runs-on: ubuntu-22.04

0 commit comments

Comments
 (0)