-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:eclipse-che/che-server into che-22243
- Loading branch information
Showing
126 changed files
with
443 additions
and
176 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 |
---|---|---|
|
@@ -11,28 +11,30 @@ | |
# Red Hat, Inc. - initial API and implementation | ||
|
||
# Dockerfile to bootstrap build and test in openshift-ci | ||
|
||
FROM registry.access.redhat.com/ubi9/nodejs-18:1 | ||
|
||
SHELL ["/bin/bash", "-c"] | ||
|
||
# hadolint ignore=DL3002 | ||
USER 0 | ||
|
||
# Install yq, kubectl, chectl cli used by olm/olm.sh script. | ||
RUN dnf install -y psmisc nodejs-devel nodejs-libs -q --allowerasing --nobest \ | ||
# hadolint ignore=DL3041 | ||
RUN dnf install -y -q --allowerasing --nobest nodejs-devel nodejs-libs psmisc python3-pip jq golang httpd-tools \ | ||
# already installed or installed as deps: | ||
openssl openssl-devel ca-certificates make cmake cpp gcc gcc-c++ zlib zlib-devel brotli brotli-devel python3 nodejs-packaging && \ | ||
dnf update -y && dnf clean all && \ | ||
npm install -g [email protected] npm@9 && \ | ||
echo -n "node version: "; node -v; \ | ||
echo -n "npm version: "; npm -v; \ | ||
echo -n "yarn version: "; yarn -v && \ | ||
yum install --assumeyes -d1 python3-pip httpd-tools && \ | ||
pip3 install --upgrade setuptools && \ | ||
pip3 install yq && \ | ||
echo -n "yarn version: "; yarn -v; \ | ||
go version; \ | ||
pip3 install --upgrade pip setuptools yq && \ | ||
|
||
# Install kubectl, chectl cli used by olm/olm.sh script. | ||
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl && \ | ||
chmod +x ./kubectl && \ | ||
mv ./kubectl /usr/local/bin && \ | ||
bash <(curl -sL https://www.eclipse.org/che/chectl/) --channel=next && \ | ||
curl https://mirror.openshift.com/pub/openshift-v4/clients/ocp/4.12.30/openshift-client-linux.tar.gz | tar xvzf - -C /usr/local/bin/ oc && \ | ||
curl https://mirror.openshift.com/pub/openshift-v4/clients/ocp/latest-4.12/openshift-client-linux.tar.gz | tar xvzf - -C /usr/local/bin/ oc && \ | ||
chmod ug+x /usr/local/bin/oc | ||
|
||
SHELL ["/bin/bash", "-c"] | ||
|
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
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
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 @@ | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: git-ssh-key | ||
annotations: | ||
controller.devfile.io/mount-as: subpath | ||
controller.devfile.io/mount-path: /etc/ssh/ | ||
labels: | ||
controller.devfile.io/mount-to-devworkspace: "true" | ||
controller.devfile.io/watch-secret: "true" | ||
type: Opaque | ||
data: | ||
dwo_ssh_key: ssh_private_key | ||
dwo_ssh_key.pub: ssh_public_key | ||
ssh_config: aG9zdCAqCiAgSWRlbnRpdHlGaWxlIC9ldGMvc3NoL2R3b19zc2hfa2V5CiAgU3RyaWN0SG9zdEtleUNoZWNraW5nID0gbm8K |
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,34 @@ | ||
#!/bin/bash | ||
# | ||
# Copyright (c) 2023 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 | ||
# | ||
|
||
# exit immediately when a command fails | ||
set -ex | ||
# only exit with zero if all commands of the pipeline exit successfully | ||
set -o pipefail | ||
|
||
export PUBLIC_REPO_URL=${PUBLIC_REPO_URL:-"https://[email protected]/chepullreq1/che-pr-public/_git/public-repo"} | ||
export PRIVATE_REPO_URL=${PRIVATE_REPO_URL:-"https://dev.azure.com/chepullreq1/che-pr-private/_git/private-repo"} | ||
|
||
# import common test functions | ||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" | ||
source "${SCRIPT_DIR}"/common.sh | ||
|
||
trap "catchFinish" EXIT SIGINT | ||
|
||
setupTestEnvironment ${OCP_NON_ADMIN_USER_NAME} | ||
# due to the issue https://github.com/eclipse/che/issues/22469 | ||
# testFactoryResolverNoPatOAuth ${PUBLIC_REPO_URL} ${PRIVATE_REPO_URL} | ||
testCloneGitRepoProjectShouldExists ${PUBLIC_REPO_WORKSPACE_NAME} ${PUBLIC_PROJECT_NAME} ${PUBLIC_REPO_URL} ${USER_CHE_NAMESPACE} | ||
deleteTestWorkspace ${PUBLIC_REPO_WORKSPACE_NAME} ${USER_CHE_NAMESPACE} | ||
testCloneGitRepoNoProjectExists ${PRIVATE_REPO_WORKSPACE_NAME} ${PRIVATE_PROJECT_NAME} ${PRIVATE_REPO_URL} ${USER_CHE_NAMESPACE} | ||
deleteTestWorkspace ${PRIVATE_REPO_WORKSPACE_NAME} ${USER_CHE_NAMESPACE} |
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,41 @@ | ||
#!/bin/bash | ||
# | ||
# Copyright (c) 2023 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 | ||
# | ||
|
||
# exit immediately when a command fails | ||
set -ex | ||
# only exit with zero if all commands of the pipeline exit successfully | ||
set -o pipefail | ||
|
||
export PUBLIC_REPO_URL=${PUBLIC_REPO_URL:-"https://[email protected]/chepullreq1/che-pr-public/_git/public-repo"} | ||
export PRIVATE_REPO_URL=${PRIVATE_REPO_URL:-"https://dev.azure.com/chepullreq1/che-pr-private/_git/private-repo"} | ||
export GIT_PROVIDER_TYPE=${GIT_PROVIDER_TYPE:-"azure-devops"} | ||
export GIT_PROVIDER_URL=${GIT_PROVIDER_URL:-"https://dev.azure.com"} | ||
|
||
# import common test functions | ||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" | ||
source "${SCRIPT_DIR}"/common.sh | ||
|
||
trap "catchFinish" EXIT SIGINT | ||
|
||
setupTestEnvironment ${OCP_NON_ADMIN_USER_NAME} | ||
setupPersonalAccessToken ${GIT_PROVIDER_TYPE} ${GIT_PROVIDER_URL} ${AZURE_PAT} | ||
requestProvisionNamespace | ||
testFactoryResolverWithPatOAuth ${PUBLIC_REPO_URL} ${PRIVATE_REPO_URL} | ||
echo "[INFO] Check clone public repository with PAT setup" | ||
testCloneGitRepoProjectShouldExists ${PUBLIC_REPO_WORKSPACE_NAME} ${PUBLIC_PROJECT_NAME} ${PUBLIC_REPO_URL} ${USER_CHE_NAMESPACE} | ||
testGitCredentialsData ${USER_CHE_NAMESPACE} ${AZURE_PAT} ${GIT_PROVIDER_URL} | ||
deleteTestWorkspace ${PUBLIC_REPO_WORKSPACE_NAME} ${USER_CHE_NAMESPACE} | ||
echo "[INFO] Check clone private repository with PAT setup" | ||
testCloneGitRepoProjectShouldExists ${PRIVATE_REPO_WORKSPACE_NAME} ${PRIVATE_PROJECT_NAME} ${PRIVATE_REPO_URL} ${USER_CHE_NAMESPACE} | ||
testGitCredentialsData ${USER_CHE_NAMESPACE} ${AZURE_PAT} ${GIT_PROVIDER_URL} | ||
deleteTestWorkspace ${PRIVATE_REPO_WORKSPACE_NAME} ${USER_CHE_NAMESPACE} |
35 changes: 35 additions & 0 deletions
35
.ci/openshift-ci/test-bitbucket-no-pat-oauth-flow-raw-devfile-url.sh
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,35 @@ | ||
#!/bin/bash | ||
# | ||
# Copyright (c) 2023 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 | ||
# | ||
|
||
# exit immediately when a command fails | ||
set -ex | ||
# only exit with zero if all commands of the pipeline exit successfully | ||
set -o pipefail | ||
|
||
export PUBLIC_REPO_RAW_PATH_URL=${PUBLIC_REPO_RAW_PATH_URL:-"https://bitbucket.org/chepullreq/public-repo/raw/746000bd63a54eaf8ea8aba9dfe6620e5c6c61d7/devfile.yaml"} | ||
export PRIVATE_REPO_RAW_PATH_URL=${PRIVATE_REPO_URL:-"https://bitbucket.org/chepullreq/private-repo/raw/80b183d27c6c533462128b0c092208aad73b2906/devfile.yaml"} | ||
|
||
# import common test functions | ||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" | ||
source "${SCRIPT_DIR}"/common.sh | ||
|
||
trap "catchFinish" EXIT SIGINT | ||
|
||
setupTestEnvironment ${OCP_NON_ADMIN_USER_NAME} | ||
testFactoryResolverNoPatOAuth ${PUBLIC_REPO_RAW_PATH_URL} ${PRIVATE_REPO_RAW_PATH_URL} | ||
|
||
testCloneGitRepoProjectShouldExists ${PUBLIC_REPO_WORKSPACE_NAME} ${PUBLIC_PROJECT_NAME} ${PUBLIC_REPO_RAW_PATH_URL} ${USER_CHE_NAMESPACE} | ||
deleteTestWorkspace ${PUBLIC_REPO_WORKSPACE_NAME} ${USER_CHE_NAMESPACE} | ||
|
||
testCloneGitRepoNoProjectExists ${PRIVATE_REPO_WORKSPACE_NAME} ${PRIVATE_PROJECT_NAME} ${PRIVATE_REPO_RAW_PATH_URL} ${USER_CHE_NAMESPACE} | ||
deleteTestWorkspace ${PRIVATE_REPO_WORKSPACE_NAME} ${USER_CHE_NAMESPACE} |
36 changes: 36 additions & 0 deletions
36
.ci/openshift-ci/test-bitbucket-no-pat-oauth-flow-ssh-url.sh
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,36 @@ | ||
|
||
#!/bin/bash | ||
# | ||
# Copyright (c) 2023 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 | ||
# | ||
|
||
# exit immediately when a command fails | ||
set -ex | ||
# only exit with zero if all commands of the pipeline exit successfully | ||
set -o pipefail | ||
|
||
export PUBLIC_REPO_SSH_URL=${PUBLIC_REPO_SSH_URL:-"[email protected]:chepullreq/public-repo.git"} | ||
export PRIVATE_REPO_SSH_URL=${PRIVATE_REPO_SSH_URL:-"[email protected]:chepullreq/private-repo.git"} | ||
|
||
# import common test functions | ||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" | ||
source "${SCRIPT_DIR}"/common.sh | ||
|
||
trap "catchFinish" EXIT SIGINT | ||
|
||
setupTestEnvironment ${OCP_NON_ADMIN_USER_NAME} | ||
setupSSHKeyPairs "${BITBUCKET_PRIVATE_KEY}" "${BITBUCKET_PUBLIC_KEY}" | ||
testFactoryResolverNoPatOAuth ${PUBLIC_REPO_SSH_URL} ${PRIVATE_REPO_SSH_URL} | ||
|
||
testCloneGitRepoProjectShouldExists ${PUBLIC_REPO_WORKSPACE_NAME} ${PUBLIC_PROJECT_NAME} ${PUBLIC_REPO_SSH_URL} ${USER_CHE_NAMESPACE} | ||
deleteTestWorkspace ${PUBLIC_REPO_WORKSPACE_NAME} ${USER_CHE_NAMESPACE} | ||
testCloneGitRepoProjectShouldExists ${PRIVATE_REPO_WORKSPACE_NAME} ${PRIVATE_PROJECT_NAME} ${PRIVATE_REPO_SSH_URL} ${USER_CHE_NAMESPACE} | ||
deleteTestWorkspace ${PRIVATE_REPO_WORKSPACE_NAME} ${USER_CHE_NAMESPACE} |
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
Oops, something went wrong.