Skip to content

Commit da9e923

Browse files
committed
fix ci
1 parent 3e0e767 commit da9e923

File tree

2 files changed

+26
-29
lines changed

2 files changed

+26
-29
lines changed

.github/workflows/mlflow-ci.yml

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,6 @@ jobs:
139139
helm-install-test:
140140
runs-on: ubuntu-22.04
141141
needs: [create-release]
142-
env:
143-
LICENSE_ID: ${{ needs.create-release.outputs.license-id }}
144142
strategy:
145143
fail-fast: false
146144
matrix:
@@ -170,6 +168,28 @@ jobs:
170168
- name: Set up chart-testing
171169
uses: helm/[email protected]
172170

171+
# Get license ID from customer inspect
172+
- name: Get License ID
173+
id: get-license
174+
run: |
175+
# Run vendor-cli to inspect the customer and get the installation ID
176+
CUSTOMER_JSON=$(docker run --rm \
177+
-e REPLICATED_API_TOKEN=${{ secrets.REPLICATED_PLATFORM_EXAMPLES_TOKEN }} \
178+
-e REPLICATED_APP=${{ env.APP_SLUG }} \
179+
replicated/vendor-cli:latest \
180+
customer inspect --customer "automated-${{ github.run_id }}" --output json)
181+
182+
# Extract the installationID from the JSON
183+
INSTALLATION_ID=$(echo "$CUSTOMER_JSON" | grep -o '"installationId":"[^"]*"' | cut -d'"' -f4)
184+
185+
if [ -z "$INSTALLATION_ID" ]; then
186+
echo "Failed to extract installationId from customer JSON"
187+
echo "$CUSTOMER_JSON" | grep -C 3 installationId || echo "installationId not found"
188+
exit 1
189+
fi
190+
191+
echo "license_id=$INSTALLATION_ID" >> $GITHUB_OUTPUT
192+
173193
- name: Create Cluster
174194
id: create-cluster
175195
uses: replicatedhq/replicated-actions/[email protected]
@@ -192,7 +212,7 @@ jobs:
192212
cd applications/mlflow
193213
make registry-login
194214
env:
195-
REPLICATED_LICENSE_ID: ${{ env.LICENSE_ID }}
215+
REPLICATED_LICENSE_ID: ${{ steps.get-license.outputs.license_id }}
196216

197217
- name: Run Helm installation test with charts from Replicated registry
198218
run: |
@@ -228,9 +248,6 @@ jobs:
228248
kots-install-test:
229249
runs-on: ubuntu-22.04
230250
needs: [create-release]
231-
env:
232-
LICENSE_ID: ${{ needs.create-release.outputs.license-id }}
233-
CHANNEL_SLUG: ${{ needs.create-release.outputs.channel-slug }}
234251
strategy:
235252
fail-fast: false
236253
matrix:

applications/mlflow/Makefile

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ test: lint template
9797
registry-login:
9898
echo "Authenticating with Replicated registry..."; \
9999
if [ -z "$$REPLICATED_LICENSE_ID" ]; then \
100-
echo "Error: REPLICATED_LICENSE_ID environment variable must be set"; \
100+
echo "ERROR: REPLICATED_LICENSE_ID environment variable must be set"; \
101101
exit 1; \
102102
fi; \
103103
helm registry login registry.replicated.com \
@@ -111,7 +111,7 @@ test-replicated-helm: registry-login
111111
echo "Running Helm installation test with charts from Replicated registry..."; \
112112
echo "Note: This requires REPLICATED_APP and REPLICATED_CHANNEL env vars."; \
113113
if [ -z "$$REPLICATED_APP" ] || [ -z "$$REPLICATED_CHANNEL" ]; then \
114-
echo "Error: REPLICATED_APP and REPLICATED_CHANNEL must be set"; \
114+
echo "ERROR: REPLICATED_APP and REPLICATED_CHANNEL must be set"; \
115115
exit 1; \
116116
fi; \
117117
if [ -f ./ct.yaml ]; then \
@@ -153,24 +153,4 @@ clean-templates:
153153
.PHONY: clean
154154
clean: clean-charts clean-templates
155155

156-
# Debug target to print environment information
157-
.PHONY: debug-env
158-
debug-env:
159-
echo '=== Debug Environment Information ==='; \
160-
echo "Shell: $$SHELL"; \
161-
echo "PATH: $$PATH"; \
162-
which helm || echo 'helm not found in PATH'; \
163-
echo "Current directory: $$(pwd)"; \
164-
echo "Directory listing:"; \
165-
ls -la; \
166-
echo '=== End Debug Info ==='
167-
168-
# Debug target for testing helm repo commands
169-
.PHONY: debug-helm
170-
debug-helm:
171-
echo "=== Testing Helm Commands ==="; \
172-
echo "Helm version:"; \
173-
helm version; \
174-
echo "Testing repo add command:"; \
175-
helm repo list; \
176-
echo "=== End Helm Tests ==="
156+

0 commit comments

Comments
 (0)