-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
# fw_releases for ESW
This is a git-artifact repository using https://github.com/Praqma/git-artifact and its workflow
The git-artifact tool is added as a submodule. Use `git artifact -h` for latest functions, options and help
There are four interactions with or in context of this repo:
1) Role: CICD/DevOps: Add new artifacts. This happens usually in the CI system/pipelines using function `add-n-push` and is usually automated based on variable/configurations and scripts. The artifacts can later be consumed by other pipelines or added as dependencies in submodules or simular<br>
2) Role: Develper: Finding and consuming an artifact. <br>
You need to add or update a dependency<br>
Use `git artifact` funtions like `list`, `find-latest`, `fetch-co` and `fetch-co-latest`<br>
Ex: `git artifact fetch-co-latest --glob <product>/*`
3) Role: Devloper/DevOps: Update the "process" i.e. the scripts and readme.<br>
Update the scripts/pipelines and open a pull request. Please see sections below for initialising
4) Role: Developer/DevOps: Add this repo as a submodule in an other repository<br>
Adding a git artifact repository as a submodule will unfortunately default also clone with tags which can be big. Keep an eye out for `git artifact` function in the future ( Github issue: https://github.com/Praqma/git-artifact/issues/6 ).<br>
```bash
submodule_path=<dir>
submodule_clone_url=<url>
submodule_relative_url=<rel_path>
git clone --depth 1 --separate-git-dir=./.git/modules/${submodule_path} ${submodule_remote_url} ${submodule_path}
git submodule add ${submodule_relative_url} ${submodule_path}
Get and setup git-artifact to maintain the repo
The repo contains a lot of tags which by default is also cloned. A few options below:
Using git artifact from submodule
In this scenario you already have a arfitact added as a submodule and what to update the scripts or readme.md
source setup.shYou now have git artifact tool in your path and you can go to any artifact repo to do your stuff
Using git-artifact for cloning - if already have it in your PATH
You already have git artifact in your and want maintain in a new clone
which git-artifact
cd <path>
git artifact clone --url <url>
cd <path>Using git for cloning
cd <path>
git clone --single-branch https://gnaudio.visualstudio.com/ESW/_git/fw_releases
cd fw_releasesYou are now inside <path> and can update it. Additionally you can init git artifact in your PATH:
source setup.shsetup.sh
echo "Setting up git-artifact from submodule..."
git submodule update --init --remote --checkout git-artifact
export PATH="$(pwd)/git-artifact:$PATH"
echo "Checking for git-artifact in PATH..."
which git-artifact || {
echo "git-artifact not found in PATH. Please ensure it is installed and available."
return 1
}
echo "All good, git-artifact is in PATH."
Metadata
Metadata
Assignees
Labels
No labels