openshift / pipelines-tutorial

A step-by-step tutorial showing OpenShift Pipelines
Apache License 2.0
298 stars 621 forks source link

Error in Tutorial Pipeline Run #92

Closed atef23 closed 3 years ago

atef23 commented 4 years ago

When I try to run the tutorial on an OCP 4 cluster I can reach the point where I create the pipeline but there are no resources in this YAML:

https://raw.githubusercontent.com/openshift/pipelines-tutorial/master/01_pipeline/04_pipeline.yaml

and I don't get any output when I try:

tkn resource ls. When I try to run the pipeline using

tkn pipeline start build-and-deploy \
    -w name=shared-workspace,claimName=source-pvc \
    -p deployment-name=vote-api \
    -p git-url=http://github.com/openshift-pipelines/vote-api.git \
    -p IMAGE=image-registry.openshift-image-registry.svc:5000/pipelines-tutorial/vote-api

The run fails with the following error:

invalid input params: didn't need these params but they were provided anyway: [IMAGE]

Removing the -p IMAGE parameter still results in that error.

Thanks,

Atef

khilmanoj commented 4 years ago

Follow the latest doc --> https://docs.openshift.com/container-platform/4.4/pipelines/creating-applications-with-cicd-pipelines.html

ppitonak commented 4 years ago

If you installed OpenShift Pipelines 1.0, follow https://github.com/openshift/pipelines-tutorial/tree/release-tech-preview-1

For Pipelines 1.1 (in preview channel now), follow https://github.com/openshift/pipelines-tutorial/tree/release-tech-preview-2

atef23 commented 4 years ago

@ppitonak Thanks, I used the link for Openshift Pipelines 1.0. The first time I ran the pipeline I got this error:

Failed to create build pod "build-and-deploy-run-bkcv7-build-image-qfcc6": pods "build-and-deploy-run-bkcv7-build-image-qfcc6-pod-nzb8d" is forbidden: maximum cpu usage per Pod is 2, but limit is 2500m

The pipeline run succeeded for me after i increased the cpu limits in pipelines-tutorial-core-resource-limits as follows:

kind: LimitRange
apiVersion: v1
metadata:
  name: pipelines-tutorial-core-resource-limits
  namespace: pipelines-tutorial
spec:
  limits:
    - type: Container
      max:
        cpu: '3'
        memory: 6Gi
      default:
        cpu: 500m
        memory: 1536Mi
      defaultRequest:
        cpu: 50m
        memory: 256Mi
    - type: Pod
      max:
        cpu: '3'
        memory: 12Gi
sjbylo commented 3 years ago

I had the same error today (25 Sep 2020) with OCP 4.5. I fixed it by using the latest "buildah" task from [0]. After the following steps, the first half of the tutorial should work. I did not try the rest of the tutorial.

Create the latest buildah task:

oc create -f https://raw.githubusercontent.com/tektoncd/catalog/master/task/buildah/0.1/buildah.yaml 

Remove the "ClusterTask" reference in the build-and-deploy pipeline with the "buildah" task:

oc edit pipeline build-and-deploy
...
    - fetch-repository
    taskRef:
      kind: Task    # Replace ClusterTask with Task
      name: buildah
...

[0] https://github.com/tektoncd/catalog/blob/master/task/buildah/0.1/buildah.yaml#L15

alif-munim commented 3 years ago

I had the same error today (25 Sep 2020) with OCP 4.5. I fixed it by using the latest "buildah" task from [0]. After the following steps, the first half of the tutorial should work. I did not try the rest of the tutorial.

Create the latest buildah task:

oc create -f https://raw.githubusercontent.com/tektoncd/catalog/master/task/buildah/0.1/buildah.yaml 

Remove the "ClusterTask" reference in the build-and-deploy pipeline with the "buildah" task:

oc edit pipeline build-and-deploy
...
    - fetch-repository
    taskRef:
      kind: Task    # Replace ClusterTask with Task
      name: buildah
...

[0] https://github.com/tektoncd/catalog/blob/master/task/buildah/0.1/buildah.yaml#L15

@sjbylo This solution worked for me, thank you!

ChrystianDuarte commented 3 years ago

thanks @sjbylo sjbylo

Client version: 0.11.0 Pipeline version: v0.11.3 Triggers version: v0.4.0 openshift pipeline operator: 1.0.1 Openshift 4.5

  1. Create the latest buildah task: oc create -f https://raw.githubusercontent.com/tektoncd/catalog/master/task/buildah/0.1/buildah.yaml Remove the "ClusterTask" reference in the build-and-deploy pipeline with the "buildah" task:

`oc edit pipeline build-and-deploy ...

tkn pipeline start build-and-deploy -w name=shared-workspace,claimName=source-pvc -p deployment-name=vote-ui -p git-url=http://github.com/openshift-pipelines/vote-ui.git -p IMAGE=image-registry.openshift-image-registry.svc:5000/pipelines-tutorial/vote-ui

openshift-bot commented 3 years ago

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close. Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

openshift-bot commented 3 years ago

Stale issues rot after 30d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle rotten. Rotten issues close after an additional 30d of inactivity. Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle rotten /remove-lifecycle stale

openshift-bot commented 3 years ago

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen. Mark the issue as fresh by commenting /remove-lifecycle rotten. Exclude this issue from closing again by commenting /lifecycle frozen.

/close

openshift-ci-robot commented 3 years ago

@openshift-bot: Closing this issue.

In response to [this](https://github.com/openshift/pipelines-tutorial/issues/92#issuecomment-808818091): >Rotten issues close after 30d of inactivity. > >Reopen the issue by commenting `/reopen`. >Mark the issue as fresh by commenting `/remove-lifecycle rotten`. >Exclude this issue from closing again by commenting `/lifecycle frozen`. > >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.