Skip to content

Commit 1fe7994

Browse files
chore(ci): use VDEV env var in scripts (#24862)
* fix(ci): use VDEV env var whenever present * Install vdev in actions * Add and use vdev_cmd
1 parent 70a8bfa commit 1fe7994

File tree

11 files changed

+41
-15
lines changed

11 files changed

+41
-15
lines changed

.github/workflows/integration.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,12 @@ jobs:
8888
with:
8989
submodules: "recursive"
9090

91+
- uses: ./.github/actions/setup
92+
with:
93+
vdev: true
94+
mold: false
95+
cargo-cache: false
96+
9197
- name: Download JSON artifact from changes.yml
9298
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
9399
if: github.event_name == 'merge_group'
@@ -150,6 +156,12 @@ jobs:
150156
with:
151157
submodules: "recursive"
152158

159+
- uses: ./.github/actions/setup
160+
with:
161+
vdev: true
162+
mold: false
163+
cargo-cache: false
164+
153165
- name: Download JSON artifact from changes.yml
154166
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
155167
if: github.event_name == 'merge_group'

.github/workflows/k8s_e2e.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,12 @@ jobs:
179179
with:
180180
ref: ${{ inputs.ref }}
181181

182+
- uses: ./.github/actions/setup
183+
with:
184+
vdev: true
185+
mold: false
186+
cargo-cache: false
187+
182188
- uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
183189
with:
184190
name: e2e-test-deb-package

scripts/build-docker.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@ set -euo pipefail
1010

1111
set -x
1212

13-
CHANNEL="${CHANNEL:-"$(cargo vdev release channel)"}"
14-
VERSION="${VECTOR_VERSION:-"$(cargo vdev version)"}"
13+
vdev_cmd="${VDEV:-cargo vdev}"
14+
15+
CHANNEL="${CHANNEL:-"$($vdev_cmd release channel)"}"
16+
VERSION="${VECTOR_VERSION:-"$($vdev_cmd version)"}"
1517
DATE="${DATE:-"$(date -u +%Y-%m-%d)"}"
1618
PLATFORM="${PLATFORM:-}"
1719
PUSH="${PUSH:-"true"}"

scripts/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ FEATURES="${FEATURES:-"default"}"
2424
NATIVE_BUILD="${NATIVE_BUILD:-"true"}"
2525
TARGET="${TARGET:?"You must specify a target triple, ex: arm64-apple-darwin"}"
2626

27-
CHANNEL=${CHANNEL:-"$(cargo vdev release channel)"}
27+
CHANNEL=${CHANNEL:-"$(${VDEV:-cargo vdev} release channel)"}
2828
if [ "$CHANNEL" == "nightly" ]; then
2929
FEATURES="$FEATURES nightly"
3030
fi

scripts/cue.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ list-docs-files() {
1616
}
1717

1818
cmd_check() {
19-
cargo vdev check docs
19+
${VDEV:-cargo vdev} check docs
2020
}
2121

2222
cmd_list() {

scripts/package-archive.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ OVERWRITE=${OVERWRITE:-"true"}
2424
ARCHIVE_TYPE="${ARCHIVE_TYPE:-"tar.gz"}"
2525
NATIVE_BUILD="${NATIVE_BUILD:-"true"}"
2626
TARGET="${TARGET:?"You must specify a target triple, ex: arm64-apple-darwin"}"
27-
ARCHIVE_VERSION="${VECTOR_VERSION:-"$(cargo vdev version)"}"
27+
ARCHIVE_VERSION="${VECTOR_VERSION:-"$(${VDEV:-cargo vdev} version)"}"
2828

2929
#
3030
# Local Vars

scripts/package-deb.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ TARGET="${TARGET:?"You must specify a target triple, ex: arm64-apple-darwin"}"
1919
#
2020

2121
PROJECT_ROOT="$(pwd)"
22-
PACKAGE_VERSION="${VECTOR_VERSION:-"$(cargo vdev version)"}"
22+
PACKAGE_VERSION="${VECTOR_VERSION:-"$(${VDEV:-cargo vdev} version)"}"
2323
ARCHIVE_NAME="vector-${PACKAGE_VERSION}-$TARGET.tar.gz"
2424
ARCHIVE_PATH="target/artifacts/$ARCHIVE_NAME"
2525
ABSOLUTE_ARCHIVE_PATH="$PROJECT_ROOT/$ARCHIVE_PATH"

scripts/package-msi.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ set -euo pipefail
99

1010
set -x
1111

12-
ARCHIVE_VERSION="${VECTOR_VERSION:-"$(cargo vdev version)"}"
12+
vdev_cmd="${VDEV:-cargo vdev}"
13+
14+
ARCHIVE_VERSION="${VECTOR_VERSION:-"$($vdev_cmd version)"}"
1315

1416
rm -rf target/msi-x64
1517
cp -R distribution/msi target/msi-x64
@@ -24,7 +26,7 @@ powershell '$progressPreference = "silentlyContinue"; Expand-Archive vector-'"$A
2426
# C:\a\vector\vector\target\msi-x64\vector.wxs(6) : error CNDL0108 : The Product/@Version attribute's value, '0.29.0.custom.a28ecdc', is not a valid version.
2527
# Legal version values should look like 'x.x.x.x' where x is an integer from 0 to 65534.
2628
# , by changing "0.29.0.custom.a28ecdc" -> "0.29.0".
27-
CHANNEL="${CHANNEL:-"$(cargo vdev release channel)"}"
29+
CHANNEL="${CHANNEL:-"$($vdev_cmd release channel)"}"
2830

2931
if [[ "$CHANNEL" == "custom" ]]; then
3032
PACKAGE_VERSION="${ARCHIVE_VERSION%.custom*}"

scripts/package-rpm.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ TARGET="${TARGET:?"You must specify a target triple, ex: arm64-apple-darwin"}"
1717
# Local vars
1818
#
1919

20-
PACKAGE_VERSION="${VECTOR_VERSION:-"$(cargo vdev version)"}"
20+
PACKAGE_VERSION="${VECTOR_VERSION:-"$(${VDEV:-cargo vdev} version)"}"
2121
ARCHIVE_NAME="vector-$PACKAGE_VERSION-$TARGET.tar.gz"
2222
ARCHIVE_PATH="target/artifacts/$ARCHIVE_NAME"
2323

scripts/release-s3.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ set -euo pipefail
77
#
88
# Uploads archives and packages to S3
99

10-
CHANNEL="${CHANNEL:-"$(cargo vdev release channel)"}"
11-
VERSION="${VECTOR_VERSION:-"$(cargo vdev version)"}"
10+
vdev_cmd="${VDEV:-cargo vdev}"
11+
12+
CHANNEL="${CHANNEL:-"$($vdev_cmd release channel)"}"
13+
VERSION="${VECTOR_VERSION:-"$($vdev_cmd version)"}"
1214
DATE="${DATE:-"$(date -u +%Y-%m-%d)"}"
1315
VERIFY_TIMEOUT="${VERIFY_TIMEOUT:-"30"}" # seconds
1416
VERIFY_RETRIES="${VERIFY_RETRIES:-"2"}"

0 commit comments

Comments
 (0)