diff --git a/.devfile.Dockerfile b/.devfile.Dockerfile new file mode 100644 index 000000000..6fd207b6c --- /dev/null +++ b/.devfile.Dockerfile @@ -0,0 +1,17 @@ +FROM quay.io/devfile/universal-developer-image:ubi8-latest + +#install Go 1.18 +RUN cd /tmp && wget https://go.dev/dl/go1.18.6.linux-amd64.tar.gz && \ + mkdir $HOME/go1.18 && \ + tar -xvzf go1.18.6.linux-amd64.tar.gz -C $HOME/go1.18 --strip-components 1 && \ + if ! grep -q "export PATH=\$HOME/go1.18/bin:\$PATH" $HOME/.bashrc; then echo "export PATH=\$HOME/go1.18/bin:\$PATH" >> $HOME/.bashrc; fi + +# install chectl +RUN tag=$(curl https://api.github.com/repos/che-incubator/chectl/tags | jq -r '.[0].name') && \ + cd /tmp && wget https://github.com/che-incubator/chectl/releases/download/${tag}/chectl-linux-x64.tar.gz && \ + mkdir $HOME/chectl && \ + tar -xvzf chectl-linux-x64.tar.gz -C $HOME/chectl --strip-components 1 && \ + if ! grep -q "export PATH=\$HOME/chectl/bin:\$PATH" $HOME/.bashrc; then echo "export PATH=\$HOME/chectl/bin:\$PATH" >> $HOME/.bashrc; fi + +# install goimports +RUN $HOME/go1.18/bin/go install golang.org/x/tools/cmd/goimports@latest diff --git a/.github/workflows/devfile-ci.yaml b/.github/workflows/devfile-ci.yaml new file mode 100644 index 000000000..22960de5e --- /dev/null +++ b/.github/workflows/devfile-ci.yaml @@ -0,0 +1,49 @@ +# +# Copyright (c) 2019-2022 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 +# + +name: ci + +on: + push: + branches: + - 'main' + paths: + - '.devfile.Dockerfile' + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v3 + - + name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - + name: Login to quay.io + uses: docker/login-action@v2 + with: + registry: quay.io + username: ${{ secrets.QUAY_USERNAME }} + password: ${{ secrets.QUAY_PASSWORD }} + - + name: Build and push container + uses: docker/build-push-action@v4 + with: + context: . + file: .devfile.Dockerfile + push: true + tags: quay.io/eclipse/che-operator-dev:latest diff --git a/bundle/next/eclipse-che/manifests/che-operator.clusterserviceversion.yaml b/bundle/next/eclipse-che/manifests/che-operator.clusterserviceversion.yaml index 1300870f7..75f890095 100644 --- a/bundle/next/eclipse-che/manifests/che-operator.clusterserviceversion.yaml +++ b/bundle/next/eclipse-che/manifests/che-operator.clusterserviceversion.yaml @@ -77,7 +77,7 @@ metadata: operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: https://github.com/eclipse-che/che-operator support: Eclipse Foundation - name: eclipse-che.v7.74.0-809.next + name: eclipse-che.v7.75.0-809.next namespace: placeholder spec: apiservicedefinitions: {} @@ -1234,7 +1234,7 @@ spec: minKubeVersion: 1.19.0 provider: name: Eclipse Foundation - version: 7.74.0-809.next + version: 7.75.0-809.next webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/devfile.yaml b/devfile.yaml index 300ce4848..9cf8226ce 100644 --- a/devfile.yaml +++ b/devfile.yaml @@ -17,7 +17,7 @@ metadata: components: - name: tooling-container container: - image: quay.io/devfile/universal-developer-image:ubi8-latest + image: quay.io/eclipse/che-operator-dev:latest memoryRequest: 2Gi memoryLimit: 16Gi cpuRequest: 2000m @@ -34,31 +34,6 @@ components: - name: KUBECONFIG value: /home/user/.kube/config commands: - - id: install-go-1-18 - exec: - label: POST START EVENT - Install go 1.18 - component: tooling-container - commandLine: | - cd /tmp && wget https://go.dev/dl/go1.18.6.linux-amd64.tar.gz && \ - mkdir $HOME/go1.18 && \ - tar -xvzf go1.18.6.linux-amd64.tar.gz -C $HOME/go1.18 --strip-components 1 && \ - if ! grep -q "export PATH=\$HOME/go1.18/bin:\$PATH" $HOME/.bashrc; then echo "export PATH=\$HOME/go1.18/bin:\$PATH" >> $HOME/.bashrc; fi - - id: install-chectl - exec: - label: POST START EVENT - Install chectl - component: tooling-container - commandLine: | - tag=$(curl https://api.github.com/repos/che-incubator/chectl/tags | jq -r '.[0].name') && \ - cd /tmp && wget https://github.com/che-incubator/chectl/releases/download/${tag}/chectl-linux-x64.tar.gz && \ - mkdir $HOME/chectl && \ - tar -xvzf chectl-linux-x64.tar.gz -C $HOME/chectl --strip-components 1 && \ - if ! grep -q "export PATH=\$HOME/chectl/bin:\$PATH" $HOME/.bashrc; then echo "export PATH=\$HOME/chectl/bin:\$PATH" >> $HOME/.bashrc; fi - - id: install-goimports - exec: - label: POST START EVENT - Install goimports - component: tooling-container - commandLine: | - $HOME/go1.18/bin/go install golang.org/x/tools/cmd/goimports@latest - id: go-build exec: label: Build Eclipse Che Operator binary @@ -83,11 +58,4 @@ commands: exec: label: Update all development resources component: tooling-container - commandLine: make update-dev-resources -events: - postStart: - - install-go-1-18 - - install-goimports - - install-chectl - - + commandLine: make update-dev-resources