Skip to content

Commit

Permalink
Create version 0.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelsauter committed Feb 27, 2023
1 parent 6fecab0 commit 5eaa012
Show file tree
Hide file tree
Showing 20 changed files with 65 additions and 63 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ listed in the changelog.

## [Unreleased]


## [0.10.0] - 2023-02-27

### Added

- Rendered task versions are available under `tasks/` now. These can be referenced directly from pipeline runs through [remote resolution](https://tekton.dev/docs/pipelines/pipelines/#specifying-remote-tasks). In future versions, tasks may be removed from the Helm chart and only be accessible via Git. See [#665](https://github.com/opendevstack/ods-pipeline/issues/665).
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,9 @@ For OpenShift Pipelines releases and its relationship to Tekton and OpenShift ve

| ods-pipeline | OpenShift Pipelines | ODS Core/Quickstarters |
|---|---|---|
| latest | 1.9 | 4.x |
| [0.10](https://github.com/opendevstack/ods-pipeline/releases/tag/v0.10.0) | 1.9 | 4.x |
| [0.9](https://github.com/opendevstack/ods-pipeline/releases/tag/v0.9.0) | 1.6 | 4.x |
| [0.8](https://github.com/opendevstack/ods-pipeline/releases/tag/v0.8.0) | 1.6 | 4.x |
| [0.7](https://github.com/opendevstack/ods-pipeline/releases/tag/v0.7.0) | 1.6 | 4.x |

## Contributing

Expand Down
8 changes: 4 additions & 4 deletions deploy/ods-pipeline/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.9.0
version: 0.10.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "0.9.0"
appVersion: "0.10.0"

dependencies:
- name: setup
version: 0.9.0
version: 0.10.0
condition: setup.enabled
- name: tasks
version: 0.9.0
version: 0.10.0
condition: tasks.enabled
4 changes: 2 additions & 2 deletions deploy/ods-pipeline/charts/setup/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.9.0
version: 0.10.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: "0.9.0"
appVersion: "0.10.0"
4 changes: 2 additions & 2 deletions deploy/ods-pipeline/charts/tasks/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.9.0
version: 0.10.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: "0.9.0"
appVersion: "0.10.0"
20 changes: 10 additions & 10 deletions docs/add-to-repository.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@ pipeline:
- name: build
taskRef:
kind: Task
name: ods-build-go-v0-9-0
name: ods-build-go-v0-10-0
workspaces:
- name: source
workspace: shared-workspace
----

`ods-build-go-v0-9-0` runs tests and produces a Go binary. If you use another technology, e.g. a Java project using Gradle, exchange the task with `ods-build-gradle-v0-9-0`. See the link:tasks/[tasks reference] for available tasks.
`ods-build-go-v0-10-0` runs tests and produces a Go binary. If you use another technology, e.g. a Java project using Gradle, exchange the task with `ods-build-gradle-v0-10-0`. See the link:tasks/[tasks reference] for available tasks.

=== (Optionally) Create `Dockerfile`

If you want to create a container image with the produced Go binary, you can add the `ods-package-image-v0-9-0` task to the `tasks` list, like this:
If you want to create a container image with the produced Go binary, you can add the `ods-package-image-v0-10-0` task to the `tasks` list, like this:

.ods.yaml
[source,yaml]
Expand All @@ -43,14 +43,14 @@ pipeline:
- name: build
taskRef:
kind: Task
name: ods-build-go-v0-9-0
name: ods-build-go-v0-10-0
workspaces:
- name: source
workspace: shared-workspace
- name: package
taskRef:
kind: Task
name: ods-package-image-v0-9-0
name: ods-package-image-v0-10-0
runAfter:
- build
workspaces:
Expand All @@ -72,13 +72,13 @@ EXPOSE 8080
CMD ["./app"]
----

NOTE: `ods-build-go-v0-9-0` produces a binary called `app` and places it at `docker/app` so that it can be referenced in the `Dockerfile` and copied into the image by the `ods-package-image-v0-9-0` task.
NOTE: `ods-build-go-v0-10-0` produces a binary called `app` and places it at `docker/app` so that it can be referenced in the `Dockerfile` and copied into the image by the `ods-package-image-v0-10-0` task.

NOTE: Pay attention to the `runAfter` configuration in the task list: it ensures that the tasks run sequentially and can use the outputs from the previous task(s).

=== (Optionally) Create Helm Chart

If you want to deploy the created image, you can add the `ods-deploy-helm-v0-9-0` task to the `tasks` list and configure which branches should be deployed to which Kubernetes namespaces, like this:
If you want to deploy the created image, you can add the `ods-deploy-helm-v0-10-0` task to the `tasks` list and configure which branches should be deployed to which Kubernetes namespaces, like this:

.ods.yaml
[source,yaml]
Expand All @@ -97,14 +97,14 @@ pipeline:
- name: build
taskRef:
kind: Task
name: ods-build-go-v0-9-0
name: ods-build-go-v0-10-0
workspaces:
- name: source
workspace: shared-workspace
- name: package
taskRef:
kind: Task
name: ods-package-image-v0-9-0
name: ods-package-image-v0-10-0
runAfter:
- build
workspaces:
Expand All @@ -113,7 +113,7 @@ pipeline:
- name: deploy
taskRef:
kind: Task
name: ods-deploy-helm-v0-9-0
name: ods-deploy-helm-v0-10-0
runAfter:
- package
workspaces:
Expand Down
12 changes: 6 additions & 6 deletions docs/convert-quickstarter-component.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,14 @@ pipeline:
- name: backend-build-go
taskRef:
kind: Task
name: ods-build-go-v0-9-0
name: ods-build-go-v0-10-0
workspaces:
- name: source
workspace: shared-workspace
- name: backend-package-image
taskRef:
kind: Task
name: ods-package-image-v0-9-0
name: ods-package-image-v0-10-0
runAfter:
- backend-build-go
workspaces:
Expand All @@ -117,21 +117,21 @@ pipeline:
- name: backend-deploy
taskRef:
kind: Task
name: ods-deploy-helm-v0-9-0
name: ods-deploy-helm-v0-10-0
runAfter:
- backend-package-image
workspaces:
- name: source
workspace: shared-workspace
----

What has been done in Jenkins in `stageCheckFormat`, `stageLint`, `stageUnitTest`, `stageBuild` and `odsComponentStageScanWithSonar` is now done by the `ods-build-go-v0-9-0` task. If you have modified how the application is tested and built, or added further steps, you will need to create your own Tekton tasks reflecting those changes. See the link:authoring-tasks.adoc[authoring tasks] guide.
What has been done in Jenkins in `stageCheckFormat`, `stageLint`, `stageUnitTest`, `stageBuild` and `odsComponentStageScanWithSonar` is now done by the `ods-build-go-v0-10-0` task. If you have modified how the application is tested and built, or added further steps, you will need to create your own Tekton tasks reflecting those changes. See the link:authoring-tasks.adoc[authoring tasks] guide.

Building the container image is now done in `ods-package-image-v0-9-0` instead of in `odsComponentStageBuildOpenShiftImage`. The task continues to use the existing `docker/Dockerfile` file, which does not need to change much if at all. Consult the task reference in question for more information. In the case of Go, the link:tasks/ods-build-go.adoc[`ods-build-go` task reference] states that the resulting Go binary is named `app` and placed into the `docker` directory. Make sure that your `docker/Dockerfile` copies `app`, not e.g. `app_linux_amd64` (as is the default for an ODS 4.x based Go quickstarter).
Building the container image is now done in `ods-package-image-v0-10-0` instead of in `odsComponentStageBuildOpenShiftImage`. The task continues to use the existing `docker/Dockerfile` file, which does not need to change much if at all. Consult the task reference in question for more information. In the case of Go, the link:tasks/ods-build-go.adoc[`ods-build-go` task reference] states that the resulting Go binary is named `app` and placed into the `docker` directory. Make sure that your `docker/Dockerfile` copies `app`, not e.g. `app_linux_amd64` (as is the default for an ODS 4.x based Go quickstarter).

== Create Helm Chart

Finally, the application is deployed in `ods-deploy-helm-v0-9-0` as opposed to `odsComponentStageRolloutOpenShiftDeployment`.
Finally, the application is deployed in `ods-deploy-helm-v0-10-0` as opposed to `odsComponentStageRolloutOpenShiftDeployment`.
Let's look at this deployment piece in detail. The new Tekton task makes use of Helm to define and deploy the Kubernetes resources to use. Your existing repository might not define Kubernetes resources at all (this is the default), or they might be expressed as OpenShift templates (in a folder named `openshift`) and applied with link:https://github.com/opendevstack/tailor[Tailor]. ODS pipeline only supports Helm at the moment, and requires the Kubernetes resources (the Helm "chart") to be under version control. It is recommended to start with the link:https://github.com/opendevstack/ods-pipeline/tree/sample-helm-chart[sample chart provided in this repository]. If the existing component controlled resources via Tailor, please see the link:https://github.com/opendevstack/tailor/wiki/Migrating-from-Tailor-to-Helm#ods-quickstarter-migration[ODS Quickstarter Migration Guide] of Tailor as well.

== Configure Webhook
Expand Down
14 changes: 7 additions & 7 deletions docs/example-project.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ pipeline:
- name: build
taskRef:
kind: Task
name: ods-build-go-v0-9-0
name: ods-build-go-v0-10-0
workspaces:
- name: source
workspace: shared-workspace
- name: package
taskRef:
kind: Task
name: ods-package-image-v0-9-0
name: ods-package-image-v0-10-0
runAfter:
- build
workspaces:
Expand All @@ -49,7 +49,7 @@ pipeline:
- name: deploy
taskRef:
kind: Task
name: ods-deploy-helm-v0-9-0
name: ods-deploy-helm-v0-10-0
runAfter:
- package
workspaces:
Expand All @@ -74,14 +74,14 @@ pipeline:
- name: build
taskRef:
kind: Task
name: ods-build-npm-v0-9-0
name: ods-build-npm-v0-10-0
workspaces:
- name: source
workspace: shared-workspace
- name: package
taskRef:
kind: Task
name: ods-package-image-v0-9-0
name: ods-package-image-v0-10-0
runAfter:
- build
workspaces:
Expand All @@ -90,7 +90,7 @@ pipeline:
- name: deploy
taskRef:
kind: Task
name: ods-deploy-helm-v0-9-0
name: ods-deploy-helm-v0-10-0
runAfter:
- package
workspaces:
Expand Down Expand Up @@ -134,7 +134,7 @@ pipeline:
- name: deploy
taskRef:
kind: Task
name: ods-deploy-helm-v0-9-0
name: ods-deploy-helm-v0-10-0
workspaces:
- name: source
workspace: shared-workspace
Expand Down
6 changes: 3 additions & 3 deletions docs/installation.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Now use `git subtree` to get the required source files. The following commands m

[source]
----
pipelineGitRef=v0.9.0 # Pick the version you want to install
pipelineGitRef=v0.10.0 # Pick the version you want to install
git fetch --depth=1 https://github.com/opendevstack/ods-pipeline.git $pipelineGitRef:ods-pipeline-$pipelineGitRef && \
git checkout ods-pipeline-$pipelineGitRef && \
Expand Down Expand Up @@ -101,7 +101,7 @@ You may fetch updates (e.g. new versions) of `ods-pipeline` like this:

[source]
----
pipelineGitRef=v0.9.0 # Pick the version you want to update to
pipelineGitRef=v0.10.0 # Pick the version you want to update to
git br -D ods-pipeline-$pipelineGitRef subtree-split-branch-$pipelineGitRef || true && \
git fetch --depth=1 https://github.com/opendevstack/ods-pipeline.git $pipelineGitRef:ods-pipeline-$pipelineGitRef && \
Expand Down Expand Up @@ -145,4 +145,4 @@ TIP: The credentials stored in the K8s secrets will not be updated. If you need

==== Finishing the update

Once the resources in your namespace are updated, you likely have to update the `ods.yaml` files in your repository to point to the new tasks, e.g. changing `ods-build-go-v0-8-0` to `ods-build-go-v0-9-0`. Whether or not you have to update the `ods.yaml` file depends whether the task suffix (controlled by the value `taskSuffix`) has changed due to the update.
Once the resources in your namespace are updated, you likely have to update the `ods.yaml` files in your repository to point to the new tasks, e.g. changing `ods-build-go-v0-9-0` to `ods-build-go-v0-10-0`. Whether or not you have to update the `ods.yaml` file depends whether the task suffix (controlled by the value `taskSuffix`) has changed due to the update.
6 changes: 3 additions & 3 deletions docs/introduction.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,14 @@ pipeline:
- name: build-go
taskRef:
kind: Task
name: ods-build-go-v0-9-0
name: ods-build-go-v0-10-0
workspaces:
- name: source
workspace: shared-workspace
- name: package-image
taskRef:
kind: Task
name: ods-package-image-v0-9-0
name: ods-package-image-v0-10-0
runAfter:
- build-go
workspaces:
Expand All @@ -88,7 +88,7 @@ pipeline:
- name: deploy-helm
taskRef:
kind: Task
name: ods-deploy-helm-v0-9-0
name: ods-deploy-helm-v0-10-0
runAfter:
- package-image
workspaces:
Expand Down
4 changes: 2 additions & 2 deletions docs/ods-configuration.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ pipeline:
- name: build
taskRef:
kind: Task
name: ods-build-go-v0-9-0
name: ods-build-go-v0-10-0
workspaces:
- name: source
workspace: shared-workspace
- name: package
taskRef:
kind: Task
name: ods-package-image-v0-9-0
name: ods-package-image-v0-10-0
runAfter:
- build
workspaces:
Expand Down
2 changes: 1 addition & 1 deletion docs/releasing.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ODS pipeline follows https://semver.org[Semantic Versioning 2.0.0]. This means b
Ensure that all issues with the milestone of the release are resolved (or re-assign the issues to a future release). Further, run `govulncheck ./...` locally to check if there are any vulnerabilities that need to be fixed before the release. For more information on `govulncheck`, see https://go.dev/blog/vuln.

=== Preparing the release
The current version is hardcoded in a few places across the repository. All of these places must be updated for a release (search for `X.Y.Z` and `X-Y-Z`, ignoring the `test` directory). See the https://github.com/opendevstack/ods-pipeline/commit/49e0934fcd35b35439a4adb993fb2adbcb0d7107[commit releasing 0.5.0] as a reference. Commit the changes and push to the `master` branch.
The current version is hardcoded in a few places across the repository. All of these places must be updated for a release (search for `X.Y.Z` and `X-Y-Z`, ignoring the `test` and `tasks` directory). After the version numbers have been updated, run `make tasks` to update the rendered tasks, then mark the new version as released in the changelog and update the readme file. Commit the changes and push to the `master` branch.

=== Publishing the release
Draft a new GitHub release, creating a new tag in the process (e.g. `v0.2.0`). The description should be like this:
Expand Down
6 changes: 3 additions & 3 deletions tasks/ods-build-go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ spec:
description: |
Builds Go (module) applications.
See https://github.com/opendevstack/ods-pipeline/blob/v0.9.0/docs/tasks/ods-build-go.adoc
See https://github.com/opendevstack/ods-pipeline/blob/v0.10.0/docs/tasks/ods-build-go.adoc
params:
- name: working-dir
description: |
Expand Down Expand Up @@ -70,7 +70,7 @@ spec:
steps:
- name: build-go-binary
# Image is built from build/package/Dockerfile.go-toolset.
image: 'ghcr.io/opendevstack/ods-pipeline/ods-go-toolset:0.9.0'
image: 'ghcr.io/opendevstack/ods-pipeline/ods-go-toolset:0.10.0'
env:
- name: HOME
value: '/tekton/home'
Expand Down Expand Up @@ -128,7 +128,7 @@ spec:
workingDir: $(workspaces.source.path)
- name: scan-with-sonar
# Image is built from build/package/Dockerfile.sonar.
image: 'ghcr.io/opendevstack/ods-pipeline/ods-sonar:0.9.0'
image: 'ghcr.io/opendevstack/ods-pipeline/ods-sonar:0.10.0'
env:
- name: HOME
value: '/tekton/home'
Expand Down
6 changes: 3 additions & 3 deletions tasks/ods-build-gradle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ spec:
description: |
Builds Gradle applications.
See https://github.com/opendevstack/ods-pipeline/blob/v0.9.0/docs/tasks/ods-build-gradle.adoc
See https://github.com/opendevstack/ods-pipeline/blob/v0.10.0/docs/tasks/ods-build-gradle.adoc
params:
- name: working-dir
description: |
Expand Down Expand Up @@ -74,7 +74,7 @@ spec:
steps:
- name: build-gradle-binary
# Image is built from build/package/Dockerfile.gradle-toolset.
image: 'ghcr.io/opendevstack/ods-pipeline/ods-gradle-toolset:0.9.0'
image: 'ghcr.io/opendevstack/ods-pipeline/ods-gradle-toolset:0.10.0'
env:
- name: DEBUG
valueFrom:
Expand Down Expand Up @@ -146,7 +146,7 @@ spec:
workingDir: $(workspaces.source.path)
- name: scan-with-sonar
# Image is built from build/package/Dockerfile.sonar.
image: 'ghcr.io/opendevstack/ods-pipeline/ods-sonar:0.9.0'
image: 'ghcr.io/opendevstack/ods-pipeline/ods-sonar:0.10.0'
env:
- name: HOME
value: '/tekton/home'
Expand Down
Loading

0 comments on commit 5eaa012

Please sign in to comment.