Skip to content
This repository has been archived by the owner on Dec 5, 2020. It is now read-only.

Initial contribution of sidecar image for TekTon tooling #2

Merged
merged 5 commits into from
Jul 27, 2020
Merged
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
34 changes: 34 additions & 0 deletions .github/workflows/build-publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
on:
push:

jobs:
build:
env:
IMAGE_NAME: quay.io/eclipse/che-sidecar-tekton
runs-on: ubuntu-latest
steps:
- name: Clone source code
uses: actions/checkout@v1
with:
fetch-depth: 1

- name: Docker login
uses: azure/docker-login@v1
with:
login-server: quay.io
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Docker Buildx
uses: crazy-max/ghaction-docker-buildx@v1.5.0
with:
buildx-version: v0.4.1

- name: Build and push image
run: |
IMAGE_VERSION=$(cat VERSION)
SHORT_SHA1=$(git rev-parse --short HEAD)
PLATFORMS=$(cat PLATFORMS)
echo "Building and pushing version ${IMAGE_VERSION} of image ${IMAGE_NAME}"
docker buildx build --platform "${PLATFORMS}" -t "${IMAGE_NAME}:${IMAGE_VERSION}-${SHORT_SHA1}" \
--push .
34 changes: 34 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Copyright (c) 2020 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# Red Hat, Inc. - initial API and implementation

FROM golang:alpine AS builder
ericwill marked this conversation as resolved.
Show resolved Hide resolved
RUN apk update && apk add --no-cache git
WORKDIR $GOPATH
RUN cd src && git clone https://github.com/tektoncd/experimental && cd experimental/octant-plugin && \
ericwill marked this conversation as resolved.
Show resolved Hide resolved
CGO_ENABLED=0 GOOS=linux go build -o $GOPATH/src/tekton-plugin -a -ldflags '-extldflags "-static"' .

FROM quay.io/eclipse/che-sidecar-kubernetes-tooling:1.2.0-cbde020

ENV OCTANT_VERSION 0.12.1
ENV TEKTONCD_VERSION 0.9.0

RUN dnf install -y wget && \
mkdir -p /home/theia/.octant/plugins && \
wget https://github.com/vmware-tanzu/octant/releases/download/v${OCTANT_VERSION}/octant_${OCTANT_VERSION}_Linux-64bit.tar.gz && \
tar -zxvf octant_${OCTANT_VERSION}_Linux-64bit.tar.gz && cd octant_${OCTANT_VERSION}_Linux-64bit && cp octant /usr/local/bin/ && \
wget https://github.com/tektoncd/cli/releases/download/v${TEKTONCD_VERSION}/tkn_${TEKTONCD_VERSION}_Linux_x86_64.tar.gz && \
tar xvzf tkn_${TEKTONCD_VERSION}_Linux_x86_64.tar.gz -C /usr/local/bin/ tkn && \
rm tkn_${TEKTONCD_VERSION}_Linux_x86_64.tar.gz


RUN mkdir -p /home/theia/.octant/plugins
COPY --from=builder /go/src/tekton-plugin /home/theia/.octant/plugins/
RUN chgrp -R 0 /home/theia/.octant && chmod -R g+rwX /home/theia/.octant
RUN chown -R 1724:root /home/theia/.octant
1 change: 1 addition & 0 deletions PLATFORMS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
linux/amd64
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# che-sidecar-tekton
Eclipse Che Sidecar container for TekTon tooling

This sidecar image is used to run Che Plug-ins in dedicated containers
This sidecar image is used to run Che Plug-ins in dedicated containers, and is based on the [che-sidecar-kubernetes-tooling](hhttps://github.com/che-dockerfiles/che-sidecar-kubernetes-tooling/blob/master/Dockerfile) image.

# Dockerfiles

Expand Down
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.2.0