-
Notifications
You must be signed in to change notification settings - Fork 140
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #746 from mkosiarc/remove-skip-optional
Remove unused parameters and result
- Loading branch information
Showing
4 changed files
with
72 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Migration from 0.1 to 0.2 | ||
|
||
The parameters `skip-optional`, `pipelinerun-name` and ` pipelinerun-uid` used by `init` task were removed. | ||
|
||
## Action from users | ||
|
||
Update files in Pull-Request created by RHTAP bot: | ||
- Search for the task named `init` | ||
- Remove the `skip-optional`, `pipelinerun-name` and ` pipelinerun-uid` parameters from the params section |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# init task | ||
|
||
Initialize Pipeline Task, include flags for rebuild and auth. Generates image repository secret used by the PipelineRun. | ||
|
||
## Parameters | ||
|name|description|default value|required| | ||
|---|---|---|---| | ||
|image-url|Image URL for build by PipelineRun||true| | ||
|rebuild|Rebuild the image if exists|false|false| | ||
|skip-checks|Skip checks against built image|false|false| | ||
|
||
## Results | ||
|name|description| | ||
|---|---| | ||
|build|Defines if the image in param image-url should be built| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: Task | ||
metadata: | ||
labels: | ||
app.kubernetes.io/version: "0.2" | ||
annotations: | ||
tekton.dev/pipelines.minVersion: "0.12.1" | ||
tekton.dev/tags: "appstudio, hacbs" | ||
name: init | ||
spec: | ||
description: >- | ||
Initialize Pipeline Task, include flags for rebuild and auth. Generates image repository secret used by the PipelineRun. | ||
params: | ||
- name: image-url | ||
description: Image URL for build by PipelineRun | ||
- name: rebuild | ||
description: Rebuild the image if exists | ||
default: "false" | ||
- name: skip-checks | ||
description: Skip checks against built image | ||
default: "false" | ||
results: | ||
- name: build | ||
description: Defines if the image in param image-url should be built | ||
|
||
steps: | ||
- name: init | ||
image: registry.redhat.io/openshift4/ose-cli:4.13@sha256:73df37794ffff7de1101016c23dc623e4990810390ebdabcbbfa065214352c7c | ||
env: | ||
- name: IMAGE_URL | ||
value: $(params.image-url) | ||
- name: REBUILD | ||
value: $(params.rebuild) | ||
- name: SKIP_CHECKS | ||
value: $(params.skip-checks) | ||
script: | | ||
#!/bin/bash | ||
echo "Build Initialize: $IMAGE_URL" | ||
echo | ||
echo "Determine if Image Already Exists" | ||
# Build the image when image does not exists or rebuild is set to true | ||
if ! oc image info $IMAGE_URL &>/dev/null || [ "$REBUILD" == "true" ] || [ "$SKIP_CHECKS" == "false" ]; then | ||
echo -n "true" > $(results.build.path) | ||
else | ||
echo -n "false" > $(results.build.path) | ||
fi |