Skip to content

Commit 4f3750c

Browse files
authored
fix(workflows): example workflow has race condition and needs new deps for build (#83)
* fix(workflows): remove gcc installation from Makefile * chore(workflows): update build tools for building test app * fix: buildx leaves a metadata file that can't be downloaded.
1 parent 3098973 commit 4f3750c

File tree

3 files changed

+56
-4
lines changed

3 files changed

+56
-4
lines changed

.github/workflows/example_reusable-integration.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ jobs:
211211
dry-run: false
212212
build-docker-deploy:
213213
uses: aerospike/shared-workflows/.github/workflows/[email protected]
214-
needs: extract-version
214+
needs: [extract-version, package-built-artifacts] #don't really need package-built-artifacts but we need that to finish first.
215215
with:
216216
jf-project: test
217217
image-name: test-image
@@ -335,7 +335,7 @@ jobs:
335335
echo "the test binary says:"
336336
hi
337337
create-release-bundle:
338-
needs: [use-artifacts, extract-version, deploy-artifacts]
338+
needs: [use-artifacts, use-rpm-artifacts, extract-version, deploy-artifacts]
339339
uses: aerospike/shared-workflows/.github/workflows/[email protected]
340340
if: github.event_name == 'workflow_dispatch'
341341
with:

.github/workflows/execute-build/test_apps/hi/Makefile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,16 @@ else
9393
docker run --rm -v $(PWD):/workspace -w /workspace \
9494
-e ARCH=$(ARCH) -e EMULATED=$(EMULATED) \
9595
$(DOCKER_IMAGE) \
96-
bash -c 'yum install -y --allowerasing gcc make && \
96+
bash -c 'set -e; \
97+
if command -v dnf >/dev/null 2>&1; then \
98+
dnf -y clean all && dnf -y distro-sync --refresh || dnf -y upgrade --refresh; \
99+
dnf -y makecache; \
100+
dnf -y install --allowerasing --setopt=install_weak_deps=False gcc glibc-devel make; \
101+
else \
102+
yum -y clean all && yum -y update; \
103+
yum -y makecache; \
104+
yum -y install --allowerasing gcc glibc-devel make; \
105+
fi; \
97106
CC=${CC} && \
98107
echo "Using CC: $$CC" && \
99108
echo "ARCH: $$ARCH, EMULATED: $$EMULATED" && \

.github/workflows/reusable_sign-artifacts.yaml

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ on:
3434
required: false
3535
type: string
3636
default: ubuntu-22.04
37+
nuget-environment:
38+
description: The environment to use for the NuGet packages
39+
required: false
40+
type: string
41+
default: PROD
3742

3843
secrets:
3944
gpg-private-key:
@@ -42,6 +47,15 @@ on:
4247
required: true
4348
gpg-key-pass:
4449
required: true
50+
es-username:
51+
required: false
52+
es-password:
53+
required: false
54+
credential_id:
55+
required: false
56+
es-totp_secret:
57+
required: false
58+
4559
outputs:
4660
gh-artifact-name:
4761
description: The name of the uploaded signed artifacts on github
@@ -63,7 +77,13 @@ jobs:
6377
name: ${{ inputs.gh-unsigned-artifacts }}
6478
path: unsigned-artifacts
6579
merge-multiple: true
66-
80+
- name: Get nuget packages
81+
id: nuget-packages
82+
run: |
83+
mkdir -p unsigned-nuget-packages
84+
find unsigned-artifacts -name "*.nupkg" -exec mv {} unsigned-nuget-packages/ \;
85+
echo "unsigned-nuget-packages=$(ls unsigned-nuget-packages/)" >> $GITHUB_OUTPUT
86+
echo "count=$(ls unsigned-nuget-packages/ | wc -l)" >> $GITHUB_OUTPUT
6787
- name: Checkout shared-workflows repository
6888
uses: actions/checkout@v5
6989
with:
@@ -78,6 +98,29 @@ jobs:
7898
gpg-private-key: ${{ secrets.gpg-private-key }}
7999
gpg-public-key: ${{ secrets.gpg-public-key }}
80100
gpg-key-pass: ${{ secrets.gpg-key-pass }}
101+
- name: Validate nuget secrets present
102+
if: steps.nuget-packages.outputs.count > 0
103+
run: |
104+
if [ -z "${{ secrets.es-username }}" ] || [ -z "${{ secrets.es-password }}" ] || [ -z "${{ secrets.credential_id }}" ] || [ -z "${{ secrets.es-totp_secret }}" ]; then
105+
echo "missing required secrets for NuGet signing"
106+
exit 1
107+
fi
108+
- name: Sign NuGet Packages with SSL.com
109+
uses: sslcom/esigner-codesign@a272724cb13abe0abc579c6c40f7899969b6942b # v1.3.1
110+
if: steps.nuget-packages.outputs.count > 0
111+
with:
112+
command: batch_sign
113+
username: ${{ secrets.es-username }}
114+
password: ${{ secrets.es-password }}
115+
credential_id: ${{ secrets.credential_id }}
116+
totp_secret: ${{ secrets.es-totp_secret }}
117+
dir_path: unsigned-nuget-packages
118+
output_path: ${{ inputs.gh-artifact-name }}/nuget
119+
# malware_block: true
120+
environment_name: ${{ inputs.nuget-environment }}
121+
clean_logs: true
122+
signing_method: v1
123+
81124
- name: Install dpkg-sig
82125
run: |
83126
sudo apt-get update && sudo apt-get install dpkg-sig dpkg-dev -y

0 commit comments

Comments
 (0)