Skip to content

Commit

Permalink
Adding instructions about the configuration and secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
gvegayon committed Nov 22, 2024
1 parent 2c0d93d commit 6ca5fdd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/containers-and-az-pool.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ jobs:
pip install -r azure/requirements.txt
python3 azure/pool.py \
pool-config-${{ github.sha }}.toml \
../batch-autoscale-formula.txt
batch-autoscale-formula.txt
#########################################################################
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ The project has multiple GitHub Actions workflows to automate the CI/CD process.

- **Create Batch Pool and Submit Jobs** (`batch-pool`): This final job creates a new Azure batch pool with id `cfa-epinow2-pool-[branch name]` if it doesn't already exist. Additionally, if the commit message contains the string "`[delete pool]`", the pool is deleted.

Both container tags and pool ids are based on the branch name, making it compatible with having multiple pipelines running simultaneously.
Both container tags and pool ids are based on the branch name, making it compatible with having multiple pipelines running simultaneously. The pool creation depends on Azure's Python SDK (see the file [azure/pool.py](azure/pool.py)), with the necessary configuration in a toml file stored as a secret in the repository (`POOL_CONFIG_TOML`).

> [!IMPORTANT]
> The CI will fail with branch names that are not valid tag names for containers. For more information, see the official Azure documentation [here](https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/resource-name-rules#microsoftcontainerregistry).
Expand Down
3 changes: 1 addition & 2 deletions azure/pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ def create_container(blob_service_client: BlobServiceClient, container_name: str


def get_autoscale_formula(fn):
autoscale_file = os.path.join(sys.path[0], fn)
with open(autoscale_file, "r") as autoscale_text:
with open(fn, "r") as autoscale_text:
return autoscale_text.read()

if __name__ == "__main__":
Expand Down

0 comments on commit 6ca5fdd

Please sign in to comment.