Skip to content

Commit

Permalink
upstream pyproject
Browse files Browse the repository at this point in the history
Signed-off-by: Richard Gebhardt <[email protected]>
  • Loading branch information
gebhardtr committed Mar 29, 2024
1 parent 1524741 commit 03c4083
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/Build_Push_Image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ jobs:
- name: Remove the pre-cached Docker images
run: docker image prune --all --force

- name: Generate pyproject.toml
env:
ANSIBLE_AI_PROJECT_ALIAS: ${{ vars.ANSIBLE_AI_PROJECT_ALIAS }}
ANSIBLE_AI_PROJECT_NAME: ${{ vars.ANSIBLE_AI_PROJECT_NAME }}
run: |
envsubst < pyproject.toml.tmpl > pyproject.toml
- name: Build Image
id: build-image
uses: redhat-actions/buildah-build@v2
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -163,3 +163,5 @@ grafana/*

# Local LaunchDarkly data
./flagdata.json

pyproject.toml
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
ENVIRONMENT ?= development
TAG ?= latest
ANSIBLE_AI_PROJECT_NAME ?= "Ansible AI Connect"
export ANSIBLE_AI_PROJECT_ALIAS ?= ansible-ai-connect
export ANSIBLE_AI_PROJECT_NAME ?= Ansible AI Connect

# Choose between docker and podman based on what is available
ifeq (, $(shell which podman))
Expand Down Expand Up @@ -45,8 +46,12 @@ DEPRECATED:
# DEPRECATED: Please use build-wisdom-container instead
ansible-wisdom-container: build-wisdom-container DEPRECATED

.PHONY: generate-pyproject
generate-pyproject:
envsubst < pyproject.toml.tmpl > pyproject.toml

.PHONY: build-wisdom-container
build-wisdom-container:
build-wisdom-container: generate-pyproject
${CONTAINER_RUNTIME} build -f wisdom-service.Containerfile -t ansible_wisdom .

# DEPRECATED: Please use run-server instead
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml → pyproject.toml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
name = "ansible-wisdom"
description = "Ansible Lightspeed with IBM watsonx Code Assistant."
name = "$ANSIBLE_AI_PROJECT_ALIAS"
description = "$ANSIBLE_AI_PROJECT_NAME"
version = "0.1.0"
dependencies = [
'ansible~=8.5.0',
Expand Down

0 comments on commit 03c4083

Please sign in to comment.