-
Notifications
You must be signed in to change notification settings - Fork 21
chore : add a devfile for using project from Cloud Develpment Environments #186
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,79 @@ | ||
| # | ||
| # Copyright (c) 2020-2024 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 | ||
| # | ||
| schemaVersion: 2.3.0 | ||
| metadata: | ||
| name: web-terminal-operator | ||
| components: | ||
| - name: tools | ||
| container: | ||
| image: quay.io/wto/web-terminal-operator-devtools:latest | ||
| memoryRequest: 1Gi | ||
| memoryLimit: 16Gi | ||
| cpuLimit: '4' | ||
| cpuRequest: '0.5' | ||
| env: | ||
| - name: DOCKER | ||
| value: podman | ||
| commands: | ||
| - id: build-and-push-controller | ||
| exec: | ||
| label: "1. Build and push WTO controller image" | ||
| component: tools | ||
| commandLine: | | ||
| read -p "ENTER a container registry org to push the web-terminal-operator images (e.g. quay.io/janedoe): " WTO_IMG_REPO && | ||
| read -p "ENTER the tag for the image (e.g. dev): " WTO_IMG_TAG && | ||
| export WTO_IMG=${WTO_IMG_REPO}/web-terminal-operator:${WTO_IMG_TAG} && | ||
| export BUNDLE_IMG=${WTO_IMG_REPO}/web-terminal-operator-metadata:${WTO_IMG_TAG} && | ||
| export INDEX_IMG=${WTO_IMG_REPO}/web-terminal-operator-index:${WTO_IMG_TAG} && | ||
| make build | ||
| group: | ||
| kind: build | ||
| - id: install-operator | ||
| exec: | ||
| label: "2. Register CatalogSource and install the operator" | ||
| component: tools | ||
| commandLine: | | ||
| read -p "ENTER a container registry org to use the web-terminal-operator images (e.g. quay.io/janedoe): " WTO_IMG_REPO && | ||
| read -p "ENTER the tag for the image (e.g. dev): " WTO_IMG_TAG && | ||
| export WTO_IMG=${WTO_IMG_REPO}/web-terminal-operator:${WTO_IMG_TAG} && | ||
| export BUNDLE_IMG=${WTO_IMG_REPO}/web-terminal-operator-metadata:${WTO_IMG_TAG} && | ||
| export INDEX_IMG=${WTO_IMG_REPO}/web-terminal-operator-index:${WTO_IMG_TAG} && | ||
| make install | ||
| group: | ||
| kind: run | ||
|
|
||
| - id: register-catalogsource | ||
| exec: | ||
| label: "3. Register CatalogSource only" | ||
| component: tools | ||
| commandLine: | | ||
| read -p "ENTER a container registry org to push the web-terminal-operator images (e.g. quay.io/janedoe): " WTO_IMG_REPO && | ||
| read -p "ENTER the tag for the image (e.g. dev): " WTO_IMG_TAG && | ||
| export WTO_IMG=${WTO_IMG_REPO}/web-terminal-operator:${WTO_IMG_TAG} && | ||
| export BUNDLE_IMG=${WTO_IMG_REPO}/web-terminal-operator-metadata:${WTO_IMG_TAG} && | ||
| export INDEX_IMG=${WTO_IMG_REPO}/web-terminal-operator-index:${WTO_IMG_TAG} && | ||
| make register_catalogsource | ||
| group: | ||
| kind: run | ||
|
|
||
| - id: unregister-catalogsource | ||
| exec: | ||
| label: "4. Unregister CatalogSource" | ||
| component: tools | ||
| commandLine: make unregister_catalogsource | ||
| group: | ||
| kind: run | ||
|
|
||
| - id: uninstall-operator | ||
| exec: | ||
| label: "5. Uninstall the Web Terminal Operator" | ||
| component: tools | ||
| commandLine: make uninstall | ||
| group: | ||
| kind: run |
This file contains hidden or 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,54 @@ | ||
| # | ||
| # Copyright (c) 2020-2024 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 | ||
| # | ||
| name: Devtools container build | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ main ] | ||
|
|
||
| env: | ||
| PUSH_REGISTRY: quay.io | ||
|
|
||
| jobs: | ||
| build-devtools-img: | ||
| runs-on: ubuntu-24.04 | ||
| outputs: | ||
| git-sha: ${{ steps.git-sha.outputs.sha }} | ||
|
|
||
| steps: | ||
| - name: Checkout webterminal-operator source code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set output for Git short SHA | ||
| id: git-sha | ||
| run: echo "sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | ||
|
|
||
| - name: Login to quay.io | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| username: ${{ secrets.QUAY_USERNAME }} | ||
| password: ${{ secrets.QUAY_PASSWORD }} | ||
| registry: ${{ env.PUSH_REGISTRY }} | ||
|
|
||
| - name: Set up QEMU | ||
| uses: docker/setup-qemu-action@v3 | ||
|
|
||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v3 | ||
|
|
||
| - name: Build and push webterminal-operator-devtools image | ||
| uses: docker/build-push-action@v6 | ||
| with: | ||
| context: . | ||
| push: true | ||
| tags: | | ||
| ${{ env.PUSH_REGISTRY }}/${{ secrets.QUAY_USERNAME }}/web-terminal-operator-devtools:latest | ||
| ${{ env.PUSH_REGISTRY }}/${{ secrets.QUAY_USERNAME }}/web-terminal-operator-devtools:sha-${{ steps.git-sha.outputs.sha }} | ||
| file: ./build/dockerfiles/devtools.Dockerfile | ||
|
|
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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,38 @@ | ||
| # Copyright (c) 2021-2024 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 quay.io/devfile/base-developer-image:ubi9-latest | ||
|
|
||
| USER root | ||
|
|
||
| # Install gettext | ||
| RUN dnf install -y gettext make jq python3-pip && \ | ||
| pip3 install yq | ||
|
|
||
| # Install the Operator SDK | ||
| ENV OPERATOR_SDK_VERSION="v0.17.2" | ||
| ENV OPERATOR_SDK_DL_URL=https://github.com/operator-framework/operator-sdk/releases/download/${OPERATOR_SDK_VERSION} | ||
| RUN curl -sSLO ${OPERATOR_SDK_DL_URL}/operator-sdk_linux_amd64 && \ | ||
| chmod +x operator-sdk_linux_amd64 && \ | ||
| mv operator-sdk_linux_amd64 /usr/local/bin/operator-sdk | ||
|
|
||
| # Install opm CLI | ||
| ENV OPM_VERSION="v1.13.1" | ||
| RUN curl -sSLO https://github.com/operator-framework/operator-registry/releases/download/${OPM_VERSION}/linux-amd64-opm && \ | ||
| chmod +x linux-amd64-opm && \ | ||
| mv linux-amd64-opm /usr/local/bin/opm | ||
|
|
||
| ENV OC_VERSION=4.19 | ||
| RUN curl -L https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/stable-${OC_VERSION}/openshift-client-linux.tar.gz | \ | ||
| tar -C /usr/local/bin -xz --no-same-owner && \ | ||
| chmod +x /usr/local/bin/oc | ||
|
|
||
| USER 1001 | ||
|
|
||
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I didn't realize that the
base-developer-imagedoesn't haveocinstalled.Could we install it here?