-
Notifications
You must be signed in to change notification settings - Fork 7
87 lines (83 loc) · 5.37 KB
/
Copy pathIntermediateCleanUp.yml
File metadata and controls
87 lines (83 loc) · 5.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# ==================================================================================================================== #
# Authors: #
# Patrick Lehmann #
# #
# ==================================================================================================================== #
# Copyright 2020-2026 The pyTooling Authors #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #
# you may not use this file except in compliance with the License. #
# You may obtain a copy of the License at #
# #
# http://www.apache.org/licenses/LICENSE-2.0 #
# #
# Unless required by applicable law or agreed to in writing, software #
# distributed under the License is distributed on an "AS IS" BASIS, #
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
# See the License for the specific language governing permissions and #
# limitations under the License. #
# #
# SPDX-License-Identifier: Apache-2.0 #
# ==================================================================================================================== #
name: Intermediate Cleanup
on:
workflow_call:
inputs:
ubuntu_image_version:
description: 'Ubuntu image version.'
required: false
default: '26.04'
type: string
sqlite_coverage_artifacts_prefix:
description: 'Prefix for SQLite coverage artifacts to be removed.'
required: false
default: ''
type: string
xml_unittest_artifacts_prefix:
description: 'Prefix for XML unittest artifacts to be removed.'
required: false
default: ''
type: string
jobs:
IntermediateCleanUp:
name: 🗑️ Intermediate Artifact Cleanup
runs-on: "ubuntu-${{ inputs.ubuntu_image_version }}"
steps:
- name: ⚠️ Deprecation warning
shell: bash
run: |
printf "::warning title=Deprecated workflow::%s\n" \
"'IntermediateCleanUp.yml' is deprecated and will be removed in r8. Use 'CleanupArtifacts.yml' instead."
printf "\n"
printf "%s\n" "'IntermediateCleanUp.yml' is deprecated and will be removed in r8."
printf "%s\n" "Use 'CleanupArtifacts.yml' instead, which resolves artifact names from the"
printf "%s\n" "'artifact_names' JSON dictionary produced by 'Parameters.yml', so the caller"
printf "%s\n" "no longer assembles artifact names itself."
printf "\n"
printf "%s\n" "Migration:"
printf "%s\n" " * Pass the whole 'artifact_names' dictionary of 'Parameters.yml' as 'json',"
printf "%s\n" " instead of assembling a prefix per artifact kind."
printf "%s\n" " * Both prefix parameters become entries of 'artifact-json-ids' using the"
printf "%s\n" " postfix form, which is what matches the per-matrix-job variants:"
printf "\n"
printf "%s\n" " artifact-json-ids: >-"
printf "%s\n" " codecoverage_sqlite:-*"
printf "%s\n" " unittesting_xml:-*"
printf "\n"
printf "%s\n" " * Give the job an 'if' containing a status check function, e.g. '!cancelled()',"
printf "%s\n" " so a skipped upstream job doesn't skip the cleanup."
printf "\n"
printf "%s\n" "See 'CompletePipeline.yml' for a worked example - it instantiates"
printf "%s\n" "'CleanupArtifacts.yml' for the intermediate as well as the final cleanup."
- name: 🗑️ Delete SQLite coverage artifacts from matrix jobs
uses: geekyeggo/delete-artifact@v6
if: inputs.sqlite_coverage_artifacts_prefix != ''
continue-on-error: true
with:
name: ${{ inputs.sqlite_coverage_artifacts_prefix }}*
- name: 🗑️ Delete JUnit XML artifacts from matrix jobs
uses: geekyeggo/delete-artifact@v6
if: inputs.xml_unittest_artifacts_prefix != ''
continue-on-error: true
with:
name: ${{ inputs.xml_unittest_artifacts_prefix }}*