From fa62e14a98a69d0f1961676e3c178263eac8ef3e Mon Sep 17 00:00:00 2001 From: Pavel Sturc Date: Thu, 11 Aug 2022 12:07:22 +0200 Subject: [PATCH 1/3] Create Dockerfile --- Dockerfile | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..5d4fd2d4 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +FROM golang:1.16-alpine + +WORKDIR /app + +COPY go.mod ./ +RUN go mod download + +COPY *.go ./ + +RUN go build -o /main + +EXPOSE 8081 + +CMD [ "/main" , "-p=8081"] From bab5fc56a63366c2585d93951b063e0134474902 Mon Sep 17 00:00:00 2001 From: redhat-appstudio Date: Thu, 11 Aug 2022 10:08:19 +0000 Subject: [PATCH 2/3] Appstudio update test-pac-component --- .tekton/test-pac-component-pull-request.yaml | 39 ++++++++++++++++++++ .tekton/test-pac-component-push.yaml | 38 +++++++++++++++++++ 2 files changed, 77 insertions(+) create mode 100644 .tekton/test-pac-component-pull-request.yaml create mode 100644 .tekton/test-pac-component-push.yaml diff --git a/.tekton/test-pac-component-pull-request.yaml b/.tekton/test-pac-component-pull-request.yaml new file mode 100644 index 00000000..448fc5c7 --- /dev/null +++ b/.tekton/test-pac-component-pull-request.yaml @@ -0,0 +1,39 @@ +apiVersion: tekton.dev/v1beta1 +kind: PipelineRun +metadata: + annotations: + build.appstudio.redhat.com/commit_sha: '{{revision}}' + build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}' + build.appstudio.redhat.com/target_branch: '{{target_branch}}' + pipelinesascode.tekton.dev/max-keep-runs: "3" + pipelinesascode.tekton.dev/on-event: '[pull_request]' + pipelinesascode.tekton.dev/on-target-branch: '[main]' + creationTimestamp: null + labels: + build.appstudio.openshift.io/component: test-pac-component + name: test-pac-component-on-pull-request + namespace: test-pac +spec: + params: + - name: git-url + value: '{{repo_url}}' + - name: revision + value: '{{revision}}' + - name: output-image + value: quay.io/psturc/test-images:on-pr-{{revision}} + - name: path-context + value: . + - name: dockerfile + value: Dockerfile + pipelineRef: + bundle: quay.io/redhat-appstudio/pull-request-builds:hacbs-391c42c859b1c44ded3b4ed91d8985f8246421e2 + name: docker-build + workspaces: + - name: workspace + persistentVolumeClaim: + claimName: appstudio + subPath: test-pac-component-on-pull-request-{{revision}} + - name: registry-auth + secret: + secretName: redhat-appstudio-registry-pull-secret +status: {} diff --git a/.tekton/test-pac-component-push.yaml b/.tekton/test-pac-component-push.yaml new file mode 100644 index 00000000..f3c3a761 --- /dev/null +++ b/.tekton/test-pac-component-push.yaml @@ -0,0 +1,38 @@ +apiVersion: tekton.dev/v1beta1 +kind: PipelineRun +metadata: + annotations: + build.appstudio.redhat.com/commit_sha: '{{revision}}' + build.appstudio.redhat.com/target_branch: '{{target_branch}}' + pipelinesascode.tekton.dev/max-keep-runs: "3" + pipelinesascode.tekton.dev/on-event: '[push]' + pipelinesascode.tekton.dev/on-target-branch: '[main]' + creationTimestamp: null + labels: + build.appstudio.openshift.io/component: test-pac-component + name: test-pac-component-on-push + namespace: test-pac +spec: + params: + - name: git-url + value: '{{repo_url}}' + - name: revision + value: '{{revision}}' + - name: output-image + value: quay.io/psturc/test-images:{{revision}} + - name: path-context + value: . + - name: dockerfile + value: Dockerfile + pipelineRef: + bundle: quay.io/redhat-appstudio/pull-request-builds:hacbs-391c42c859b1c44ded3b4ed91d8985f8246421e2 + name: docker-build + workspaces: + - name: workspace + persistentVolumeClaim: + claimName: appstudio + subPath: test-pac-component-on-push-{{revision}} + - name: registry-auth + secret: + secretName: redhat-appstudio-registry-pull-secret +status: {} From ef5e2bacd8910fd8fb387e042b0a7b2b90a827a5 Mon Sep 17 00:00:00 2001 From: redhat-appstudio Date: Thu, 11 Aug 2022 10:08:21 +0000 Subject: [PATCH 3/3] Appstudio update test-pac-component