Skip to content

Commit

Permalink
test: Install dd-pkg in *-verify workflows and lint in verify-install…
Browse files Browse the repository at this point in the history
….sh (vectordotdev#20397)

Signed-off-by: Spencer Gilbert <spencer.gilbert@datadoghq.com>
  • Loading branch information
spencergilbert authored and AndrooTheChen committed Sep 23, 2024
1 parent b30e899 commit 8f907bf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 8 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@ jobs:
- build-x86_64-unknown-linux-gnu-packages
env:
VECTOR_VERSION: ${{ needs.generate-publish-metadata.outputs.vector_version }}
DD_PKG_VERSION: "latest"
strategy:
matrix:
container:
Expand All @@ -369,6 +370,9 @@ jobs:
git \
systemd \
make
- name: Install dd-pkg for linting
run: |
curl -sSL "https://dd-package-tools.s3.amazonaws.com/dd-pkg/${DD_PKG_VERSION}/dd-pkg_Linux_x86_64.tar.gz" | tar -xz -C /usr/local/bin dd-pkg
- name: Fix Git safe directories issue when in containers (actions/checkout#760)
run: git config --global --add safe.directory /__w/vector/vector
- name: Checkout Vector
Expand All @@ -393,6 +397,7 @@ jobs:
- build-x86_64-unknown-linux-gnu-packages
env:
VECTOR_VERSION: ${{ needs.generate-publish-metadata.outputs.vector_version }}
DD_PKG_VERSION: "latest"
strategy:
matrix:
container:
Expand All @@ -419,6 +424,9 @@ jobs:
if ! command -v curl &> /dev/null ; then
yum install -y curl
fi
- name: Install dd-pkg for linting
run: |
curl -sSL "https://dd-package-tools.s3.amazonaws.com/dd-pkg/${DD_PKG_VERSION}/dd-pkg_Linux_x86_64.tar.gz" | tar -xz -C /usr/local/bin dd-pkg
- name: Fix Git safe directories issue when in containers (actions/checkout#760)
run: git config --global --add safe.directory /__w/vector/vector
- name: Checkout Vector
Expand Down
4 changes: 3 additions & 1 deletion scripts/verify-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -euo pipefail
#
# SUMMARY
#
# Verifies vector packages have been installed correctly
# Verifies vector packages have been built and installed correctly

package="${1:?must pass package as argument}"

Expand Down Expand Up @@ -38,3 +38,5 @@ getent group vector || (echo "vector group missing" && exit 1)
vector --version || (echo "vector --version failed" && exit 1)
grep -q "FOO=bar" "/etc/default/vector" || (echo "/etc/default/vector has incorrect contents" && exit 1)
grep -q "foo: bar" "/etc/vector/vector.yaml" || (echo "/etc/vector/vector.yaml has incorrect contents" && exit 1)

dd-pkg lint "$package"

0 comments on commit 8f907bf

Please sign in to comment.