6 Commits

Author SHA1 Message Date
unkinben 9cb07d9cef feat: wait for artifacts to be created
Build / build (pull_request) Successful in 39s
2024-12-30 00:22:34 +11:00
unkinben 809d26349b Merge pull request 'fix: update deployment' (#3) from neoloc/deploy_workflow into master
Build / build (push) Successful in 37s
Deploy / deploy (push) Failing after 1m10s
Reviewed-on: https://git.query.consul/unkin/terraform-nomad/pulls/3
2024-12-28 22:58:25 +11:00
unkinben 63cc96d602 fix: update deployment
Build / build (pull_request) Successful in 39s
2024-12-28 22:57:17 +11:00
unkinben 4db2abc990 Merge pull request 'fix: ensure deploy workflow runs' (#2) from neoloc/deploy_workflow into master
Build / build (push) Successful in 39s
Deploy / deploy (push) Has been skipped
Reviewed-on: https://git.query.consul/unkin/terraform-nomad/pulls/2
2024-12-28 22:47:45 +11:00
unkinben f7fa3bbd47 fix: ensure deploy workflow runs
Build / build (pull_request) Successful in 39s
- changed `on` params
2024-12-28 22:46:20 +11:00
unkinben 2a20398c87 Merge pull request 'feat: initial setup' (#1) from neoloc/initial into master
Reviewed-on: https://git.query.consul/unkin/terraform-nomad/pulls/1
2024-12-28 22:43:19 +11:00
2 changed files with 31 additions and 11 deletions
+3
View File
@@ -2,6 +2,9 @@ name: Build
on: on:
pull_request: pull_request:
push:
branches:
- master
jobs: jobs:
build: build:
+28 -11
View File
@@ -1,15 +1,12 @@
name: Deploy name: Deploy
on: on:
workflow_run: push:
workflows: branches:
- Build - master
types:
- completed
jobs: jobs:
deploy: deploy:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: almalinux-8 runs-on: almalinux-8
container: container:
image: git.query.consul/unkin/almalinux8-runnerdnd:latest image: git.query.consul/unkin/almalinux8-runnerdnd:latest
@@ -19,11 +16,31 @@ jobs:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Download Build Artifacts - name: Download Artifacts
uses: actions/download-artifact@v3 run: |
with: mkdir -p /workspace/unkin/terraform-nomad/plans
name: plans export RUN_ID=$((GITHUB_RUN_NUMBER - 1))
path: /workspace/unkin/terraform-nomad/plans export PLANS_URL="https://git.query.consul/${GITHUB_REPOSITORY}/actions/runs/${RUN_ID}/artifacts/plans"
export MAX_RETRIES=5
export RETRY_COUNT=0
echo "Attempting to download plans from ${PLANS_URL}"
while [ $RETRY_COUNT -lt $MAX_RETRIES ]; do
curl -L -o /workspace/plans.zip "${PLANS_URL}" && break || true
echo "Plans file not available yet. Retrying in 10 seconds... ($((RETRY_COUNT + 1))/$MAX_RETRIES)"
RETRY_COUNT=$((RETRY_COUNT + 1))
sleep 10
done
if [ ! -f /workspace/plans.zip ]; then
echo "Failed to download plans file after $MAX_RETRIES attempts."
exit 1
fi
echo "Plans file downloaded. Extracting..."
unzip /workspace/plans.zip -d /workspace/unkin/terraform-nomad/plans
echo "Plans file extracted successfully."
- name: Show Plans
run: |
find /workspace -type f -name "*.plan"
- name: Install Packages - name: Install Packages
run: | run: |