Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Appstudio update test-pac-component #1

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .tekton/test-pac-component-pull-request.yaml
Original file line number Diff line number Diff line change
@@ -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: {}
38 changes: 38 additions & 0 deletions .tekton/test-pac-component-push.yaml
Original file line number Diff line number Diff line change
@@ -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: {}
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]