Skip to content

Commit

Permalink
Update README.md with new distribution way
Browse files Browse the repository at this point in the history
  • Loading branch information
Michkov committed Jan 21, 2022
1 parent 5620219 commit f7f7cc3
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 29 deletions.
36 changes: 19 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,36 @@

This repository contains components that are installed or managed by the managed CI and Build Team.

This includes default Pipelines and Tasks. You need to have bootstrapped a working appstudio configuration from (see `https://github.com/redhat-appstudio/infra-deployments`) for the dev of pipelines or new tasks.
This includes default Pipelines and Tasks. You need to have bootstrapped a working appstudio configuration from (see `https://github.com/redhat-appstudio/infra-deployments`) for the dev of pipelines or new tasks.

Pipelines are delivered into App Studio via `quay.io/redhat-appstudio/build-templates-bundle:v0.1.3` (the tag will be updated every change)

Tasks are delivered into App Studio via Cluster tasks installedfrom `https://github.com/redhat-appstudio/infra-deployments/blob/main/components/build/clustertasks`
App Studio specific cluster tasks will be found in this repository. Currently a set of utilties are bundled with App Studio in `quay.io/redhat-appstudio/appstudio-utils:v0.1.3` as a convenience but tasks may be run from different per-task containers in future.
Tasks are delivered into App Studio via `quay.io/redhat-appstudio/appstudio-tasks`. Where each task is bundled and pushed into tag in format `${TASK_NAME}-${VERSION}` where version is the same as pipelines bundle version.

## Devmode for Pipelines
Currently a set of utilties are bundled with App Studio in `quay.io/redhat-appstudio/appstudio-utils:v0.1.3` as a convenience but tasks may be run from different per-task containers in future.

The pipelines can be found in the `pipelines` directories.
## Devmode

Once your configuration is set you can modify pipelines installed via this repository in two ways.
Script `dev.sh` creates bundles for pipelines, each task and create appstudio-utils image. Images are pushed into your quay.io repository. You will need to set `MY_QUAY_USER` to use this feature and be logged into quay.io on your workstation.
Once you run the `dev.sh` all pipelines will come from your bundle instead of from the default installed by gitops into the cluster.

### Override mode.
Every time you run `dev-mode.sh`, it will take the current directory and package into a bundle into your own quay.io repository. You will need to set `MY_QUAY_USER` to use this feature and be logged into quay.io on your workstation.
Once you run the `dev-mode.sh` all pipelines will come from your bundle instead of from the default installed by gitops into the cluster.
### Gitops Mode
Replace the file `https://github.com/redhat-appstudio/infra-deployments/blob/main/components/build/build-templates/bundle-config.yaml` in your own fork (dev mode). This will sync to the cluster and all builds-definitions will come from the bundle you configure.
### Pipelines

Please test in _gitops mode_ when doing a new release into staging as it will be the best way to ensure that the deployment will function correctly when deployed via gitops.
The pipelines can be found in the `pipelines` directories.

Releasing new bundles are currently manual. (TODO, CI will automatically publish updates `infra-deployments`) via a SHA/pull request.
#### Gitops Mode

## Devmode for Tasks
Replace the file `https://github.com/redhat-appstudio/infra-deployments/blob/main/components/build/build-templates/bundle-config.yaml` in your own fork (dev mode). This will sync to the cluster and all builds-definitions will come from the bundle you configure.

The tasks can be found in the `tasks` directories. Replacing tasks in App Studio is more complex as we will currently deliver tasks as ClusterTasks. See `https://github.com/redhat-appstudio/infra-deployments/blob/main/components/build/` to install new app studio cluster tasks via the gitops delivery mode.
For quick local innerloop style task development, you may install new Tasks in your local namespace manually and create your pipelines as well as the base task image to test new function. This is a manual process which requires you create Tasks and use in your namespace. This may be faster but requires you to later change the task type to ClusterTask and release in the infra deployment directory.
Please test in _gitops mode_ when doing a new release into staging as it will be the best way to ensure that the deployment will function correctly when deployed via gitops.

There is a container which is used to support multiple set of tasks called `quay.io/redhat-appstudio/appstudio-utils:v0.1.3` , which is a single container which is used by multiple tasks. Tasks may also be in their own container as well however many simple tasks are utiltities and will be packaged for app studio in a single container. Tasks can rely on other tasks in the system which are co-packed in a container allowing combined tasks (build-only vs build-deploy) which use the same core implementations.
### Tasks

The tasks can be found in the `tasks` directories. Tasks are bundled and used by bundled pipelines. Tasks are not stored in the Cluster.
For quick local innerloop style task development, you may install new Tasks in your local namespace manually and create your pipelines as well as the base task image to test new function. Tasks can be installed into local namespace using `oc apply -k tasks/appstudio-utils/util-tasks`.

There is a container which is used to support multiple set of tasks called `quay.io/redhat-appstudio/appstudio-utils:v0.1.3` , which is a single container which is used by multiple tasks. Tasks may also be in their own container as well however many simple tasks are utilities and will be packaged for app studio in a single container. Tasks can rely on other tasks in the system which are co-packed in a container allowing combined tasks (build-only vs build-deploy) which use the same core implementations.

## Release

Prerequisite for new release is creation of tag or release in GitHub repository. After that pull changes and execute `./release.sh $TAG` where `TAG` must match with git tag of current branch.
8 changes: 0 additions & 8 deletions pipelines/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
# build-definitions

This directory the OCI bundle with default pipelines installed for build-definitions.

Update `pipelines/release-build.sh` to set the release tag to a specific version.

Currently set manually (v0.1, v0.1.1), but when integrated into a CI, will shift to use git commit SHA.

This has to be updated on the infra-deployment cluster when the version is updated.


6 changes: 2 additions & 4 deletions tasks/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@

This directory contains all the task definitions provided by App Studio. The tasks need to be installed as part of the Build deployment component via ClusterTask as AppStudio initial releases will not allow user defined tasks.
See
This directory contains all the task definitions provided by App Studio. The tasks will be bundled and used by Pipelines of App Studio. Initial releases of App Studio will not allow user defined tasks.
See
`https://github.com/redhat-appstudio/infra-deployments/tree/main/components/build`

0 comments on commit f7f7cc3

Please sign in to comment.