ci: Add next images build (#863)
* ci: Add next images build Signed-off-by: Mykhailo Kuznietsov <mkuznets@redhat.com> * fixup! ci: Add next images build * fixup! fixup! ci: Add next images build * fixup! fixup! fixup! ci: Add next images build * fixup! fixup! fixup! fixup! ci: Add next images build * fixes to CI Signed-off-by: Mykhailo Kuznietsov <mkuznets@redhat.com> * fixup! fixes to CI * fixup! Merge branch 'main' of github.com:eclipse/che-operator into next-buildpull/884/head
parent
c9890991e8
commit
7d369a52f2
|
|
@ -57,7 +57,7 @@ function Catch_Finish() {
|
||||||
|
|
||||||
overrideDefaults() {
|
overrideDefaults() {
|
||||||
# CI_CHE_OPERATOR_IMAGE it is che operator image builded in openshift CI job workflow. More info about how works image dependencies in ci:https://github.com/openshift/ci-tools/blob/master/TEMPLATES.md#parameters-available-to-templates
|
# CI_CHE_OPERATOR_IMAGE it is che operator image builded in openshift CI job workflow. More info about how works image dependencies in ci:https://github.com/openshift/ci-tools/blob/master/TEMPLATES.md#parameters-available-to-templates
|
||||||
export OPERATOR_IMAGE=${CI_CHE_OPERATOR_IMAGE:-"quay.io/eclipse/che-operator:nightly"}
|
export OPERATOR_IMAGE=${CI_CHE_OPERATOR_IMAGE:-"quay.io/eclipse/che-operator:next"}
|
||||||
echo ${OPERATOR_IMAGE}
|
echo ${OPERATOR_IMAGE}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ export SLACK_TOKEN="${SLACK_TOKEN-"UNDEFINED"}"
|
||||||
export WORKSPACE="${WORKSPACE-"UNDEFINED"}"
|
export WORKSPACE="${WORKSPACE-"UNDEFINED"}"
|
||||||
export REG_CREDS=${XDG_RUNTIME_DIR}/containers/auth.json
|
export REG_CREDS=${XDG_RUNTIME_DIR}/containers/auth.json
|
||||||
export ORGANIZATION="eclipse"
|
export ORGANIZATION="eclipse"
|
||||||
export TAG_NIGHTLY="nightly"
|
export TAG="next"
|
||||||
|
|
||||||
# catch and stop execution on any error
|
# catch and stop execution on any error
|
||||||
trap "catchDisconnectedJenkinsFinish" EXIT SIGINT
|
trap "catchDisconnectedJenkinsFinish" EXIT SIGINT
|
||||||
|
|
@ -92,7 +92,7 @@ cd che-devfile-registry
|
||||||
|
|
||||||
./build.sh --organization "${ORGANIZATION}" \
|
./build.sh --organization "${ORGANIZATION}" \
|
||||||
--registry "${INTERNAL_REGISTRY_URL}" \
|
--registry "${INTERNAL_REGISTRY_URL}" \
|
||||||
--tag "${TAG_NIGHTLY}" \
|
--tag "${TAG}" \
|
||||||
--offline
|
--offline
|
||||||
cd .. && rm -rf che-devfile-registry
|
cd .. && rm -rf che-devfile-registry
|
||||||
|
|
||||||
|
|
@ -103,22 +103,22 @@ cd che-plugin-registry
|
||||||
export SKIP_TEST=true
|
export SKIP_TEST=true
|
||||||
./build.sh --organization "${ORGANIZATION}" \
|
./build.sh --organization "${ORGANIZATION}" \
|
||||||
--registry "${INTERNAL_REGISTRY_URL}" \
|
--registry "${INTERNAL_REGISTRY_URL}" \
|
||||||
--tag "${TAG_NIGHTLY}" \
|
--tag "${TAG}" \
|
||||||
--offline \
|
--offline \
|
||||||
--skip-digest-generation
|
--skip-digest-generation
|
||||||
|
|
||||||
cd .. && rm -rf che-plugin-registry
|
cd .. && rm -rf che-plugin-registry
|
||||||
|
|
||||||
# Push devfile and plugins image to private registry
|
# Push devfile and plugins image to private registry
|
||||||
podman push --authfile="${REG_CREDS}" --tls-verify=false "${INTERNAL_REGISTRY_URL}"/"${ORGANIZATION}"/che-devfile-registry:"${TAG_NIGHTLY}"
|
podman push --authfile="${REG_CREDS}" --tls-verify=false "${INTERNAL_REGISTRY_URL}"/"${ORGANIZATION}"/che-devfile-registry:"${TAG}"
|
||||||
podman push --authfile="${REG_CREDS}" --tls-verify=false "${INTERNAL_REGISTRY_URL}"/"${ORGANIZATION}"/che-plugin-registry:"${TAG_NIGHTLY}"
|
podman push --authfile="${REG_CREDS}" --tls-verify=false "${INTERNAL_REGISTRY_URL}"/"${ORGANIZATION}"/che-plugin-registry:"${TAG}"
|
||||||
|
|
||||||
# Get all containers images used in eclipse-che deployment(postgresql, che-server, che-dashboard, keycloak...)
|
# Get all containers images used in eclipse-che deployment(postgresql, che-server, che-dashboard, keycloak...)
|
||||||
curl -sSLo- https://raw.githubusercontent.com/eclipse-che/che-operator/main/deploy/operator.yaml > /tmp/yam.yaml
|
curl -sSLo- https://raw.githubusercontent.com/eclipse-che/che-operator/main/deploy/operator.yaml > /tmp/yam.yaml
|
||||||
export ARRAY_OF_IMAGES=$(cat /tmp/yam.yaml | yq '.spec.template.spec.containers[0].env[] | select(.name|test("RELATED_")) | .value' -r)
|
export ARRAY_OF_IMAGES=$(cat /tmp/yam.yaml | yq '.spec.template.spec.containers[0].env[] | select(.name|test("RELATED_")) | .value' -r)
|
||||||
|
|
||||||
# Remove from Array of images devfile and plugins because will be builded using build.sh in offline mode.
|
# Remove from Array of images devfile and plugins because will be builded using build.sh in offline mode.
|
||||||
for delete in 'quay.io/eclipse/che-plugin-registry:nightly' 'quay.io/eclipse/che-devfile-registry:nightly'
|
for delete in 'quay.io/eclipse/che-plugin-registry:next' 'quay.io/eclipse/che-devfile-registry:next'
|
||||||
do
|
do
|
||||||
#Quotes when working with strings
|
#Quotes when working with strings
|
||||||
ARRAY_OF_IMAGES=("${ARRAY_OF_IMAGES[@]/$delete}")
|
ARRAY_OF_IMAGES=("${ARRAY_OF_IMAGES[@]/$delete}")
|
||||||
|
|
@ -140,11 +140,11 @@ do
|
||||||
done
|
done
|
||||||
|
|
||||||
# Copy Che Operator into private registry
|
# Copy Che Operator into private registry
|
||||||
sudo skopeo copy --authfile=${REG_CREDS} --dest-tls-verify=false docker://quay.io/eclipse/che-operator:nightly docker://${INTERNAL_REGISTRY_URL}/eclipse/che-operator:nightly
|
sudo skopeo copy --authfile=${REG_CREDS} --dest-tls-verify=false docker://quay.io/eclipse/che-operator:next docker://${INTERNAL_REGISTRY_URL}/eclipse/che-operator:next
|
||||||
|
|
||||||
# Filter all necessary plugins need it to start a workspace in disconnected en
|
# Filter all necessary plugins need it to start a workspace in disconnected en
|
||||||
IFS=$'\r\n' GLOBIGNORE='*' command eval 'PLUGINS_IMAGES=($(podman run --authfile=${XDG_RUNTIME_DIR}/containers/auth.json -it --rm \
|
IFS=$'\r\n' GLOBIGNORE='*' command eval 'PLUGINS_IMAGES=($(podman run --authfile=${XDG_RUNTIME_DIR}/containers/auth.json -it --rm \
|
||||||
--entrypoint cat ${INTERNAL_REGISTRY_URL}/eclipse/che-plugin-registry:nightly /var/www/html/v3/external_images.txt))'
|
--entrypoint cat ${INTERNAL_REGISTRY_URL}/eclipse/che-plugin-registry:next /var/www/html/v3/external_images.txt))'
|
||||||
for container in "${PLUGINS_IMAGES[@]}";
|
for container in "${PLUGINS_IMAGES[@]}";
|
||||||
do
|
do
|
||||||
if [[ $container != *"che-plugin-sidecar"* ]] &&
|
if [[ $container != *"che-plugin-sidecar"* ]] &&
|
||||||
|
|
@ -158,7 +158,7 @@ done
|
||||||
|
|
||||||
# Obtain workspace golang SIDECAR_IMAGE and copy to internal registry
|
# Obtain workspace golang SIDECAR_IMAGE and copy to internal registry
|
||||||
podman run --authfile=${XDG_RUNTIME_DIR}/containers/auth.json -it --rm \
|
podman run --authfile=${XDG_RUNTIME_DIR}/containers/auth.json -it --rm \
|
||||||
--entrypoint cat "${INTERNAL_REGISTRY_URL}"/eclipse/che-plugin-registry:nightly /var/www/html/v3/plugins/golang/go/latest/meta.yaml > /tmp/workspace.yaml
|
--entrypoint cat "${INTERNAL_REGISTRY_URL}"/eclipse/che-plugin-registry:next /var/www/html/v3/plugins/golang/go/latest/meta.yaml > /tmp/workspace.yaml
|
||||||
|
|
||||||
export SIDECAR_IMAGE=$(cat /tmp/workspace.yaml | yq '.spec.containers[] | .image' -r)
|
export SIDECAR_IMAGE=$(cat /tmp/workspace.yaml | yq '.spec.containers[] | .image' -r)
|
||||||
if [[ "$SIDECAR_IMAGE" =~ ^quay.io* ]]; then
|
if [[ "$SIDECAR_IMAGE" =~ ^quay.io* ]]; then
|
||||||
|
|
@ -168,7 +168,7 @@ fi
|
||||||
|
|
||||||
# Obtain the golang image and push to internal Registry
|
# Obtain the golang image and push to internal Registry
|
||||||
IFS=$'\r\n' GLOBIGNORE='*' command eval 'DEVFILE_IMAGES=($(podman run --authfile=${XDG_RUNTIME_DIR}/containers/auth.json -it --rm \
|
IFS=$'\r\n' GLOBIGNORE='*' command eval 'DEVFILE_IMAGES=($(podman run --authfile=${XDG_RUNTIME_DIR}/containers/auth.json -it --rm \
|
||||||
--entrypoint cat ${INTERNAL_REGISTRY_URL}/eclipse/che-devfile-registry:nightly /var/www/html/devfiles/external_images.txt))'
|
--entrypoint cat ${INTERNAL_REGISTRY_URL}/eclipse/che-devfile-registry:next /var/www/html/devfiles/external_images.txt))'
|
||||||
|
|
||||||
for container in "${DEVFILE_IMAGES[@]}"
|
for container in "${DEVFILE_IMAGES[@]}"
|
||||||
do
|
do
|
||||||
|
|
@ -193,7 +193,7 @@ initDefaults
|
||||||
provisionOpenShiftOAuthUser
|
provisionOpenShiftOAuthUser
|
||||||
|
|
||||||
# Deploy Eclipse Che and retrieve golang devfile from devfile-registry
|
# Deploy Eclipse Che and retrieve golang devfile from devfile-registry
|
||||||
chectl server:deploy --telemetry=off --k8spodwaittimeout=1800000 --che-operator-cr-patch-yaml=/tmp/che-cr-patch.yaml --che-operator-image=${INTERNAL_REGISTRY_URL}/eclipse/che-operator:nightly --platform=openshift --installer=operator
|
chectl server:deploy --telemetry=off --k8spodwaittimeout=1800000 --che-operator-cr-patch-yaml=/tmp/che-cr-patch.yaml --che-operator-image=${INTERNAL_REGISTRY_URL}/eclipse/che-operator:next --platform=openshift --installer=operator
|
||||||
|
|
||||||
DEVFILEURL=$(oc get checluster/eclipse-che -n eclipse-che -o "jsonpath={.status.devfileRegistryURL}")
|
DEVFILEURL=$(oc get checluster/eclipse-che -n eclipse-che -o "jsonpath={.status.devfileRegistryURL}")
|
||||||
curl -sSLo- -vk "${DEVFILEURL}/devfiles/go/devfile.yaml" > /tmp/devfile.yaml
|
curl -sSLo- -vk "${DEVFILEURL}/devfiles/go/devfile.yaml" > /tmp/devfile.yaml
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ overrideDefaults() {
|
||||||
runTests() {
|
runTests() {
|
||||||
# Deploy Eclipse Che applying CR
|
# Deploy Eclipse Che applying CR
|
||||||
applyOlmCR
|
applyOlmCR
|
||||||
waitEclipseCheDeployed "nightly"
|
waitEclipseCheDeployed "next"
|
||||||
provisionOAuth
|
provisionOAuth
|
||||||
startNewWorkspace
|
startNewWorkspace
|
||||||
waitWorkspaceStart
|
waitWorkspaceStart
|
||||||
|
|
|
||||||
|
|
@ -37,9 +37,9 @@ runTests() {
|
||||||
provisionOAuth
|
provisionOAuth
|
||||||
createWorkspace
|
createWorkspace
|
||||||
|
|
||||||
# Update Eclipse Che to nightly and start workspace
|
# Update Eclipse Che to next and start workspace
|
||||||
chectl server:update --yes --templates="${TEMPLATES}" --che-operator-image=${OPERATOR_IMAGE}
|
chectl server:update --yes --templates="${TEMPLATES}" --che-operator-image=${OPERATOR_IMAGE}
|
||||||
waitEclipseCheDeployed "nightly"
|
waitEclipseCheDeployed "next"
|
||||||
startExistedWorkspace
|
startExistedWorkspace
|
||||||
waitWorkspaceStart
|
waitWorkspaceStart
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ overrideDefaults() {
|
||||||
runTests() {
|
runTests() {
|
||||||
# Deploy Eclipse Che applying CR
|
# Deploy Eclipse Che applying CR
|
||||||
applyOlmCR
|
applyOlmCR
|
||||||
waitEclipseCheDeployed "nightly"
|
waitEclipseCheDeployed "next"
|
||||||
provisionOAuth
|
provisionOAuth
|
||||||
startNewWorkspace
|
startNewWorkspace
|
||||||
waitWorkspaceStart
|
waitWorkspaceStart
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ spec:
|
||||||
containers:
|
containers:
|
||||||
# container containing the tests
|
# container containing the tests
|
||||||
- name: happy-path-test
|
- name: happy-path-test
|
||||||
image: quay.io/eclipse/che-e2e:nightly
|
image: quay.io/eclipse/che-e2e:next
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
env:
|
env:
|
||||||
- name: TEST_SUITE
|
- name: TEST_SUITE
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ che-operator Development Guide: https://github.com/eclipse-che/che-operator/#dev
|
||||||
|
|
||||||
|
|
||||||
### PR Checklist
|
### PR Checklist
|
||||||
|
|
||||||
[As the author of this Pull Request I made sure that:](https://github.com/eclipse/che/blob/master/CONTRIBUTING.md#pull-request-template-and-its-checklist)
|
[As the author of this Pull Request I made sure that:](https://github.com/eclipse/che/blob/master/CONTRIBUTING.md#pull-request-template-and-its-checklist)
|
||||||
|
|
||||||
- [ ] [The Eclipse Contributor Agreement is valid](https://github.com/eclipse/che/blob/master/CONTRIBUTING.md#the-eclipse-contributor-agreement-is-valid)
|
- [ ] [The Eclipse Contributor Agreement is valid](https://github.com/eclipse/che/blob/master/CONTRIBUTING.md#the-eclipse-contributor-agreement-is-valid)
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ runTest() {
|
||||||
createWorkspace
|
createWorkspace
|
||||||
|
|
||||||
updateEclipseChe ${OPERATOR_IMAGE} ${TEMPLATES}
|
updateEclipseChe ${OPERATOR_IMAGE} ${TEMPLATES}
|
||||||
waitEclipseCheDeployed "nightly"
|
waitEclipseCheDeployed "next"
|
||||||
|
|
||||||
startExistedWorkspace
|
startExistedWorkspace
|
||||||
waitWorkspaceStart
|
waitWorkspaceStart
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ runTest() {
|
||||||
createWorkspace
|
createWorkspace
|
||||||
|
|
||||||
updateEclipseChe ${OPERATOR_IMAGE} ${TEMPLATES}
|
updateEclipseChe ${OPERATOR_IMAGE} ${TEMPLATES}
|
||||||
waitEclipseCheDeployed "nightly"
|
waitEclipseCheDeployed "next"
|
||||||
|
|
||||||
startExistedWorkspace
|
startExistedWorkspace
|
||||||
waitWorkspaceStart
|
waitWorkspaceStart
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,45 @@
|
||||||
|
#
|
||||||
|
# Copyright (c) 2012-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
|
||||||
|
|
||||||
|
name: Build next images
|
||||||
|
|
||||||
|
on:
|
||||||
|
# manual trigger if required
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
reason:
|
||||||
|
description: 'Reason to trigger a build'
|
||||||
|
required: false
|
||||||
|
schedule:
|
||||||
|
- cron: '0 0 * * *'
|
||||||
|
jobs:
|
||||||
|
build-images:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
steps:
|
||||||
|
- name: Checkout source code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v1
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v1
|
||||||
|
- name: Login to quay.io
|
||||||
|
uses: docker/login-action@v1
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.QUAY_USERNAME }}
|
||||||
|
password: ${{ secrets.QUAY_PASSWORD }}
|
||||||
|
registry: quay.io
|
||||||
|
- name: Build and push images to quay.io
|
||||||
|
uses: docker/build-push-action@v2
|
||||||
|
with:
|
||||||
|
file: Dockerfile
|
||||||
|
platforms: linux/amd64,linux/ppc64le
|
||||||
|
push: true
|
||||||
|
tags: quay.io/eclipse/che-operator:next
|
||||||
|
|
@ -51,8 +51,8 @@ Where:
|
||||||
2. Run VSCode task `Build and push custom che-operator image` or use the terminal:
|
2. Run VSCode task `Build and push custom che-operator image` or use the terminal:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker build -t ${IMAGE_REGISTRY_HOST}/${IMAGE_REGISTRY_USER_NAME}/che-operator:nightly .
|
$ docker build -t ${IMAGE_REGISTRY_HOST}/${IMAGE_REGISTRY_USER_NAME}/che-operator:next .
|
||||||
$ docker push ${IMAGE_REGISTRY_HOST}/${IMAGE_REGISTRY_USER_NAME}/che-operator:nightly
|
$ docker push ${IMAGE_REGISTRY_HOST}/${IMAGE_REGISTRY_USER_NAME}/che-operator:next
|
||||||
```
|
```
|
||||||
|
|
||||||
## Deploy Che operator
|
## Deploy Che operator
|
||||||
|
|
@ -68,7 +68,7 @@ To deploy Che operator you can use [chectl](https://github.com/che-incubator/che
|
||||||
2. Deploy Eclipse Che on a running k8s cluster:
|
2. Deploy Eclipse Che on a running k8s cluster:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ chectl server:deploy --installer operator -p <PLATFORM> --che-operator-image=${IMAGE_REGISTRY_HOST}/${IMAGE_REGISTRY_USER_NAME}/che-operator:nightly
|
$ chectl server:deploy --installer operator -p <PLATFORM> --che-operator-image=${IMAGE_REGISTRY_HOST}/${IMAGE_REGISTRY_USER_NAME}/che-operator:next
|
||||||
```
|
```
|
||||||
|
|
||||||
Where:
|
Where:
|
||||||
|
|
@ -77,7 +77,7 @@ Where:
|
||||||
> INFO: if you have changed Che operator deployment, roles, cluster roles, CRD or CR then you must use `--templates` flag to point chectl to modified Che operator templates. Copy all files from the `deploy` folder of the che-operator project into a folder `<SOME_PATH>/templates/che-operator` and use it with chectl:
|
> INFO: if you have changed Che operator deployment, roles, cluster roles, CRD or CR then you must use `--templates` flag to point chectl to modified Che operator templates. Copy all files from the `deploy` folder of the che-operator project into a folder `<SOME_PATH>/templates/che-operator` and use it with chectl:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ chectl server:deploy --installer operator -p <PLATFORM> --che-operator-image=${IMAGE_REGISTRY_HOST}/${IMAGE_REGISTRY_USER_NAME}/che-operator:nightly --templates <SOME_PATH>/templates
|
$ chectl server:deploy --installer operator -p <PLATFORM> --che-operator-image=${IMAGE_REGISTRY_HOST}/${IMAGE_REGISTRY_USER_NAME}/che-operator:next --templates <SOME_PATH>/templates
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Deploy Che operator with chectl using `--installer olm` flag
|
#### Deploy Che operator with chectl using `--installer olm` flag
|
||||||
|
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
#
|
|
||||||
# Copyright (c) 2012-2019 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
|
|
||||||
#
|
|
||||||
|
|
||||||
# Output command before executing
|
|
||||||
set -x
|
|
||||||
|
|
||||||
# Exit on error
|
|
||||||
set -e
|
|
||||||
|
|
||||||
SCRIPT_DIR=$(cd "$(dirname "$0")"; pwd)
|
|
||||||
export SCRIPT_DIR
|
|
||||||
|
|
||||||
# shellcheck disable=SC1090
|
|
||||||
. "${SCRIPT_DIR}"/cico_functions.sh
|
|
||||||
|
|
||||||
load_jenkins_vars
|
|
||||||
install_deps
|
|
||||||
set_nightly_tag
|
|
||||||
build_and_push
|
|
||||||
|
|
@ -1,83 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
#
|
|
||||||
# Copyright (c) 2012-2019 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
|
|
||||||
#
|
|
||||||
|
|
||||||
# Output command before executing
|
|
||||||
set -x
|
|
||||||
|
|
||||||
# Exit on error
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# Source environment variables of the jenkins slave
|
|
||||||
# that might interest this worker.
|
|
||||||
function load_jenkins_vars() {
|
|
||||||
if [ -e "jenkins-env.json" ]; then
|
|
||||||
eval "$(./env-toolkit load -f jenkins-env.json \
|
|
||||||
DEVSHIFT_TAG_LEN \
|
|
||||||
QUAY_ECLIPSE_CHE_USERNAME \
|
|
||||||
QUAY_ECLIPSE_CHE_PASSWORD \
|
|
||||||
RH_CHE_AUTOMATION_DOCKERHUB_USERNAME \
|
|
||||||
RH_CHE_AUTOMATION_DOCKERHUB_PASSWORD \
|
|
||||||
JENKINS_URL \
|
|
||||||
GIT_BRANCH \
|
|
||||||
GIT_COMMIT \
|
|
||||||
BUILD_NUMBER \
|
|
||||||
ghprbSourceBranch \
|
|
||||||
ghprbActualCommit \
|
|
||||||
BUILD_URL \
|
|
||||||
ghprbPullId)"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
function install_deps() {
|
|
||||||
# We need to disable selinux for now, XXX
|
|
||||||
/usr/sbin/setenforce 0 || true
|
|
||||||
|
|
||||||
# Get all the deps in
|
|
||||||
yum install -y yum-utils device-mapper-persistent-data lvm2
|
|
||||||
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
|
|
||||||
yum install -y docker-ce \
|
|
||||||
git
|
|
||||||
|
|
||||||
service docker start
|
|
||||||
echo 'CICO: Dependencies installed'
|
|
||||||
}
|
|
||||||
|
|
||||||
function set_nightly_tag() {
|
|
||||||
# Let's set the tag as nightly
|
|
||||||
export TAG="nightly"
|
|
||||||
}
|
|
||||||
|
|
||||||
function tag_push() {
|
|
||||||
local TARGET=$1
|
|
||||||
docker tag "${IMAGE}" "$TARGET"
|
|
||||||
docker push "$TARGET"
|
|
||||||
}
|
|
||||||
|
|
||||||
function build_and_push() {
|
|
||||||
REGISTRY="quay.io"
|
|
||||||
ORGANIZATION="eclipse"
|
|
||||||
IMAGE="che-operator"
|
|
||||||
|
|
||||||
if [ -n "${QUAY_ECLIPSE_CHE_USERNAME}" ] && [ -n "${QUAY_ECLIPSE_CHE_PASSWORD}" ]; then
|
|
||||||
docker login -u "${QUAY_ECLIPSE_CHE_USERNAME}" -p "${QUAY_ECLIPSE_CHE_PASSWORD}" "${REGISTRY}"
|
|
||||||
else
|
|
||||||
echo "Could not login, missing credentials for pushing to the '${ORGANIZATION}' organization"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "${RH_CHE_AUTOMATION_DOCKERHUB_USERNAME}" ] && [ -n "${RH_CHE_AUTOMATION_DOCKERHUB_PASSWORD}" ]; then
|
|
||||||
docker login -u "${RH_CHE_AUTOMATION_DOCKERHUB_USERNAME}" -p "${RH_CHE_AUTOMATION_DOCKERHUB_PASSWORD}"
|
|
||||||
else
|
|
||||||
echo "Could not login, missing credentials for pushing to the docker.io"
|
|
||||||
fi
|
|
||||||
# Let's build and push images to 'quay.io'
|
|
||||||
docker build -t ${IMAGE} .
|
|
||||||
tag_push "${REGISTRY}/${ORGANIZATION}/${IMAGE}:${TAG}"
|
|
||||||
echo "CICO: '${TAG}' version of image pushed to '${REGISTRY}/${ORGANIZATION}' organization"
|
|
||||||
}
|
|
||||||
|
|
@ -75,14 +75,14 @@ metadata:
|
||||||
capabilities: Seamless Upgrades
|
capabilities: Seamless Upgrades
|
||||||
categories: Developer Tools
|
categories: Developer Tools
|
||||||
certified: "false"
|
certified: "false"
|
||||||
containerImage: quay.io/eclipse/che-operator:nightly
|
containerImage: quay.io/eclipse/che-operator:next
|
||||||
createdAt: "2021-06-24T13:43:23Z"
|
createdAt: "2021-06-29T12:30:28Z"
|
||||||
description: A Kube-native development solution that delivers portable and collaborative
|
description: A Kube-native development solution that delivers portable and collaborative
|
||||||
developer workspaces.
|
developer workspaces.
|
||||||
operatorframework.io/suggested-namespace: eclipse-che
|
operatorframework.io/suggested-namespace: eclipse-che
|
||||||
repository: https://github.com/eclipse-che/che-operator
|
repository: https://github.com/eclipse-che/che-operator
|
||||||
support: Eclipse Foundation
|
support: Eclipse Foundation
|
||||||
name: eclipse-che-preview-kubernetes.v7.33.0-240.nightly
|
name: eclipse-che-preview-kubernetes.v7.33.0-242.nightly
|
||||||
namespace: placeholder
|
namespace: placeholder
|
||||||
spec:
|
spec:
|
||||||
apiservicedefinitions: {}
|
apiservicedefinitions: {}
|
||||||
|
|
@ -910,15 +910,15 @@ spec:
|
||||||
- name: OPERATOR_NAME
|
- name: OPERATOR_NAME
|
||||||
value: che-operator
|
value: che-operator
|
||||||
- name: CHE_VERSION
|
- name: CHE_VERSION
|
||||||
value: nightly
|
value: next
|
||||||
- name: RELATED_IMAGE_che_server
|
- name: RELATED_IMAGE_che_server
|
||||||
value: quay.io/eclipse/che-server:nightly
|
value: quay.io/eclipse/che-server:next
|
||||||
- name: RELATED_IMAGE_dashboard
|
- name: RELATED_IMAGE_dashboard
|
||||||
value: quay.io/eclipse/che-dashboard:next
|
value: quay.io/eclipse/che-dashboard:next
|
||||||
- name: RELATED_IMAGE_plugin_registry
|
- name: RELATED_IMAGE_plugin_registry
|
||||||
value: quay.io/eclipse/che-plugin-registry:nightly
|
value: quay.io/eclipse/che-plugin-registry:next
|
||||||
- name: RELATED_IMAGE_devfile_registry
|
- name: RELATED_IMAGE_devfile_registry
|
||||||
value: quay.io/eclipse/che-devfile-registry:nightly
|
value: quay.io/eclipse/che-devfile-registry:next
|
||||||
- name: RELATED_IMAGE_che_tls_secrets_creation_job
|
- name: RELATED_IMAGE_che_tls_secrets_creation_job
|
||||||
value: quay.io/eclipse/che-tls-secret-creator:alpine-d1ed4ad
|
value: quay.io/eclipse/che-tls-secret-creator:alpine-d1ed4ad
|
||||||
- name: RELATED_IMAGE_pvc_jobs
|
- name: RELATED_IMAGE_pvc_jobs
|
||||||
|
|
@ -926,7 +926,7 @@ spec:
|
||||||
- name: RELATED_IMAGE_postgres
|
- name: RELATED_IMAGE_postgres
|
||||||
value: quay.io/eclipse/che--centos--postgresql-96-centos7:9.6-b681d78125361519180a6ac05242c296f8906c11eab7e207b5ca9a89b6344392
|
value: quay.io/eclipse/che--centos--postgresql-96-centos7:9.6-b681d78125361519180a6ac05242c296f8906c11eab7e207b5ca9a89b6344392
|
||||||
- name: RELATED_IMAGE_keycloak
|
- name: RELATED_IMAGE_keycloak
|
||||||
value: quay.io/eclipse/che-keycloak:nightly
|
value: quay.io/eclipse/che-keycloak:next
|
||||||
- name: RELATED_IMAGE_che_workspace_plugin_broker_metadata
|
- name: RELATED_IMAGE_che_workspace_plugin_broker_metadata
|
||||||
value: quay.io/eclipse/che-plugin-metadata-broker:v3.4.0
|
value: quay.io/eclipse/che-plugin-metadata-broker:v3.4.0
|
||||||
- name: RELATED_IMAGE_che_workspace_plugin_broker_artifacts
|
- name: RELATED_IMAGE_che_workspace_plugin_broker_artifacts
|
||||||
|
|
@ -961,7 +961,7 @@ spec:
|
||||||
value: che-postgres-secret
|
value: che-postgres-secret
|
||||||
- name: CHE_SERVER_TRUST_STORE_CONFIGMAP_NAME
|
- name: CHE_SERVER_TRUST_STORE_CONFIGMAP_NAME
|
||||||
value: ca-certs
|
value: ca-certs
|
||||||
image: quay.io/eclipse/che-operator:nightly
|
image: quay.io/eclipse/che-operator:next
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
failureThreshold: 10
|
failureThreshold: 10
|
||||||
|
|
@ -1144,4 +1144,4 @@ spec:
|
||||||
maturity: stable
|
maturity: stable
|
||||||
provider:
|
provider:
|
||||||
name: Eclipse Foundation
|
name: Eclipse Foundation
|
||||||
version: 7.33.0-240.nightly
|
version: 7.33.0-242.nightly
|
||||||
|
|
|
||||||
|
|
@ -66,14 +66,14 @@ metadata:
|
||||||
capabilities: Seamless Upgrades
|
capabilities: Seamless Upgrades
|
||||||
categories: Developer Tools, OpenShift Optional
|
categories: Developer Tools, OpenShift Optional
|
||||||
certified: "false"
|
certified: "false"
|
||||||
containerImage: quay.io/eclipse/che-operator:nightly
|
containerImage: quay.io/eclipse/che-operator:next
|
||||||
createdAt: "2021-06-24T13:43:34Z"
|
createdAt: "2021-06-29T12:30:36Z"
|
||||||
description: A Kube-native development solution that delivers portable and collaborative
|
description: A Kube-native development solution that delivers portable and collaborative
|
||||||
developer workspaces in OpenShift.
|
developer workspaces in OpenShift.
|
||||||
operatorframework.io/suggested-namespace: eclipse-che
|
operatorframework.io/suggested-namespace: eclipse-che
|
||||||
repository: https://github.com/eclipse-che/che-operator
|
repository: https://github.com/eclipse-che/che-operator
|
||||||
support: Eclipse Foundation
|
support: Eclipse Foundation
|
||||||
name: eclipse-che-preview-openshift.v7.33.0-240.nightly
|
name: eclipse-che-preview-openshift.v7.33.0-242.nightly
|
||||||
namespace: placeholder
|
namespace: placeholder
|
||||||
spec:
|
spec:
|
||||||
apiservicedefinitions: {}
|
apiservicedefinitions: {}
|
||||||
|
|
@ -979,21 +979,21 @@ spec:
|
||||||
- name: OPERATOR_NAME
|
- name: OPERATOR_NAME
|
||||||
value: che-operator
|
value: che-operator
|
||||||
- name: CHE_VERSION
|
- name: CHE_VERSION
|
||||||
value: nightly
|
value: next
|
||||||
- name: RELATED_IMAGE_che_server
|
- name: RELATED_IMAGE_che_server
|
||||||
value: quay.io/eclipse/che-server:nightly
|
value: quay.io/eclipse/che-server:next
|
||||||
- name: RELATED_IMAGE_dashboard
|
- name: RELATED_IMAGE_dashboard
|
||||||
value: quay.io/eclipse/che-dashboard:next
|
value: quay.io/eclipse/che-dashboard:next
|
||||||
- name: RELATED_IMAGE_plugin_registry
|
- name: RELATED_IMAGE_plugin_registry
|
||||||
value: quay.io/eclipse/che-plugin-registry:nightly
|
value: quay.io/eclipse/che-plugin-registry:next
|
||||||
- name: RELATED_IMAGE_devfile_registry
|
- name: RELATED_IMAGE_devfile_registry
|
||||||
value: quay.io/eclipse/che-devfile-registry:nightly
|
value: quay.io/eclipse/che-devfile-registry:next
|
||||||
- name: RELATED_IMAGE_pvc_jobs
|
- name: RELATED_IMAGE_pvc_jobs
|
||||||
value: registry.access.redhat.com/ubi8-minimal:8.4-200.1622548483
|
value: registry.access.redhat.com/ubi8-minimal:8.4-200.1622548483
|
||||||
- name: RELATED_IMAGE_postgres
|
- name: RELATED_IMAGE_postgres
|
||||||
value: quay.io/eclipse/che--centos--postgresql-96-centos7:9.6-b681d78125361519180a6ac05242c296f8906c11eab7e207b5ca9a89b6344392
|
value: quay.io/eclipse/che--centos--postgresql-96-centos7:9.6-b681d78125361519180a6ac05242c296f8906c11eab7e207b5ca9a89b6344392
|
||||||
- name: RELATED_IMAGE_keycloak
|
- name: RELATED_IMAGE_keycloak
|
||||||
value: quay.io/eclipse/che-keycloak:nightly
|
value: quay.io/eclipse/che-keycloak:next
|
||||||
- name: RELATED_IMAGE_che_workspace_plugin_broker_metadata
|
- name: RELATED_IMAGE_che_workspace_plugin_broker_metadata
|
||||||
value: quay.io/eclipse/che-plugin-metadata-broker:v3.4.0
|
value: quay.io/eclipse/che-plugin-metadata-broker:v3.4.0
|
||||||
- name: RELATED_IMAGE_che_workspace_plugin_broker_artifacts
|
- name: RELATED_IMAGE_che_workspace_plugin_broker_artifacts
|
||||||
|
|
@ -1028,7 +1028,7 @@ spec:
|
||||||
value: che-postgres-secret
|
value: che-postgres-secret
|
||||||
- name: CHE_SERVER_TRUST_STORE_CONFIGMAP_NAME
|
- name: CHE_SERVER_TRUST_STORE_CONFIGMAP_NAME
|
||||||
value: ca-certs
|
value: ca-certs
|
||||||
image: quay.io/eclipse/che-operator:nightly
|
image: quay.io/eclipse/che-operator:next
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
failureThreshold: 10
|
failureThreshold: 10
|
||||||
|
|
@ -1219,4 +1219,4 @@ spec:
|
||||||
maturity: stable
|
maturity: stable
|
||||||
provider:
|
provider:
|
||||||
name: Eclipse Foundation
|
name: Eclipse Foundation
|
||||||
version: 7.33.0-240.nightly
|
version: 7.33.0-242.nightly
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ spec:
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: che-operator
|
- name: che-operator
|
||||||
image: quay.io/eclipse/che-operator:nightly
|
image: quay.io/eclipse/che-operator:next
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 60000
|
- containerPort: 60000
|
||||||
name: metrics
|
name: metrics
|
||||||
|
|
@ -48,15 +48,15 @@ spec:
|
||||||
- name: OPERATOR_NAME
|
- name: OPERATOR_NAME
|
||||||
value: che-operator
|
value: che-operator
|
||||||
- name: CHE_VERSION
|
- name: CHE_VERSION
|
||||||
value: nightly
|
value: next
|
||||||
- name: RELATED_IMAGE_che_server
|
- name: RELATED_IMAGE_che_server
|
||||||
value: quay.io/eclipse/che-server:nightly
|
value: quay.io/eclipse/che-server:next
|
||||||
- name: RELATED_IMAGE_dashboard
|
- name: RELATED_IMAGE_dashboard
|
||||||
value: quay.io/eclipse/che-dashboard:next
|
value: quay.io/eclipse/che-dashboard:next
|
||||||
- name: RELATED_IMAGE_plugin_registry
|
- name: RELATED_IMAGE_plugin_registry
|
||||||
value: quay.io/eclipse/che-plugin-registry:nightly
|
value: quay.io/eclipse/che-plugin-registry:next
|
||||||
- name: RELATED_IMAGE_devfile_registry
|
- name: RELATED_IMAGE_devfile_registry
|
||||||
value: quay.io/eclipse/che-devfile-registry:nightly
|
value: quay.io/eclipse/che-devfile-registry:next
|
||||||
- name: RELATED_IMAGE_che_tls_secrets_creation_job
|
- name: RELATED_IMAGE_che_tls_secrets_creation_job
|
||||||
value: quay.io/eclipse/che-tls-secret-creator:alpine-d1ed4ad
|
value: quay.io/eclipse/che-tls-secret-creator:alpine-d1ed4ad
|
||||||
- name: RELATED_IMAGE_pvc_jobs
|
- name: RELATED_IMAGE_pvc_jobs
|
||||||
|
|
@ -64,7 +64,7 @@ spec:
|
||||||
- name: RELATED_IMAGE_postgres
|
- name: RELATED_IMAGE_postgres
|
||||||
value: quay.io/eclipse/che--centos--postgresql-96-centos7:9.6-b681d78125361519180a6ac05242c296f8906c11eab7e207b5ca9a89b6344392
|
value: quay.io/eclipse/che--centos--postgresql-96-centos7:9.6-b681d78125361519180a6ac05242c296f8906c11eab7e207b5ca9a89b6344392
|
||||||
- name: RELATED_IMAGE_keycloak
|
- name: RELATED_IMAGE_keycloak
|
||||||
value: quay.io/eclipse/che-keycloak:nightly
|
value: quay.io/eclipse/che-keycloak:next
|
||||||
- name: RELATED_IMAGE_che_workspace_plugin_broker_metadata
|
- name: RELATED_IMAGE_che_workspace_plugin_broker_metadata
|
||||||
value: quay.io/eclipse/che-plugin-metadata-broker:v3.4.0
|
value: quay.io/eclipse/che-plugin-metadata-broker:v3.4.0
|
||||||
- name: RELATED_IMAGE_che_workspace_plugin_broker_artifacts
|
- name: RELATED_IMAGE_che_workspace_plugin_broker_artifacts
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ set -ex
|
||||||
|
|
||||||
usage () {
|
usage () {
|
||||||
echo "Usage: $0 -p [platform] -c [channel] -i [from-index-image(optional)] -f [force-build-and-push(optional)]"
|
echo "Usage: $0 -p [platform] -c [channel] -i [from-index-image(optional)] -f [force-build-and-push(optional)]"
|
||||||
echo "Example: $0 -p openshift -c nightly -i quay.io/eclipse/eclipse-che-openshift-opm-catalog:preview -f true"
|
echo "Example: $0 -p openshift -c next -i quay.io/eclipse/eclipse-che-openshift-opm-catalog:preview -f true"
|
||||||
}
|
}
|
||||||
|
|
||||||
if [[ $# -lt 1 ]]; then usage; exit; fi
|
if [[ $# -lt 1 ]]; then usage; exit; fi
|
||||||
|
|
|
||||||
|
|
@ -3,3 +3,4 @@ quay.io/eclipse/che-theia-dev:next
|
||||||
quay.io/eclipse/che-theia-endpoint-runtime-binary:next
|
quay.io/eclipse/che-theia-endpoint-runtime-binary:next
|
||||||
quay.io/eclipse/che-sidecar-workspace-data-sync:latest
|
quay.io/eclipse/che-sidecar-workspace-data-sync:latest
|
||||||
quay.io/eclipse/che-machine-exec:nightly
|
quay.io/eclipse/che-machine-exec:nightly
|
||||||
|
quay.io/eclipse/che-machine-exec:next
|
||||||
Loading…
Reference in New Issue