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

Commit

Permalink
Initial contribution of sidecar image for TekTon tooling (#2)
Browse files Browse the repository at this point in the history
* Initial contribution of sidecar image for TekTon tooling
* Add missing storage.conf
* Use che-sidecar-kubernetes-tooling image as a base
* Download tekton cli from GH
* Update version to 0.2.0

Signed-off-by: Eric Williams <ericwill@redhat.com>
  • Loading branch information
ericwill authored Jul 27, 2020
1 parent 9d159dd commit 7a8b4ad
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 1 deletion.
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
RUN apk update && apk add --no-cache git
WORKDIR $GOPATH
RUN cd src && git clone https://github.com/tektoncd/experimental && cd experimental/octant-plugin && \
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

0 comments on commit 7a8b4ad

Please sign in to comment.