Skip to content

Commit

Permalink
Merge pull request #8 from omnivector-solutions/jonathan/PENG-2112--a…
Browse files Browse the repository at this point in the history
…dd-democluster-as-step-in-release-process

PENG-2112 Adde democluster build as step in release process
  • Loading branch information
jonathanlmd authored Mar 26, 2024
2 parents 621c8cc + 0786acf commit 3ecfdb3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/build-and-publish-image.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
name: 'Build and Publish democluster to s3'
name: "Build and Publish democluster to s3"

on:
push:
branches:
- main
workflow_dispatch:
inputs:
jobbergate_version:
description: The Jobbergate agent version
required: false
type: string
default: 4.3.1

jobs:
build-image-in-lxd:
Expand All @@ -19,6 +26,8 @@ jobs:
poetry install
- name: Build democluster
env:
JG_VERSION: ${{ github.event.inputs.jobbergate_version }}
run: |
poetry run image-factory build democluster
Expand All @@ -28,6 +37,6 @@ jobs:
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: us-east-1
run: |
aws s3 sync democluster/final \
s3://omnivector-public-assets/cloud-images/democluster/latest \
--acl public-read --follow-symlinks --delete 1> /dev/null
aws s3 sync democluster/final \
s3://omnivector-public-assets/cloud-images/democluster/latest \
--acl public-read --follow-symlinks --delete 1> /dev/null
3 changes: 3 additions & 0 deletions democluster/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ check-deps: ## Check deps needed to build the image

.PHONY: init
init: ## Run packer init .
@if [ ! -z "$JG_VERSION" ]; then\
sed -i 's/jobbergate-agent==[0-9]\+\.[0-9]\+\.[0-9]\+/jobbergate-agent==$(JG_VERSION)/' user-data;\
fi
${PACKER} init .

.PHONY: stage0
Expand Down

0 comments on commit 3ecfdb3

Please sign in to comment.