forked from tektoncd/pipeline
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
1,475 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
#This makefile is used by ci-operator | ||
|
||
CGO_ENABLED=0 | ||
GOOS=linux | ||
CORE_IMAGES=./cmd/bash ./cmd/controller ./cmd/entrypoint ./cmd/gsutil ./cmd/kubeconfigwriter ./cmd/nop ./cmd/webhook ./cmd/imagedigestexporter ./cmd/pullrequest-init | ||
CORE_IMAGES_WITH_GIT=./cmd/creds-init ./cmd/git-init | ||
|
||
## | ||
# You need to provide a RELEASE_VERSION when using targets like `push-image`, you can do it directly | ||
# on the command like this: `make push-image RELEASE_VERSION=0.4.0` | ||
RELEASE_VERSION= | ||
REGISTRY_CI_URL=registry.svc.ci.openshift.org/openshift/tektoncd-v$(RELEASE_VERSION):tektoncd-pipeline | ||
REGISTRY_RELEASE_URL=quay.io/openshift-pipeline/tektoncd-pipeline | ||
|
||
# Install core images | ||
install: installuidwrapper | ||
go install $(CORE_IMAGES) $(CORE_IMAGES_WITH_GIT) | ||
.PHONY: install | ||
|
||
# Run E2E tests on OpenShift | ||
test-e2e: check-images | ||
./openshift/e2e-tests-openshift.sh | ||
.PHONY: test-e2e | ||
|
||
# Make sure we have all images in the makefile variable or that would be a new | ||
# binary that needs to be added | ||
check-images: | ||
@for cmd in ./cmd/*;do \ | ||
found="" ;\ | ||
for image in $(CORE_IMAGES) $(CORE_IMAGES_WITH_GIT);do \ | ||
if [[ $$image == $$cmd ]];then \ | ||
found=1 ;\ | ||
fi \ | ||
done ;\ | ||
test -n $$found || { \ | ||
echo "*ERROR*: Could not find $$cmd in the Makefile variables CORE_IMAGES_WITH_GIT CORE_IMAGES" ;\ | ||
echo "" ;\ | ||
echo "If it it's a new binary that was added upstream, then do the following :" ;\ | ||
echo "- Add the binary to openshift/release like this: https://git.io/fj18c" ;\ | ||
echo "- Add to the CORE_IMAGES variables in the Makefile" ;\ | ||
echo "- Generate the dockerfiles by running 'make generate-dockerfiles'" ;\ | ||
echo "- Commit and PR these to 'openshift/release-next' remote/branch and 'openshift/master'" ;\ | ||
exit 1 ;\ | ||
} && exit 0 ;\ | ||
done | ||
.PHONY: check-images | ||
|
||
# Generate Dockerfiles used by ci-operator. The files need to be committed manually. | ||
generate-dockerfiles: | ||
./openshift/ci-operator/generate-dockerfiles.sh openshift/ci-operator/Dockerfile.in openshift/ci-operator/knative-images $(CORE_IMAGES) | ||
./openshift/ci-operator/generate-dockerfiles.sh openshift/ci-operator/Dockerfile-git.in openshift/ci-operator/knative-images $(CORE_IMAGES_WITH_GIT) | ||
.PHONY: generate-dockerfiles | ||
|
||
# NOTE(chmou): Install uidwraper for launching some binaries with fixed uid | ||
UIDWRAPPER_PATH=./openshift/ci-operator/uidwrapper | ||
installuidwrapper: $(UIDWRAPPER_PATH) | ||
install -m755 $(UIDWRAPPER_PATH) $(GOPATH)/bin/ | ||
|
||
# Generates a ci-operator configuration for a specific branch. | ||
generate-ci-config: | ||
./openshift/ci-operator/generate-ci-config.sh $(BRANCH) > ci-operator-config.yaml | ||
.PHONY: generate-ci-config | ||
|
||
# Generate an aggregated knative yaml file with replaced image references | ||
generate-release: | ||
@test $(RELEASE_VERSION) || { echo "You need to set the RELEASE_VERSION on the command line i.e: make RELEASE_VERSION=0.4.0"; exit ;1;} | ||
@./openshift/release/generate-release.sh v$(RELEASE_VERSION) | ||
.PHONY: generate-release | ||
|
||
.PHONY: push-image |
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 |
---|---|---|
@@ -1,17 +1,7 @@ | ||
# The OWNERS file is used by prow to automatically merge approved PRs. | ||
|
||
approvers: | ||
- bobcatfish | ||
- dlorenc | ||
- ImJasonH | ||
- vdemeester | ||
- abayer | ||
- afrittoli | ||
- dibyom | ||
- sbwsg | ||
- build-pipeline-approvers | ||
|
||
# Alumni ❤️ | ||
# tejal29 | ||
# pivotal-nader-ziada | ||
# shashwathi | ||
# aaron-prindle | ||
reviewers: | ||
- build-pipeline-reviewers |
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,24 @@ | ||
aliases: | ||
build-pipeline-approvers: | ||
- mgencur | ||
- bbrowning | ||
- jcrossley3 | ||
- markusthoemmes | ||
- vdemeester | ||
- arilivigni | ||
- chmouel | ||
- sthaha | ||
|
||
build-pipeline-reviewers: | ||
- mgencur | ||
- bbrowning | ||
- jcrossley3 | ||
- markusthoemmes | ||
- vdemeester | ||
- arilivigni | ||
- chmouel | ||
- sthaha | ||
- nikhil-thomas | ||
- hrishin | ||
- piyush-garg | ||
- pradeepitm12 |
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,19 @@ | ||
# Do not edit! This file was generated via Makefile | ||
FROM registry.access.redhat.com/ubi8/ubi:latest | ||
|
||
# NOTE(chmou): We use dollar here so that envsubst don't get confused and expand | ||
# our local PATH. | ||
ENV HOME=/ko-app PATH=DOLLAR{HOME}:DOLLAR{PATH} | ||
RUN yum install --disableplugin=subscription-manager -y git openssh-clients | ||
|
||
COPY ${bin} DOLLAR{HOME}/${bin}.orig | ||
COPY uidwrapper DOLLAR{HOME}/${bin} | ||
|
||
RUN chgrp -R 0 DOLLAR{HOME} && \ | ||
chmod -R g=u DOLLAR{HOME} /etc/passwd | ||
|
||
ENTRYPOINT ["/ko-app/${bin}"] | ||
|
||
# Local Variables: | ||
# mode: dockerfile | ||
# End: |
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,5 @@ | ||
# Do not edit! This file was generated via Makefile | ||
FROM registry.access.redhat.com/ubi8/ubi:latest | ||
|
||
ADD ${bin} /ko-app/${bin} | ||
ENTRYPOINT ["/ko-app/${bin}"] |
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,11 @@ | ||
# Dockerfile to bootstrap build and test in openshift-ci | ||
|
||
FROM openshift/origin-release:golang-1.10 | ||
|
||
# Add kubernetes repository | ||
ADD openshift/ci-operator/build-image/kubernetes.repo /etc/yum.repos.d/ | ||
|
||
RUN yum install -y kubectl ansible | ||
|
||
# Allow runtime users to add entries to /etc/passwd | ||
RUN chmod g+rw /etc/passwd |
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,7 @@ | ||
[kubernetes] | ||
name=Kubernetes | ||
baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64 | ||
enabled=1 | ||
gpgcheck=1 | ||
repo_gpgcheck=1 | ||
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg |
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 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -x | ||
|
||
function generate_dockefiles() { | ||
local dockerfile_in=$1; | ||
local target_dir=$2; shift; shift | ||
for img in $@; do | ||
local image_base=$(basename $img) | ||
mkdir -p $target_dir/$image_base | ||
bin=$image_base envsubst < $dockerfile_in | sed 's/DOLLAR/$/g' > $target_dir/$image_base/Dockerfile | ||
done | ||
} | ||
|
||
generate_dockefiles $@ |
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,5 @@ | ||
# Do not edit! This file was generated via Makefile | ||
FROM registry.access.redhat.com/ubi8/ubi:latest | ||
|
||
ADD bash /ko-app/bash | ||
ENTRYPOINT ["/ko-app/bash"] |
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,5 @@ | ||
# Do not edit! This file was generated via Makefile | ||
FROM registry.access.redhat.com/ubi8/ubi:latest | ||
|
||
ADD controller /ko-app/controller | ||
ENTRYPOINT ["/ko-app/controller"] |
19 changes: 19 additions & 0 deletions
19
openshift/ci-operator/knative-images/creds-init/Dockerfile
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,19 @@ | ||
# Do not edit! This file was generated via Makefile | ||
FROM registry.access.redhat.com/ubi8/ubi:latest | ||
|
||
# NOTE(chmou): We use dollar here so that envsubst don't get confused and expand | ||
# our local PATH. | ||
ENV HOME=/ko-app PATH=${HOME}:${PATH} | ||
RUN yum install --disableplugin=subscription-manager -y git openssh-clients | ||
|
||
COPY creds-init ${HOME}/creds-init.orig | ||
COPY uidwrapper ${HOME}/creds-init | ||
|
||
RUN chgrp -R 0 ${HOME} && \ | ||
chmod -R g=u ${HOME} /etc/passwd | ||
|
||
ENTRYPOINT ["/ko-app/creds-init"] | ||
|
||
# Local Variables: | ||
# mode: dockerfile | ||
# End: |
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,5 @@ | ||
# Do not edit! This file was generated via Makefile | ||
FROM registry.access.redhat.com/ubi8/ubi:latest | ||
|
||
ADD entrypoint /ko-app/entrypoint | ||
ENTRYPOINT ["/ko-app/entrypoint"] |
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,19 @@ | ||
# Do not edit! This file was generated via Makefile | ||
FROM registry.access.redhat.com/ubi8/ubi:latest | ||
|
||
# NOTE(chmou): We use dollar here so that envsubst don't get confused and expand | ||
# our local PATH. | ||
ENV HOME=/ko-app PATH=${HOME}:${PATH} | ||
RUN yum install --disableplugin=subscription-manager -y git openssh-clients | ||
|
||
COPY git-init ${HOME}/git-init.orig | ||
COPY uidwrapper ${HOME}/git-init | ||
|
||
RUN chgrp -R 0 ${HOME} && \ | ||
chmod -R g=u ${HOME} /etc/passwd | ||
|
||
ENTRYPOINT ["/ko-app/git-init"] | ||
|
||
# Local Variables: | ||
# mode: dockerfile | ||
# End: |
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,5 @@ | ||
# Do not edit! This file was generated via Makefile | ||
FROM registry.access.redhat.com/ubi8/ubi:latest | ||
|
||
ADD gsutil /ko-app/gsutil | ||
ENTRYPOINT ["/ko-app/gsutil"] |
5 changes: 5 additions & 0 deletions
5
openshift/ci-operator/knative-images/imagedigestexporter/Dockerfile
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,5 @@ | ||
# Do not edit! This file was generated via Makefile | ||
FROM registry.access.redhat.com/ubi8/ubi:latest | ||
|
||
ADD imagedigestexporter /ko-app/imagedigestexporter | ||
ENTRYPOINT ["/ko-app/imagedigestexporter"] |
5 changes: 5 additions & 0 deletions
5
openshift/ci-operator/knative-images/kubeconfigwriter/Dockerfile
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,5 @@ | ||
# Do not edit! This file was generated via Makefile | ||
FROM registry.access.redhat.com/ubi8/ubi:latest | ||
|
||
ADD kubeconfigwriter /ko-app/kubeconfigwriter | ||
ENTRYPOINT ["/ko-app/kubeconfigwriter"] |
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,5 @@ | ||
# Do not edit! This file was generated via Makefile | ||
FROM registry.access.redhat.com/ubi8/ubi:latest | ||
|
||
ADD nop /ko-app/nop | ||
ENTRYPOINT ["/ko-app/nop"] |
5 changes: 5 additions & 0 deletions
5
openshift/ci-operator/knative-images/pullrequest-init/Dockerfile
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,5 @@ | ||
# Do not edit! This file was generated via Makefile | ||
FROM registry.access.redhat.com/ubi8/ubi:latest | ||
|
||
ADD pullrequest-init /ko-app/pullrequest-init | ||
ENTRYPOINT ["/ko-app/pullrequest-init"] |
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,5 @@ | ||
# Do not edit! This file was generated via Makefile | ||
FROM registry.access.redhat.com/ubi8/ubi:latest | ||
|
||
ADD webhook /ko-app/webhook | ||
ENTRYPOINT ["/ko-app/webhook"] |
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,8 @@ | ||
#!/bin/sh | ||
if ! whoami &> /dev/null; then | ||
if [ -w /etc/passwd ]; then | ||
echo "${USER_NAME:-default}:x:$(id -u):0:${USER_NAME:-default} user:${HOME}:/sbin/nologin" >> /etc/passwd | ||
fi | ||
fi | ||
|
||
exec ${0}.orig $@ |
Oops, something went wrong.