diff --git a/.github/workflows/build-and-publish-image.yaml b/.github/workflows/build-and-publish-image.yaml index d47ffd0..3459a14 100644 --- a/.github/workflows/build-and-publish-image.yaml +++ b/.github/workflows/build-and-publish-image.yaml @@ -5,12 +5,6 @@ on: 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: @@ -26,8 +20,6 @@ jobs: poetry install - name: Build democluster - env: - JG_VERSION: ${{ github.event.inputs.jobbergate_version }} run: | poetry run image-factory build democluster diff --git a/democluster/Makefile b/democluster/Makefile index 85b473a..35acd7d 100644 --- a/democluster/Makefile +++ b/democluster/Makefile @@ -19,9 +19,6 @@ 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 diff --git a/democluster/user-data b/democluster/user-data index c19a0ef..6d2fb44 100644 --- a/democluster/user-data +++ b/democluster/user-data @@ -375,7 +375,7 @@ runcmd: # create jobbergate agent venv - /usr/bin/python3 -m venv /srv/jobbergate-agent-venv - /srv/jobbergate-agent-venv/bin/pip install -U pip - - /srv/jobbergate-agent-venv/bin/pip install jobbergate-agent== + - /srv/jobbergate-agent-venv/bin/pip install jobbergate-agent - | cat < /srv/jobbergate-agent-venv/.env JOBBERGATE_AGENT_X_SLURM_USER_NAME=root diff --git a/image_factory/builder.py b/image_factory/builder.py index b10ed28..061a73d 100644 --- a/image_factory/builder.py +++ b/image_factory/builder.py @@ -101,16 +101,12 @@ def democluster( typer.Exit(124) print("Kicking off packer build in LXD container.") - kwargs = dict( + lxc.exec( command=["make", stage.value], cwd="/srv/image-factory/democluster", instance_name=instance_name, project=ctx.obj.project_name, ) - if jg_version := os.getenv("JG_VERSION"): - print(f"Passing along env var JG_VERSION={jg_version}") - kwargs["env"] = dict(JG_VERSION=jg_version) - lxc.exec(**kwargs) print("[bold green]Build complete, destroying LXD container.[/bold green]") lxc.delete(instance_name=instance_name, project=ctx.obj.project_name, force=True)