diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index bee957031..711e1c2bc 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,2 +1,2 @@ # Global Owners -* @vparfonov @l0rd @rhopp @skabashnyuk @amisevsk @nickboldt +* @vparfonov @l0rd @rhopp @skabashnyuk @amisevsk @nickboldt @ibuziuk diff --git a/README.md b/README.md index d71ab3974..3f813dc24 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,10 @@ This repository holds ready-to-use Devfiles for different languages and technolo Execute ```shell -docker build --no-cache -t quay.io/eclipse/che-devfile-registry:nightly . +docker build --no-cache -t quay.io/eclipse/che-devfile-registry:nightly --target registry . + +# or to use & create a RHEL-based image +docker build --no-cache -t quay.io/eclipse/che-devfile-registry:nightly -f build/dockerfiles/rhel.Dockerfile --target registry. ``` Where `--no-cache` is needed to prevent usage of cached layers with devfile registry files. Useful when you change devfile files and rebuild the image. @@ -21,6 +24,14 @@ Though you may also just provide the image to the older versions of Docker (ex. `quay.io/eclipse/che-devfile-registry:nightly` image would be rebuilt after each commit in master. +### Offline registry + +The default docker build has multiple targets: +- `--target registry` is used to build the default devfile registry, where projects in devfiles refer to publically hosted git repos +- `--target offline-registry` is used to build a devfile registry which self-hosts projects as zip files. + +The offline registry build will, during the docker build, pull zips from all projects hosted on github and store them in the `/resources` path. This registry should be deployed with environment variable `CHE_DEVFILE_REGISTRY_URL` set to the URL of the route/endpoint that exposes the devfile registry, as devfiles need to be rewritten to point to internally hosted zip files. + ## OpenShift You can deploy Che devfile registry on Openshift with command. ``` diff --git a/VERSION b/VERSION index 9e3f794c9..08bfd0643 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -7.3.0-SNAPSHOT +7.5.0-SNAPSHOT diff --git a/arbitrary-users-patch/base_images b/arbitrary-users-patch/base_images index 553fca9cc..9e26d0c03 100644 --- a/arbitrary-users-patch/base_images +++ b/arbitrary-users-patch/base_images @@ -1,6 +1,5 @@ che-cpp-rhel7 registry.access.redhat.com/devtools/llvm-toolset-rhel7 che-dotnet-2.2 mcr.microsoft.com/dotnet/core/sdk:2.2-stretch -che-golang-1.10 golang:1.10.7-stretch che-golang-1.12 golang:1.12-stretch che-java11-gradle gradle:5.2.1-jdk11 che-java11-maven maven:3.6.0-jdk-11 diff --git a/arbitrary-users-patch/happy-path/Dockerfile b/arbitrary-users-patch/happy-path/Dockerfile new file mode 100644 index 000000000..2daba5abe --- /dev/null +++ b/arbitrary-users-patch/happy-path/Dockerfile @@ -0,0 +1,15 @@ +ARG TAG +FROM quay.io/eclipse/che-java11-maven:${TAG} + +USER root + +RUN cd / && \ + git clone /~https://github.com/spring-projects/spring-petclinic && \ + cd /spring-petclinic && \ + mvn clean package && \ + mkdir -p /home/user/.m2/repository && \ + cp -r /root/.m2/repository/* /home/user/.m2/repository && \ + rm -rf spring-petclinic/ /root/.m2/repository/* && \ + chmod -R g=u /home/user + +USER 10001 diff --git a/arbitrary-users-patch/happy-path/build_happy_path_image.sh b/arbitrary-users-patch/happy-path/build_happy_path_image.sh new file mode 100755 index 000000000..773469b17 --- /dev/null +++ b/arbitrary-users-patch/happy-path/build_happy_path_image.sh @@ -0,0 +1,35 @@ +#!/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 +# + +set -e + +SCRIPT_DIR=$(cd "$(dirname "$0")"; pwd) + +DEFAULT_REGISTRY="quay.io" +DEFAULT_ORGANIZATION="eclipse" +DEFAULT_TAG="nightly" + +REGISTRY=${REGISTRY:-${DEFAULT_REGISTRY}} +ORGANIZATION=${ORGANIZATION:-${DEFAULT_ORGANIZATION}} +TAG=${TAG:-${DEFAULT_TAG}} + +NAME_FORMAT="${REGISTRY}/${ORGANIZATION}" + +PUSH_IMAGES=false +if [ "$1" == "--push" ]; then + PUSH_IMAGES=true +fi + +# Build image for happy-path tests with precashed mvn dependencies +docker build -t "${NAME_FORMAT}/happy-path:${TAG}" --no-cache --build-arg TAG="${TAG}" "${SCRIPT_DIR}"/ +if ${PUSH_IMAGES}; then + echo "Pushing ${NAME_FORMAT}/happy-path:${TAG}" to remote registry + docker push "${NAME_FORMAT}/happy-path:${TAG}" +fi diff --git a/build.sh b/build.sh index 0cf686eaf..3ad37c778 100755 --- a/build.sh +++ b/build.sh @@ -1,26 +1,85 @@ -#!/bin/sh +#!/bin/bash # -# Copyright (c) 2012-2018 Red Hat, Inc. +# Copyright (c) 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 # -# Build Che devfile registry image. Note that this script will read the version -# in ./VERSION; if it is *-SNAPSHOT, devfiles in the registry will use nightly-tagged -# images with the arbitrary user IDs patch. If ./VERSION contains otherwise, -# the devfiles in the registry will instead use the value in ./VERSION. -# +set -e + +REGISTRY="quay.io" +ORGANIZATION="eclipse" +TAG="nightly" +TARGET="registry" +DOCKERFILE="./build/dockerfiles/Dockerfile" + +USAGE=" +Usage: ./build.sh [OPTIONS] +Options: + --help + Print this message. + --tag, -t [TAG] + Docker image tag to be used for image; default: 'nightly' + --registry, -r [REGISTRY] + Docker registry to be used for image; default 'quay.io' + --organization, -o [ORGANIZATION] + Docker image organization to be used for image; default: 'eclipse' + --offline + Build offline version of registry, with all sample projects + cached in the registry; disabled by default. + --rhel + Build registry using UBI images instead of default +" + +function print_usage() { + echo -e "$USAGE" +} + +function parse_arguments() { + while [[ $# -gt 0 ]]; do + key="$1" + case $key in + -t|--tag) + TAG="$2" + shift; shift; + ;; + -r|--registry) + REGISTRY="$2" + shift; shift; + ;; + -o|--organization) + ORGANIZATION="$2" + shift; shift; + ;; + --offline) + TARGET="offline-registry" + shift + ;; + --rhel) + DOCKERFILE="./build/dockerfiles/rhel.Dockerfile" + shift + ;; + *) + print_usage + exit 0 + esac + done +} + +parse_arguments "$@" + +IMAGE="${REGISTRY}/${ORGANIZATION}/che-devfile-registry:${TAG}" VERSION=$(head -n 1 VERSION) case $VERSION in *SNAPSHOT) echo "Snapshot version (${VERSION}) specified in $(find . -name VERSION): building nightly plugin registry." - docker build -t "quay.io/eclipse/che-devfile-registry:nightly" -f ./build/dockerfiles/Dockerfile . + docker build -t "${IMAGE}" -f ${DOCKERFILE} --target ${TARGET} . ;; *) echo "Release version specified in $(find . -name VERSION): Building plugin registry for release ${VERSION}." - docker build -t "quay.io/eclipse/che-devfile-registry:${VERSION}" -f ./build/dockerfiles/Dockerfile . --build-arg "PATCHED_IMAGES_TAG=${VERSION}" + docker build -t "${IMAGE}" -f ${DOCKERFILE} --target ${TARGET} --build-arg "PATCHED_IMAGES_TAG=${VERSION}" . ;; esac diff --git a/build/dockerfiles/Dockerfile b/build/dockerfiles/Dockerfile index b2c6854d1..5a4c26f99 100644 --- a/build/dockerfiles/Dockerfile +++ b/build/dockerfiles/Dockerfile @@ -7,7 +7,7 @@ # SPDX-License-Identifier: EPL-2.0 # FROM alpine:3.10 AS builder -RUN apk add --no-cache py-pip jq bash && pip install yq +RUN apk add --no-cache py-pip jq bash wget git && pip install yq # Registry, organization, and tag to use for base images in dockerfiles. Devfiles # will be rewritten during build to use these values for base images. @@ -16,7 +16,7 @@ ARG PATCHED_IMAGES_ORG="eclipse" ARG PATCHED_IMAGES_TAG="nightly" COPY ./build/scripts ./arbitrary-users-patch/base_images /build/ -COPY /devfiles /build/devfiles +COPY ./devfiles /build/devfiles WORKDIR /build/ RUN TAG=${PATCHED_IMAGES_TAG} \ ORGANIZATION=${PATCHED_IMAGES_ORG} \ @@ -24,10 +24,25 @@ RUN TAG=${PATCHED_IMAGES_TAG} \ ./update_devfile_patched_image_tags.sh RUN ./check_mandatory_fields.sh devfiles RUN ./index.sh > /build/devfiles/index.json +RUN ./list_referenced_images.sh devfiles > /build/devfiles/external_images.txt +RUN chmod -R g+rwX /build/devfiles -FROM registry.centos.org/centos/httpd-24-centos7 +FROM registry.centos.org/centos/httpd-24-centos7 AS registry RUN mkdir /var/www/html/devfiles COPY .htaccess README.md /var/www/html/ COPY --from=builder /build/devfiles /var/www/html/devfiles -USER 0 -RUN chmod -R g+rwX /var/www/html/devfiles +COPY ./build/dockerfiles/entrypoint.sh /usr/bin/ +ENTRYPOINT ["/usr/bin/entrypoint.sh"] +CMD ["/usr/bin/run-httpd"] + + +# Offline registry: download project zips and place them in /build/resources +FROM builder AS offline-builder +RUN ./cache_projects.sh devfiles resources && \ + ./cache_images.sh devfiles resources && \ + chmod -R g+rwX /build + +# Offline registry: copy updated devfile.yamls and cached projects +FROM registry AS offline-registry +COPY --from=offline-builder /build/devfiles /var/www/html/devfiles +COPY --from=offline-builder /build/resources /var/www/html/resources diff --git a/build/dockerfiles/Dockerfile.rhel b/build/dockerfiles/Dockerfile.rhel deleted file mode 100644 index b78e9c618..000000000 --- a/build/dockerfiles/Dockerfile.rhel +++ /dev/null @@ -1,49 +0,0 @@ -# -# Copyright (c) 2018-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 -# -FROM alpine:3.10 AS builder -RUN apk add --no-cache py-pip jq bash && pip install yq - -# Registry, organization, and tag to use for base images in dockerfiles. Devfiles -# will be rewritten during build to use these values for base images. -ARG PATCHED_IMAGES_REG="quay.io" -ARG PATCHED_IMAGES_ORG="eclipse" -ARG PATCHED_IMAGES_TAG="nightly" - -COPY ./build/scripts ./arbitrary-users-patch/base_images /build/ -COPY /devfiles /build/devfiles -WORKDIR /build/ -RUN TAG=${PATCHED_IMAGES_TAG} \ - ORGANIZATION=${PATCHED_IMAGES_ORG} \ - REGISTRY=${PATCHED_IMAGES_REG} \ - ./update_devfile_patched_image_tags.sh -RUN ./check_mandatory_fields.sh devfiles -RUN ./index.sh > /build/devfiles/index.json - -FROM quay.io/openshiftio/rhel-base-httpd:latest - -RUN sed -i -e "s,Listen 80,Listen 8080," /etc/httpd/conf/httpd.conf -RUN sed -i -e "s,logs/error_log,/dev/stderr," /etc/httpd/conf/httpd.conf -RUN sed -i -e "s,logs/access_log,/dev/stdout," /etc/httpd/conf/httpd.conf -RUN sed -i -e "s,AllowOverride None,AllowOverride All," /etc/httpd/conf/httpd.conf - -EXPOSE 80 - -# the htpasswd file may be periodically replaced during run -RUN chmod a+rwX /etc/httpd/conf -RUN chmod a+rwX /run/httpd - -RUN mkdir /var/www/html/devfiles -COPY .htaccess README.md /var/www/html/ -COPY --from=builder /build/devfiles /var/www/html/devfiles -USER 0 -RUN chmod -R g+rwX /var/www/html/devfiles - -STOPSIGNAL SIGWINCH - -ENTRYPOINT ["/usr/sbin/httpd", "-D", "FOREGROUND"] diff --git a/build/dockerfiles/content_sets_epel7.repo b/build/dockerfiles/content_sets_epel7.repo new file mode 100644 index 000000000..3ffb6a001 --- /dev/null +++ b/build/dockerfiles/content_sets_epel7.repo @@ -0,0 +1,5 @@ +[epel-7] +name=epel-7 +baseurl=https://download.fedoraproject.org/pub/epel/7/x86_64/ +enabled=1 +gpgcheck=0 diff --git a/build/dockerfiles/entrypoint.sh b/build/dockerfiles/entrypoint.sh new file mode 100755 index 000000000..7c36ddaf7 --- /dev/null +++ b/build/dockerfiles/entrypoint.sh @@ -0,0 +1,87 @@ +#!/bin/bash +# +# Copyright (c) 2012-2018 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 +# +# Updates plugin runner images to point a registry defined by environment +# variables +# CHE_DEVFILE_IMAGES_REGISTRY_URL +# CHE_DEVFILE_IMAGES_REGISTRY_ORGANIZATION +# CHE_DEVFILE_IMAGES_REGISTRY_TAG +# +# By default, this script will operate on the `/var/www/html/devfiles` directory. +# This can be overridden by the environment variable $DEVFILES_DIR +# +# In addition, this script will perform the necessary set up for the offline +# devfile registry, replacing placeholders in all devfiles based off environment +# variable +# CHE_DEVFILE_REGISTRY_URL +# which should be set to the public endpoint for this registry. +# +# Will execute any arguments on completion (`exec $@`) + +set -e + +REGISTRY=${CHE_DEVFILE_IMAGES_REGISTRY_URL} +ORGANIZATION=${CHE_DEVFILE_IMAGES_REGISTRY_ORGANIZATION} +TAG=${CHE_DEVFILE_IMAGES_REGISTRY_TAG} +PUBLIC_URL=${CHE_DEVFILE_REGISTRY_URL} + +DEFAULT_DEVFILES_DIR="/var/www/html/devfiles" +DEVFILES_DIR="${DEVFILES_DIR:-${DEFAULT_DEVFILES_DIR}}" +INDEX_JSON="${DEVFILES_DIR}/index.json" + +# Regex used to break an image reference into groups: +# \1 - Whitespace and (optional) quotation preceding image reference +# \2 - Registry portion of image, e.g. (quay.io)/eclipse/che-theia:tag +# \3 - Organization portion of image, e.g. quay.io/(eclipse)/che-theia:tag +# \4 - Image name portion of image, e.g. quay.io/eclipse/(che-theia):tag +# \5 - Tag of image, e.g. quay.io/eclipse/che-theia:(tag) +# \6 - Optional quotation following image reference +IMAGE_REGEX='([[:space:]]*"?)([._:a-zA-Z0-9-]*)/([._a-zA-Z0-9-]*)/([._a-zA-Z0-9-]*):([._a-zA-Z0-9-]*)("?)' + +# We can't use the `-d` option for readarray because +# registry.centos.org/centos/httpd-24-centos7 ships with Bash 4.2 +# The below command will fail if any path contains whitespace +readarray -t devfiles < <(find "${DEVFILES_DIR}" -name 'devfile.yaml') +readarray -t metas < <(find "${DEVFILES_DIR}" -name 'meta.yaml') +for devfile in "${devfiles[@]}"; do + echo "Checking devfile $devfile" + # Need to update each field separately in case they are not defined. + # Defaults don't work because registry and tags may be different. + if [ -n "$REGISTRY" ]; then + echo " Updating image registry to $REGISTRY" + sed -i -E "s|image:$IMAGE_REGEX|image:\1${REGISTRY}/\3/\4:\5\6|" "$devfile" + fi + if [ -n "$ORGANIZATION" ]; then + echo " Updating image organization to $ORGANIZATION" + sed -i -E "s|image:$IMAGE_REGEX|image:\1\2/${ORGANIZATION}/\4:\5\6|" "$devfile" + fi + if [ -n "$TAG" ]; then + echo " Updating image tag to $TAG" + sed -i -E "s|image:$IMAGE_REGEX|image:\1\2/\3/\4:${TAG}\6|" "$devfile" + fi +done + +if [ -n "$PUBLIC_URL" ]; then + echo "Updating devfiles to point at internal project zip files" + PUBLIC_URL=${PUBLIC_URL%/} + sed -i "s|{{ DEVFILE_REGISTRY_URL }}|${PUBLIC_URL}|" "${devfiles[@]}" "${metas[@]}" "$INDEX_JSON" +else + if grep -q '{{ DEVFILE_REGISTRY_URL }}' "${devfiles[@]}"; then + echo "WARNING: environment variable 'CHE_DEVFILE_REGISTRY_URL' not configured" \ + "for an offline build of this registry. This may cause issues with importing" \ + "projects in a workspace." + # Experimental workaround -- detect service IP for che-devfile-registry + # Depends on service used being named 'che-devfile-registry' and only works + # within the cluster (i.e. browser-side retrieval won't work) + URL="http://${CHE_DEVFILE_REGISTRY_SERVICE_HOST}:${CHE_DEVFILE_REGISTRY_SERVICE_PORT}" + sed -i "s|{{ DEVFILE_REGISTRY_URL }}|${URL}|" "${devfiles[@]}" "${metas[@]}" "$INDEX_JSON" + fi +fi + +exec "${@}" diff --git a/build/dockerfiles/rhel.Dockerfile b/build/dockerfiles/rhel.Dockerfile new file mode 100644 index 000000000..6c447c6b3 --- /dev/null +++ b/build/dockerfiles/rhel.Dockerfile @@ -0,0 +1,109 @@ +# +# Copyright (c) 2018-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 +# +# Contributors: +# Red Hat, Inc. - initial API and implementation +# + +# Builder: check meta.yamls and create index.json +# https://access.redhat.com/containers/?tab=tags#/registry.access.redhat.com/ubi8-minimal +FROM registry.access.redhat.com/ubi8-minimal:8.1-279 as builder +USER 0 + +################# +# PHASE ONE: create ubi8-minimal image with yq +################# + +ARG BOOTSTRAP=false +ENV BOOTSTRAP=${BOOTSTRAP} +ARG LATEST_ONLY=false +ENV LATEST_ONLY=${LATEST_ONLY} + +# to get all the python deps pre-fetched so we can build in Brew: +# 1. extract files in the container to your local filesystem +# find v3 -type f -exec dos2unix {} \; +# CONTAINERNAME="devfileregistrybuilder" && docker build -t ${CONTAINERNAME} . --target=builder --no-cache --squash --build-arg BOOTSTRAP=true +# mkdir -p /tmp/root-local/ && docker run -it -v /tmp/root-local/:/tmp/root-local/ ${CONTAINERNAME} /bin/bash -c "cd /root/.local/ && cp -r bin/ lib/ /tmp/root-local/" +# pushd /tmp/root-local >/dev/null && sudo tar czf root-local.tgz lib/ bin/ && popd >/dev/null && mv -f /tmp/root-local/root-local.tgz . && sudo rm -fr /tmp/root-local/ + +# 2. then add it to dist-git so it's part of this repo +# rhpkg new-sources root-local.tgz + +# built in Brew, use tarball in lookaside cache; built locally, comment this out +# COPY root-local.tgz /tmp/root-local.tgz + +# NOTE: uncomment for local build. Must also set full registry path in FROM to registry.redhat.io or registry.access.redhat.com +# enable rhel 7 or 8 content sets (from Brew) to resolve jq as rpm +COPY ./build/dockerfiles/content_sets_epel7.repo /etc/yum.repos.d/ + +COPY ./build/dockerfiles/rhel.install.sh /tmp +RUN /tmp/rhel.install.sh && rm -f /tmp/rhel.install.sh + +# Registry, organization, and tag to use for base images in dockerfiles. Devfiles +# will be rewritten during build to use these values for base images. +ARG PATCHED_IMAGES_REG="quay.io" +ARG PATCHED_IMAGES_ORG="eclipse" +ARG PATCHED_IMAGES_TAG="nightly" + +COPY ./build/scripts ./arbitrary-users-patch/base_images /build/ +COPY ./devfiles /build/devfiles +WORKDIR /build/ +RUN TAG=${PATCHED_IMAGES_TAG} \ + ORGANIZATION=${PATCHED_IMAGES_ORG} \ + REGISTRY=${PATCHED_IMAGES_REG} \ + ./update_devfile_patched_image_tags.sh +RUN ./check_mandatory_fields.sh devfiles +RUN ./index.sh > /build/devfiles/index.json +RUN ./list_referenced_images.sh devfiles > /build/devfiles/external_images.txt +RUN chmod -R g+rwX /build/devfiles + +################# +# PHASE TWO: configure registry image +################# + +# Build registry, copying meta.yamls and index.json from builder +# UPSTREAM: use RHEL7/RHSCL/httpd image so we're not required to authenticate with registry.redhat.io +# https://access.redhat.com/containers/?tab=tags#/registry.access.redhat.com/rhscl/httpd-24-rhel7 +FROM registry.access.redhat.com/rhscl/httpd-24-rhel7:2.4-105 AS registry + +# DOWNSTREAM: use RHEL8/httpd +# https://access.redhat.com/containers/?tab=tags#/registry.access.redhat.com/rhel8/httpd-24 +# FROM registry.redhat.io/rhel8/httpd-24:1-63 AS registry +USER 0 + +# BEGIN these steps might not be required +RUN sed -i /etc/httpd/conf/httpd.conf \ + -e "s,Listen 80,Listen 8080," \ + -e "s,logs/error_log,/dev/stderr," \ + -e "s,logs/access_log,/dev/stdout," \ + -e "s,AllowOverride None,AllowOverride All," && \ + chmod a+rwX /etc/httpd/conf /run/httpd /etc/httpd/logs/ +STOPSIGNAL SIGWINCH +# END these steps might not be required + +WORKDIR /var/www/html + +RUN mkdir /var/www/html/devfiles +COPY .htaccess README.md /var/www/html/ +COPY --from=builder /build/devfiles /var/www/html/devfiles +COPY ./build/dockerfiles/rhel.entrypoint.sh ./build/dockerfiles/entrypoint.sh /usr/local/bin/ +RUN chmod g+rwX /usr/local/bin/entrypoint.sh /usr/local/bin/rhel.entrypoint.sh +ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] +CMD ["/usr/local/bin/rhel.entrypoint.sh"] + +# Offline devfile registry build +FROM builder AS offline-builder +RUN ./cache_projects.sh devfiles resources && \ + ./cache_images.sh devfiles resources && \ + chmod -R g+rwX /build + +FROM registry AS offline-registry +COPY --from=offline-builder /build/devfiles /var/www/html/devfiles +COPY --from=offline-builder /build/resources /var/www/html/resources + +# append Brew metadata here diff --git a/build/dockerfiles/rhel.entrypoint.sh b/build/dockerfiles/rhel.entrypoint.sh new file mode 100755 index 000000000..ce2eb531e --- /dev/null +++ b/build/dockerfiles/rhel.entrypoint.sh @@ -0,0 +1,24 @@ +#!/bin/bash +# +# Copyright (c) 2012-2018 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 +# + +if ! whoami &> /dev/null; then + if [ -w /etc/passwd ]; then + echo "${USER_NAME:-jboss}:x:$(id -u):0:${USER_NAME:-jboss} user:${HOME}:/sbin/nologin" >> /etc/passwd + fi +fi + +set -x + +# start httpd +if [[ -x /usr/sbin/httpd ]]; then + /usr/sbin/httpd -D FOREGROUND +elif [[ -x /usr/bin/run-httpd ]]; then + /usr/bin/run-httpd +fi diff --git a/build/dockerfiles/rhel.install.sh b/build/dockerfiles/rhel.install.sh new file mode 100755 index 000000000..73a89782f --- /dev/null +++ b/build/dockerfiles/rhel.install.sh @@ -0,0 +1,34 @@ +#!/bin/bash +# +# Copyright (c) 2012-2018 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 +# + +microdnf install -y findutils bash wget yum gzip git tar jq python3-six python3-pip && microdnf -y clean all && \ +# install yq (depends on jq and pyyaml - if jq and pyyaml not already installed, this will try to compile it) +if [[ -f /tmp/root-local.tgz ]] || [[ ${BOOTSTRAP} == "true" ]]; then \ + mkdir -p /root/.local; tar xf /tmp/root-local.tgz -C /root/.local/; rm -fr /tmp/root-local.tgz; \ + /usr/bin/pip3.6 install --user yq jsonschema; \ + # could be installed in /opt/app-root/src/.local/bin or /root/.local/bin + for d in /opt/app-root/src/.local /root/.local; do \ + if [[ -d ${d} ]]; then \ + cp ${d}/bin/yq ${d}/bin/jsonschema /usr/local/bin/; \ + pushd ${d}/lib/python3.6/site-packages/ >/dev/null; \ + cp -r PyYAML* xmltodict* yaml* yq* jsonschema* /usr/lib/python3.6/site-packages/; \ + popd >/dev/null; \ + fi; \ + done; \ + chmod -c +x /usr/local/bin/*; \ +else \ + /usr/bin/pip3.6 install yq jsonschema; \ +fi && \ +ln -s /usr/bin/python3.6 /usr/bin/python && \ +# test install worked +for d in python yq jq jsonschema; do echo -n "$d: "; $d --version; done + +# for debugging only +# microdnf install -y util-linux && whereis python pip jq yq && python --version && jq --version && yq --version diff --git a/build/scripts/cache_images.sh b/build/scripts/cache_images.sh new file mode 100755 index 000000000..7798f89db --- /dev/null +++ b/build/scripts/cache_images.sh @@ -0,0 +1,52 @@ +#!/bin/bash +# +# Copyright (c) 2012-2018 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 +# +# Arguments +# $1 - devfiles directory +# $2 - resources directory, where project zips will be stored. +# +# Only supports downloading projecst from GitHub. + +set -e + +DEVFILES_DIR="${1%/}" +INDEX_JSON="${DEVFILES_DIR#./}/index.json" +RESOURCES_DIR="${2%/}/images/" +RESOURCES_DIR="${RESOURCES_DIR#\./}" +TEMP_DIR="${RESOURCES_DIR%/}/temp_images" + +readarray -d '' metas < <(find "${DEVFILES_DIR#./}" -name 'meta.yaml' -print0) + +images=$(yq -S -r '.icon' "${metas[@]}" | sort | uniq) +mkdir -p "$RESOURCES_DIR" "$TEMP_DIR" + +echo "Caching images referenced in devfiles" +for image in ${images[@]}; do + # Workaround for getting filenames through content-disposition: copy to temp + # dir and read filename before moving to /resources. + wget -P "${TEMP_DIR}" -nv --content-disposition "${image}" + file=$(find "${TEMP_DIR}" -type f) + filename=$(basename "${file}") + + # Store downloaded image in resources dir, on subpath derived from URL (strip + # protocol and last portion) + image_dir="${image#*//}" + image_dir="${RESOURCES_DIR%/}/${image_dir%/*}" + mkdir -p "$image_dir" + + cached_image="${image_dir%/}/${filename}" + mv "$file" "$cached_image" + echo " Downloaded image $image to $cached_image" + + cached_url="{{ DEVFILE_REGISTRY_URL }}/${cached_image#/}" + sed -i "s|${image}|${cached_url}|g" "${metas[@]}" "$INDEX_JSON" + echo " Updated devfiles to point at cached image" +done + +rm -rf "$TEMP_DIR" diff --git a/build/scripts/cache_projects.sh b/build/scripts/cache_projects.sh new file mode 100755 index 000000000..d4825cdc8 --- /dev/null +++ b/build/scripts/cache_projects.sh @@ -0,0 +1,120 @@ +#!/bin/bash +# +# Copyright (c) 2012-2018 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 +# +# Arguments +# $1 - devfiles directory +# $2 - resources directory, where project zips will be stored. +# +# Only supports downloading projecst from GitHub. + +set -e + +DEVFILES_DIR="${1%/}" +RESOURCES_DIR="${2%/}" +TEMP_DIR="${RESOURCES_DIR}/devfiles_temp" +TEMP_FILE="${TEMP_DIR}/temp.yaml" +TEMP_REPO="${TEMP_DIR}/cloned" + +# Clone a git repository and create an archive zip at a specified location +# Args: +# $1 - URL of git repo +# $2 - (optional) branch to archive +# $3 - destination path for the archived project zip file +function cache_project() { + local repo="$1" + local branch="$2" + local destination="$3" + git clone "$repo" -b "$branch" --depth 1 "$TEMP_REPO" &>/dev/null + git archive "$branch" --remote="$TEMP_REPO" --format zip --output "$destination" + rm -rf "$TEMP_REPO" +} + +# Update devfile to refer to a locally stored zip instead of a public git repo +# Args: +# $1 - path to devfile to update +# $2 - name of project to update within devfile +# $3 - path to downloaded project zip +function update_devfile() { + local devfile="$1" + local project_name="$2" + local zip_path="$3" + # The yq script below will rewrite the project with $project_name to be a zip-type + # project with provided path. The location field contains a placeholder + # '{{ DEVFILE_REGISTRY_URL }}' which must be filled at runtime (see + # build/dockerfiles/entrypoint.sh script) + # shellcheck disable=SC2016 + yq -y \ + '(.projects | map(select(.name != $PROJECT_NAME))) as $projects | + . + { + "projects": ( + $projects + [{ + "name": $PROJECT_NAME, + "source": { + "type": "zip", + "location": "{{ DEVFILE_REGISTRY_URL }}/\($PROJECT_PATH)" + } + }] + ) + }' "$devfile" \ + --arg "PROJECT_NAME" "${project_name}" \ + --arg "PROJECT_PATH" "${zip_path}" \ + > "$TEMP_FILE" + # As a workaround since jq does not support in-place updates, we need to copy + # to a temp file and then overwrite the original. + echo " Copying $TEMP_FILE -> $devfile" + mv "$TEMP_FILE" "$devfile" + +} + +function get_devfile_name() { + devfile=$1 + yq -r '.metadata | + if has("name") then + .name + elif has("generateName") then + .generateName + else + "unnamed-devfile" + end + ' "$devfile" +} + +readarray -d '' devfiles < <(find "$DEVFILES_DIR" -name 'devfile.yaml' -print0) +mkdir -p "$TEMP_DIR" "$RESOURCES_DIR" +for devfile in "${devfiles[@]}"; do + echo "Caching project files for devfile $devfile" + devfile_name=$(get_devfile_name "$devfile") + devfile_name=${devfile_name%-} + for project in $(yq -c '.projects[]?' "$devfile"); do + project_name=$(echo "$project" | jq -r '.name') + echo " Caching project $project_name" + + type=$(echo "$project" | jq -r '.source.type') + if [ "$type" != "git" ]; then + echo " [WARN]: Project type is not 'git'; skipping." + continue + fi + + location=$(echo "$project" | jq -r '.source.location') + branch=$(echo "$project" | jq -r '.source.branch') + if [ -n "$branch" ]; then + branch="master" + fi + destination="${RESOURCES_DIR}/${devfile_name}-${project_name}-${branch}.zip" + absolute_destination=$(realpath "$destination") + echo " Caching project to $absolute_destination" + cache_project "$location" "$branch" "$absolute_destination" + + echo " Updating devfile $devfile to point at cached project zip $destination" + update_devfile "$devfile" "$project_name" "$destination" + done +done + +rm -rf "$TEMP_DIR" + diff --git a/build/scripts/check_mandatory_fields.sh b/build/scripts/check_mandatory_fields.sh index ff768fec6..99e495271 100755 --- a/build/scripts/check_mandatory_fields.sh +++ b/build/scripts/check_mandatory_fields.sh @@ -17,7 +17,7 @@ for meta in "${metas[@]}"; do echo "Checking devfile '${meta}'" unset NULL_OR_EMPTY_FIELDS for field in "${FIELDS[@]}"; do - if ! grep -q "^${field}:.*\S" $meta; then + if ! grep -q "^${field}:.*\S" "$meta"; then NULL_OR_EMPTY_FIELDS+="$field " fi done diff --git a/build/scripts/index.sh b/build/scripts/index.sh index 795bb7070..450a18347 100755 --- a/build/scripts/index.sh +++ b/build/scripts/index.sh @@ -12,7 +12,7 @@ set -e readarray -d '' metas < <(find devfiles -name 'meta.yaml' -print0) for meta in "${metas[@]}"; do - META_DIR=$(dirname ${meta}) + META_DIR=$(dirname "${meta}") # Workaround to include self-links, since it's not possible to # get filename in yq easily echo -e "links:\n self: /${META_DIR}/devfile.yaml" >> "${meta}" diff --git a/build/scripts/list_containers.sh b/build/scripts/list_containers.sh new file mode 100755 index 000000000..e449ce2e1 --- /dev/null +++ b/build/scripts/list_containers.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# +# Copyright (c) 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 +# + +# pull all external references to container images, so we can see which ones need to be airgapped/offlined + +# $ ./build/scripts/list_containers.sh devfiles/ + +set -e + +if [[ ! $1 ]]; then DIR=$(dirname "$0"); else DIR="$1"; fi + +# search in devfiles folder, eg., $1 = devfiles/ +echo "BEGIN list of external containers in $DIR folder:" +yq -r '.components[].image | strings' "${DIR}"/**/devfile.yaml | sort | uniq | sed "s/^/ /g" +echo "END list of external containers in $DIR folder" diff --git a/build/scripts/list_referenced_images.sh b/build/scripts/list_referenced_images.sh new file mode 100755 index 000000000..61288d984 --- /dev/null +++ b/build/scripts/list_referenced_images.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# +# Copyright (c) 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 +# +# List all images referenced in meta.yaml files +# + +set -e + +readarray -d '' devfiles < <(find "$1" -name 'devfile.yaml' -print0) +yq -r '..|.image?' "${devfiles[@]}" | grep -v "null" | sort | uniq diff --git a/cico_build_nightly.sh b/cico_build_nightly.sh index dcd8b47e3..8f69ac128 100755 --- a/cico_build_nightly.sh +++ b/cico_build_nightly.sh @@ -26,4 +26,5 @@ set_nightly_tag setup_environment build_patched_base_images +build_happy_path_image build_and_push diff --git a/cico_build_release.sh b/cico_build_release.sh index defd10dc1..262ed038e 100755 --- a/cico_build_release.sh +++ b/cico_build_release.sh @@ -26,4 +26,5 @@ set_release_tag setup_environment build_patched_base_images +build_happy_path_image build_and_push_release diff --git a/cico_functions.sh b/cico_functions.sh index 9843da887..0f4eb1e98 100644 --- a/cico_functions.sh +++ b/cico_functions.sh @@ -77,7 +77,7 @@ function setup_environment() { export GIT_COMMIT_TAG if [ "$TARGET" == "rhel" ]; then - export DOCKERFILE_PATH="./build/dockerfiles/Dockerfile.rhel" + export DOCKERFILE_PATH="./build/dockerfiles/rhel.Dockerfile" export ORGANIZATION="openshiftio" export IMAGE="rhel-che-devfile-registry" else @@ -99,7 +99,7 @@ function setup_environment() { # Build, tag, and push devfile registry, tagged with ${TAG} and ${GIT_COMMIT_TAG} function build_and_push() { # Let's build and push image to 'quay.io' using git commit hash as tag first - docker build -t ${IMAGE} -f ${DOCKERFILE_PATH} . + docker build -t ${IMAGE} -f ${DOCKERFILE_PATH} --target registry . tag_push "${REGISTRY}/${ORGANIZATION}/${IMAGE}:${GIT_COMMIT_TAG}" echo "CICO: '${GIT_COMMIT_TAG}' version of images pushed to '${REGISTRY}/${ORGANIZATION}' organization" @@ -110,13 +110,19 @@ function build_and_push() { fi } -# Build release version of devfile registry, using ${TAG} as a tag. For release +# Build release version of devfile registry, using ${TAG} / ${GIT_COMMIT_TAG} as a tag. For release # versions, the devfiles are rewritten to refer to ${TAG}-tagged images with the # arbitrary user patch function build_and_push_release() { - echo "CICO: building release '${TAG}' version of devfile registry" + echo "CICO: building release '${TAG}' / '${GIT_COMMIT_TAG}' version of devfile registry" docker build -t ${IMAGE} -f ${DOCKERFILE_PATH} . \ - --build-arg PATCHED_IMAGES_TAG=${TAG} + --build-arg PATCHED_IMAGES_TAG=${TAG} \ + --target registry + + echo "CICO: '${GIT_COMMIT_TAG}' version of devfile registry built" + tag_push "${REGISTRY}/${ORGANIZATION}/${IMAGE}:${GIT_COMMIT_TAG}" + echo "CICO: '${GIT_COMMIT_TAG}' version of devfile registry pushed to '${REGISTRY}/${ORGANIZATION}' organization" + echo "CICO: release '${TAG}' version of devfile registry built" tag_push "${REGISTRY}/${ORGANIZATION}/${IMAGE}:${TAG}" echo "CICO: release '${TAG}' version of devfile registry pushed to '${REGISTRY}/${ORGANIZATION}' organization" @@ -133,3 +139,12 @@ function build_patched_base_images() { echo "CICO: pushed '${TAG}' version of the arbitrary-user patched base images" fi } + +function build_happy_path_image() { + if [ "$TARGET" == "centos" ]; then + local TAG=${TAG:-${GIT_COMMIT_TAG}} + echo "CICO: building image for happy path testing with tag '${TAG}'" + "${SCRIPT_DIR}"/arbitrary-users-patch/happy-path/build_happy_path_image.sh --push + echo "CICO: pushed '${TAG}' version of the happy path image" + fi +} diff --git a/deploy/kubernetes/che-devfile-registry/README.md b/deploy/kubernetes/che-devfile-registry/README.md index 4931d6bee..724cf6620 100644 --- a/deploy/kubernetes/che-devfile-registry/README.md +++ b/deploy/kubernetes/che-devfile-registry/README.md @@ -1,3 +1,3 @@ # Che devfile Registry Helm Chart -This Helm Chart install [Che](/~https://github.com/eclipse/che) devfile Registry. More information about Che devfile Registry can be found [here](/~https://github.com/eclipse/che-devfile-registry). \ No newline at end of file +This Helm Chart installs the [Che](/~https://github.com/eclipse/che) devfile registry. More information about the Che devfile registry can be found [here](/~https://github.com/eclipse/che-devfile-registry). diff --git a/deploy/kubernetes/che-devfile-registry/templates/configmap.yaml b/deploy/kubernetes/che-devfile-registry/templates/configmap.yaml new file mode 100644 index 000000000..a17994704 --- /dev/null +++ b/deploy/kubernetes/che-devfile-registry/templates/configmap.yaml @@ -0,0 +1,17 @@ +# +# Copyright (c) 2018 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 +# + +kind: ConfigMap +apiVersion: v1 +metadata: + name: che-devfile-registry +data: + CHE_DEVFILE_IMAGES_REGISTRY_URL: {{ .Values.cheDevfileImagesOverride.url }} + CHE_DEVFILE_IMAGES_REGISTRY_ORGANIZATION: {{ .Values.cheDevfileImagesOverride.organization }} + CHE_DEVFILE_IMAGES_REGISTRY_TAG: {{ .Values.cheDevfileImagesOverride.tag }} diff --git a/deploy/kubernetes/che-devfile-registry/templates/deployment.yaml b/deploy/kubernetes/che-devfile-registry/templates/deployment.yaml index d659a040b..89ddb95d9 100644 --- a/deploy/kubernetes/che-devfile-registry/templates/deployment.yaml +++ b/deploy/kubernetes/che-devfile-registry/templates/deployment.yaml @@ -56,3 +56,7 @@ spec: memory: {{ .Values.cheDevfileRegistryMemoryLimit }} requests: memory: 256Mi + envFrom: + - configMapRef: + name: che-devfile-registry + optional: true diff --git a/deploy/kubernetes/che-devfile-registry/values.yaml b/deploy/kubernetes/che-devfile-registry/values.yaml index 0940e3e46..3e26cf3d4 100644 --- a/deploy/kubernetes/che-devfile-registry/values.yaml +++ b/deploy/kubernetes/che-devfile-registry/values.yaml @@ -12,6 +12,14 @@ cheDevfileRegistryImagePullPolicy: Always cheDevfileRegistryMemoryLimit: 256Mi #cheDevfileRegistryIngressSecretName: che-tls +cheDevfileImagesOverride: + # Override for registry URL in images used in devfiles + url: + # Override for registry organization in images used in devfiles + organization: + # Override for image tags used images referenced in devfiles + tag: + global: ingressDomain: 192.168.99.100.nip.io ingress: diff --git a/deploy/openshift/che-devfile-registry.yaml b/deploy/openshift/che-devfile-registry.yaml index 64cf38ea9..f83fceab5 100644 --- a/deploy/openshift/che-devfile-registry.yaml +++ b/deploy/openshift/che-devfile-registry.yaml @@ -58,8 +58,16 @@ objects: periodSeconds: 10 timeoutSeconds: 3 resources: + requests: + cpu: 1m + memory: 5Mi limits: + cpu: 100m memory: ${MEMORY_LIMIT} + envFrom: + - configMapRef: + name: che-devfile-registry + optional: true triggers: - type: ConfigChange - apiVersion: v1 @@ -81,6 +89,15 @@ objects: to: kind: Service name: che-devfile-registry +- apiVersion: v1 + kind: ConfigMap + metadata: + name: che-devfile-registry + data: + CHE_DEVFILE_IMAGES_REGISTRY_URL: ${CHE_DEVFILE_IMAGES_REGISTRY_URL} + CHE_DEVFILE_IMAGES_REGISTRY_ORGANIZATION: ${CHE_DEVFILE_IMAGES_REGISTRY_ORGANIZATION} + CHE_DEVFILE_IMAGES_REGISTRY_TAG: ${CHE_DEVFILE_IMAGES_REGISTRY_TAG} + parameters: - name: IMAGE value: quay.io/eclipse/che-devfile-registry @@ -98,3 +115,12 @@ parameters: value: Always displayName: Eclipse Che devfile registry image pull policy description: Always pull by default. Can be IfNotPresent +- name: CHE_DEVFILE_IMAGES_REGISTRY_URL + displayName: Devfile image registry URL + description: URL of docker registry containing base images refered in devfiles; used to override base images in devfiles +- name: CHE_DEVFILE_IMAGES_REGISTRY_ORGANIZATION + displayName: Devfile image registry organization + description: Organization containing images referenced in devfiles; used to override base images in devfiles +- name: CHE_DEVFILE_IMAGES_REGISTRY_TAG + displayName: Devfile image registry tag + description: Tag used for custom devfile images; used to override base images in devfiles diff --git a/devfiles/go/devfile.yaml b/devfiles/go/devfile.yaml index 40f4221d9..0f53b74ff 100644 --- a/devfiles/go/devfile.yaml +++ b/devfiles/go/devfile.yaml @@ -18,7 +18,7 @@ components: - type: dockerimage # this version is used in the plugin - image: quay.io/eclipse/che-golang-1.10:nightly + image: quay.io/eclipse/che-golang-1.12:nightly alias: go-cli env: - name: GOPATH diff --git a/devfiles/go/meta.yaml b/devfiles/go/meta.yaml index 067cf04d8..2ae10379c 100644 --- a/devfiles/go/meta.yaml +++ b/devfiles/go/meta.yaml @@ -1,6 +1,6 @@ --- displayName: Go -description: Stack with Go 1.10.7 +description: Stack with Go 1.12.10 tags: ["Debian", "Go"] icon: https://www.eclipse.org/che/images/logo-eclipseche.svg globalMemoryLimit: 1686Mi diff --git a/devfiles/java-gradle/devfile.yaml b/devfiles/java-gradle/devfile.yaml index 79a714177..2dc54ac53 100644 --- a/devfiles/java-gradle/devfile.yaml +++ b/devfiles/java-gradle/devfile.yaml @@ -8,10 +8,11 @@ projects: source: type: git location: "/~https://github.com/che-samples/console-java-simple.git" + branch: java1.11 components: - type: chePlugin - id: redhat/java/latest + id: redhat/java11/latest - type: dockerimage alias: gradle diff --git a/devfiles/java-lejos/devfile.yaml b/devfiles/java-lejos/devfile.yaml index 7450937a7..fc9095454 100644 --- a/devfiles/java-lejos/devfile.yaml +++ b/devfiles/java-lejos/devfile.yaml @@ -43,7 +43,7 @@ components: alias: maven memoryLimit: 512Mi mountSources: true - image: 'quay.io/eclipse/che-java11-maven:nightly' + image: quay.io/eclipse/che-java11-maven:nightly type: dockerimage - id: eclipse/che-theia/next type: cheEditor diff --git a/devfiles/java-maven/devfile.yaml b/devfiles/java-maven/devfile.yaml index 352ed351c..311fbba2a 100644 --- a/devfiles/java-maven/devfile.yaml +++ b/devfiles/java-maven/devfile.yaml @@ -8,10 +8,11 @@ projects: source: type: git location: "/~https://github.com/che-samples/console-java-simple.git" + branch: java1.11 components: - type: chePlugin - id: redhat/java/latest + id: redhat/java11/latest - type: dockerimage alias: maven diff --git a/devfiles/java-mongo/devfile.yaml b/devfiles/java-mongo/devfile.yaml new file mode 100644 index 000000000..411df3104 --- /dev/null +++ b/devfiles/java-mongo/devfile.yaml @@ -0,0 +1,121 @@ +--- +apiVersion: 1.0.0 +metadata: + generateName: java-mongo- +projects: +- + name: java-guestbook + source: + type: git + location: "/~https://github.com/che-samples/java-guestbook.git" +components: +- + type: chePlugin + id: redhat/java/latest + memoryLimit: 1280MiB +- + type: dockerimage + alias: maven + image: quay.io/eclipse/che-java8-maven:nightly + env: + - name: JAVA_OPTS + value: "-XX:MaxRAMPercentage=50.0 -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 + -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 + -Dsun.zip.disableMemoryMapping=true -Xms20m -Djava.security.egd=file:/dev/./urandom + -Duser.home=/home/user" + - name: MAVEN_OPTS + value: $(JAVA_OPTS) + memoryLimit: 512Mi + mountSources: true + endpoints: + - name: java-guestbook-backend + attributes: + discoverable: 'true' + public: 'false' + port: 8080 + - name: java-guestbook + attributes: + discoverable: 'true' + public: 'true' + port: 8443 + volumes: + - name: m2 + containerPath: /home/user/.m2 +- + type: dockerimage + alias: mongo + image: docker.io/centos/mongodb-34-centos7 + env: + - name: MONGODB_USER + value: user + - name: MONGODB_PASSWORD + value: password + - name: MONGODB_DATABASE + value: guestbook + - name: MONGODB_ADMIN_PASSWORD + value: password + memoryLimit: 300Mi + endpoints: + - name: java-guestbook-mongodb + attributes: + discoverable: 'true' + public: 'false' + port: 27017 +commands: +- + name: maven build backend + actions: + - + type: exec + component: maven + command: "mvn clean install" + workdir: "${CHE_PROJECTS_ROOT}/java-guestbook/backend" +- + name: maven build frontend + actions: + - type: exec + component: maven + command: "mvn clean install" + workdir: "${CHE_PROJECTS_ROOT}/java-guestbook/frontend" +- + name: run backend + actions: + - + type: exec + component: maven + command: | + java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5006,quiet=y \ + -jar target/backend-1.0.jar + workdir: "${CHE_PROJECTS_ROOT}/java-guestbook/backend" +- + name: run frontend + actions: + - type: exec + component: maven + command: | + java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005,quiet=y \ + -jar target/frontend-1.0.jar + workdir: "${CHE_PROJECTS_ROOT}/java-guestbook/frontend" +- + name: Debug remote + actions: + - type: vscode-launch + referenceContent: | + { + "version": "0.2.0", + "configurations": [ + { + "type": "java", + "name": "Debug (Attach) - Backend", + "request": "attach", + "hostName": "localhost", + "port": 5006 + }, + { + "type": "java", + "name": "Debug (Attach) - Frontend", + "request": "attach", + "hostName": "localhost", + "port": 5005 + }] + } diff --git a/devfiles/java-mongo/meta.yaml b/devfiles/java-mongo/meta.yaml new file mode 100644 index 000000000..29345daa9 --- /dev/null +++ b/devfiles/java-mongo/meta.yaml @@ -0,0 +1,6 @@ +--- +displayName: Java with Spring Boot and MongoDB +description: Java stack with OpenJDK 8, MongoDB and Spring Boot Guestbook demo application +tags: ["Java", "OpenJDK", "Maven", "Spring Boot", "MongoDB"] +icon: https://www.eclipse.org/che/images/logo-eclipseche.svg +globalMemoryLimit: 2884Mi diff --git a/devfiles/java-mysql/devfile.yaml b/devfiles/java-mysql/devfile.yaml index a29fd77fa..a1db4fb7e 100644 --- a/devfiles/java-mysql/devfile.yaml +++ b/devfiles/java-mysql/devfile.yaml @@ -36,7 +36,7 @@ components: - type: dockerimage alias: mysql - image: centos/mysql-57-centos7 + image: docker.io/centos/mysql-57-centos7 env: - name: MYSQL_USER value: petclinic diff --git a/devfiles/jsp_core/armv4-az9360mb/devfile.yaml b/devfiles/jsp_core/armv4-az9360mb/devfile.yaml index 92d81eca7..ca1ea43b2 100644 --- a/devfiles/jsp_core/armv4-az9360mb/devfile.yaml +++ b/devfiles/jsp_core/armv4-az9360mb/devfile.yaml @@ -1,5 +1,5 @@ apiVersion: 1.0.0 -metatada +metadata: name: jsp_armv4-az9360mb projects: - name: jsp_core @@ -19,19 +19,23 @@ commands: actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core/cfg && make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + command: make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core/cfg - name: "configure sample1" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && ./configure -C armv4 -S az9360mb + command: ./configure -C armv4 -S az9360mb + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "make depend" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make depend TARGET=arm-pizzafactory-elf && echo && echo Done. + command: make depend TARGET=arm-pizzafactory-elf && echo && echo Done. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "build JSP kernel" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make TARGET=arm-pizzafactory-elf + command: make TARGET=arm-pizzafactory-elf + workdir: ${CHE_PROJECTS_ROOT}/jsp_core diff --git a/devfiles/jsp_core/armv4-integrator/devfile.yaml b/devfiles/jsp_core/armv4-integrator/devfile.yaml index cbb926997..37bfb8146 100644 --- a/devfiles/jsp_core/armv4-integrator/devfile.yaml +++ b/devfiles/jsp_core/armv4-integrator/devfile.yaml @@ -20,22 +20,22 @@ commands: - type: exec component: pizza-dev command: make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. - workdir: cd ${CHE_PROJECTS_ROOT}/jsp_core/cfg + workdir: ${CHE_PROJECTS_ROOT}/jsp_core/cfg - name: "configure sample1" actions: - type: exec component: pizza-dev command: ./configure -C armv4 -S integrator - workdir: cd ${CHE_PROJECTS_ROOT}/jsp_core + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "make depend" actions: - type: exec component: pizza-dev command: make depend TARGET=arm-pizzafactory-elf && echo && echo Done. - workdir: cd ${CHE_PROJECTS_ROOT}/jsp_core + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "build JSP kernel" actions: - type: exec component: pizza-dev command: make TARGET=arm-pizzafactory-elf - workdir: cd ${CHE_PROJECTS_ROOT}/jsp_core + workdir: ${CHE_PROJECTS_ROOT}/jsp_core diff --git a/devfiles/jsp_core/blackfin-acb_bf592/devfile.yaml b/devfiles/jsp_core/blackfin-acb_bf592/devfile.yaml index 1831e78df..596e624bf 100644 --- a/devfiles/jsp_core/blackfin-acb_bf592/devfile.yaml +++ b/devfiles/jsp_core/blackfin-acb_bf592/devfile.yaml @@ -19,19 +19,23 @@ commands: actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core/cfg && make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + command: make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core/cfg - name: "configure sample1" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && ./configure -C blackfin -S acb_bf592 + command: ./configure -C blackfin -S acb_bf592 + workdir: ${CHE_PROJECTS_ROOT}/jsp_core/ - name: "make depend" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make depend TARGET=bfin-pizzafactory-elf && echo && echo Done. + command: make depend TARGET=bfin-pizzafactory-elf && echo && echo Done. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core/ - name: "build JSP kernel" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make TARGET=bfin-pizzafactory-elf + command: make TARGET=bfin-pizzafactory-elf + workdir: ${CHE_PROJECTS_ROOT}/jsp_core/ diff --git a/devfiles/jsp_core/blackfin-bf533cb/devfile.yaml b/devfiles/jsp_core/blackfin-bf533cb/devfile.yaml index 34ebee19e..ed74b9ec0 100644 --- a/devfiles/jsp_core/blackfin-bf533cb/devfile.yaml +++ b/devfiles/jsp_core/blackfin-bf533cb/devfile.yaml @@ -19,19 +19,23 @@ commands: actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core/cfg && make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + command: make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core/cfg - name: "configure sample1" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && ./configure -C blackfin -S bf533cb + command: ./configure -C blackfin -S bf533cb + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "make depend" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make depend TARGET=bfin-pizzafactory-elf && echo && echo Done. + command: make depend TARGET=bfin-pizzafactory-elf && echo && echo Done. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "build JSP kernel" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make TARGET=bfin-pizzafactory-elf + command: make TARGET=bfin-pizzafactory-elf + workdir: ${CHE_PROJECTS_ROOT}/jsp_core diff --git a/devfiles/jsp_core/blackfin-ekit_bf533/devfile.yaml b/devfiles/jsp_core/blackfin-ekit_bf533/devfile.yaml index deb804129..d090fdbf0 100644 --- a/devfiles/jsp_core/blackfin-ekit_bf533/devfile.yaml +++ b/devfiles/jsp_core/blackfin-ekit_bf533/devfile.yaml @@ -19,19 +19,23 @@ commands: actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core/cfg && make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + command: make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core/cfg - name: "configure sample1" actions: - type: exec component: pizza-dev command: cd ${CHE_PROJECTS_ROOT}/jsp_core && ./configure -C blackfin -S ekit_bf533 + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "make depend" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make depend TARGET=bfin-pizzafactory-elf && echo && echo Done. + command: make depend TARGET=bfin-pizzafactory-elf && echo && echo Done. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "build JSP kernel" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make TARGET=bfin-pizzafactory-elf + command: make TARGET=bfin-pizzafactory-elf + workdir: ${CHE_PROJECTS_ROOT}/jsp_core diff --git a/devfiles/jsp_core/blackfin-ezkit_bf506/devfile.yaml b/devfiles/jsp_core/blackfin-ezkit_bf506/devfile.yaml index 484acb8a2..7b9647b88 100644 --- a/devfiles/jsp_core/blackfin-ezkit_bf506/devfile.yaml +++ b/devfiles/jsp_core/blackfin-ezkit_bf506/devfile.yaml @@ -19,19 +19,23 @@ commands: actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core/cfg && make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + command: make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core/cfg - name: "configure sample1" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && ./configure -C blackfin -S ezkit_bf506 + command: ./configure -C blackfin -S ezkit_bf506 + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "make depend" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make depend TARGET=bfin-pizzafactory-elf && echo && echo Done. + command: make depend TARGET=bfin-pizzafactory-elf && echo && echo Done. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "build JSP kernel" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make TARGET=bfin-pizzafactory-elf + command: make TARGET=bfin-pizzafactory-elf + workdir: ${CHE_PROJECTS_ROOT}/jsp_core diff --git a/devfiles/jsp_core/blackfin-ezkit_bf518/devfile.yaml b/devfiles/jsp_core/blackfin-ezkit_bf518/devfile.yaml index 4c400baa2..0860c0568 100644 --- a/devfiles/jsp_core/blackfin-ezkit_bf518/devfile.yaml +++ b/devfiles/jsp_core/blackfin-ezkit_bf518/devfile.yaml @@ -19,19 +19,23 @@ commands: actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core/cfg && make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + command: make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core/cfg - name: "configure sample1" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && ./configure -C blackfin -S ezkit_bf518 + command: ./configure -C blackfin -S ezkit_bf518 + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "make depend" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make depend TARGET=bfin-pizzafactory-elf && echo && echo Done. + command: make depend TARGET=bfin-pizzafactory-elf && echo && echo Done. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "build JSP kernel" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make TARGET=bfin-pizzafactory-elf + command: make TARGET=bfin-pizzafactory-elf + workdir: ${CHE_PROJECTS_ROOT}/jsp_core diff --git a/devfiles/jsp_core/blackfin-ezkit_bf518_00/devfile.yaml b/devfiles/jsp_core/blackfin-ezkit_bf518_00/devfile.yaml index 79a9f9258..b31e179ca 100644 --- a/devfiles/jsp_core/blackfin-ezkit_bf518_00/devfile.yaml +++ b/devfiles/jsp_core/blackfin-ezkit_bf518_00/devfile.yaml @@ -19,19 +19,23 @@ commands: actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core/cfg && make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + command: make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core/cfg - name: "configure sample1" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && ./configure -C blackfin -S ezkit_bf518_00 + command: ./configure -C blackfin -S ezkit_bf518_00 + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "make depend" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make depend TARGET=bfin-pizzafactory-elf && echo && echo Done. + command: make depend TARGET=bfin-pizzafactory-elf && echo && echo Done. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "build JSP kernel" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make TARGET=bfin-pizzafactory-elf + command: make TARGET=bfin-pizzafactory-elf + workdir: ${CHE_PROJECTS_ROOT}/jsp_core diff --git a/devfiles/jsp_core/blackfin-ezkit_bf527/devfile.yaml b/devfiles/jsp_core/blackfin-ezkit_bf527/devfile.yaml index 25770c570..b649bae98 100644 --- a/devfiles/jsp_core/blackfin-ezkit_bf527/devfile.yaml +++ b/devfiles/jsp_core/blackfin-ezkit_bf527/devfile.yaml @@ -19,19 +19,23 @@ commands: actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core/cfg && make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + command: make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core/cfg - name: "configure sample1" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && ./configure -C blackfin -S ezkit_bf527 + command: ./configure -C blackfin -S ezkit_bf527 + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "make depend" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make depend TARGET=bfin-pizzafactory-elf && echo && echo Done. + command: make depend TARGET=bfin-pizzafactory-elf && echo && echo Done. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "build JSP kernel" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make TARGET=bfin-pizzafactory-elf + command: make TARGET=bfin-pizzafactory-elf + workdir: ${CHE_PROJECTS_ROOT}/jsp_core diff --git a/devfiles/jsp_core/blackfin-ezkit_bf533/devfile.yaml b/devfiles/jsp_core/blackfin-ezkit_bf533/devfile.yaml index 58af983c9..e12c40e3c 100644 --- a/devfiles/jsp_core/blackfin-ezkit_bf533/devfile.yaml +++ b/devfiles/jsp_core/blackfin-ezkit_bf533/devfile.yaml @@ -19,19 +19,23 @@ commands: actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core/cfg && make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + command: make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core/cfg - name: "configure sample1" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && ./configure -C blackfin -S ezkit_bf533 + command: ./configure -C blackfin -S ezkit_bf533 + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "make depend" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make depend TARGET=bfin-pizzafactory-elf && echo && echo Done. + command: make depend TARGET=bfin-pizzafactory-elf && echo && echo Done. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "build JSP kernel" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make TARGET=bfin-pizzafactory-elf + command: make TARGET=bfin-pizzafactory-elf + workdir: ${CHE_PROJECTS_ROOT}/jsp_core diff --git a/devfiles/jsp_core/blackfin-ezkit_bf537/devfile.yaml b/devfiles/jsp_core/blackfin-ezkit_bf537/devfile.yaml index 7126ce73b..183ad4d61 100644 --- a/devfiles/jsp_core/blackfin-ezkit_bf537/devfile.yaml +++ b/devfiles/jsp_core/blackfin-ezkit_bf537/devfile.yaml @@ -19,19 +19,23 @@ commands: actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core/cfg && make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + command: make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core/cfg - name: "configure sample1" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && ./configure -C blackfin -S ezkit_bf537 + command: ./configure -C blackfin -S ezkit_bf537 + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "make depend" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make depend TARGET=bfin-pizzafactory-elf && echo && echo Done. + command: make depend TARGET=bfin-pizzafactory-elf && echo && echo Done. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "build JSP kernel" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make TARGET=bfin-pizzafactory-elf + command: make TARGET=bfin-pizzafactory-elf + workdir: ${CHE_PROJECTS_ROOT}/jsp_core diff --git a/devfiles/jsp_core/blackfin-ezkit_bf548/devfile.yaml b/devfiles/jsp_core/blackfin-ezkit_bf548/devfile.yaml index 9670f9cde..fda0ff0ef 100644 --- a/devfiles/jsp_core/blackfin-ezkit_bf548/devfile.yaml +++ b/devfiles/jsp_core/blackfin-ezkit_bf548/devfile.yaml @@ -19,12 +19,14 @@ commands: actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core/cfg && make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + command: make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core/cfg - name: "configure sample1" actions: - type: exec component: pizza-dev command: cd ${CHE_PROJECTS_ROOT}/jsp_core && ./configure -C blackfin -S ezkit_bf548 + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "make depend" actions: - type: exec diff --git a/devfiles/jsp_core/blackfin-kobanzame/devfile.yaml b/devfiles/jsp_core/blackfin-kobanzame/devfile.yaml index 61e4486f3..fec6f6fb0 100644 --- a/devfiles/jsp_core/blackfin-kobanzame/devfile.yaml +++ b/devfiles/jsp_core/blackfin-kobanzame/devfile.yaml @@ -19,19 +19,23 @@ commands: actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core/cfg && make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + command: make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core/cfg - name: "configure sample1" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && ./configure -C blackfin -S kobanzame + command: ./configure -C blackfin -S kobanzame + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "make depend" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make depend TARGET=bfin-pizzafactory-elf && echo && echo Done. + command: make depend TARGET=bfin-pizzafactory-elf && echo && echo Done. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "build JSP kernel" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make TARGET=bfin-pizzafactory-elf + command: make TARGET=bfin-pizzafactory-elf + workdir: ${CHE_PROJECTS_ROOT}/jsp_core diff --git a/devfiles/jsp_core/blackfin-nosys/devfile.yaml b/devfiles/jsp_core/blackfin-nosys/devfile.yaml index 551056728..80cf34967 100644 --- a/devfiles/jsp_core/blackfin-nosys/devfile.yaml +++ b/devfiles/jsp_core/blackfin-nosys/devfile.yaml @@ -19,19 +19,23 @@ commands: actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core/cfg && make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + command: make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core/cfg - name: "configure sample1" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && ./configure -C blackfin -S nosys + command: ./configure -C blackfin -S nosys + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "make depend" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make depend TARGET=bfin-pizzafactory-elf && echo && echo Done. + command: make depend TARGET=bfin-pizzafactory-elf && echo && echo Done. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "build JSP kernel" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make TARGET=bfin-pizzafactory-elf + command: make TARGET=bfin-pizzafactory-elf + workdir: ${CHE_PROJECTS_ROOT}/jsp_core diff --git a/devfiles/jsp_core/blackfin-rebun/devfile.yaml b/devfiles/jsp_core/blackfin-rebun/devfile.yaml index c8f211fe4..949395a5a 100644 --- a/devfiles/jsp_core/blackfin-rebun/devfile.yaml +++ b/devfiles/jsp_core/blackfin-rebun/devfile.yaml @@ -19,19 +19,23 @@ commands: actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core/cfg && make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + command: make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core/cfg - name: "configure sample1" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && ./configure -C blackfin -S rebun + command: ./configure -C blackfin -S rebun + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "make depend" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make depend TARGET=bfin-pizzafactory-elf && echo && echo Done. + command: make depend TARGET=bfin-pizzafactory-elf && echo && echo Done. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "build JSP kernel" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make TARGET=bfin-pizzafactory-elf + command: make TARGET=bfin-pizzafactory-elf + workdir: ${CHE_PROJECTS_ROOT}/jsp_core diff --git a/devfiles/jsp_core/h8-akih8_3052f/devfile.yaml b/devfiles/jsp_core/h8-akih8_3052f/devfile.yaml index 057e6be3a..36cb17fff 100644 --- a/devfiles/jsp_core/h8-akih8_3052f/devfile.yaml +++ b/devfiles/jsp_core/h8-akih8_3052f/devfile.yaml @@ -19,19 +19,23 @@ commands: actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core/cfg && make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + command: make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core/cfg - name: "configure sample1" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && ./configure -C h8 -S akih8_3052f + command: ./configure -C h8 -S akih8_3052f + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "make depend" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make depend TARGET=h8300-pizzafactory-elf && echo && echo Done. + command: make depend TARGET=h8300-pizzafactory-elf && echo && echo Done. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "build JSP kernel" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make TARGET=h8300-pizzafactory-elf + command: make TARGET=h8300-pizzafactory-elf + workdir: ${CHE_PROJECTS_ROOT}/jsp_core diff --git a/devfiles/jsp_core/h8-akih8_3069f/devfile.yaml b/devfiles/jsp_core/h8-akih8_3069f/devfile.yaml index eec255151..9499f2756 100644 --- a/devfiles/jsp_core/h8-akih8_3069f/devfile.yaml +++ b/devfiles/jsp_core/h8-akih8_3069f/devfile.yaml @@ -19,19 +19,23 @@ commands: actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core/cfg && make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + command: make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core/cfg - name: "configure sample1" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && ./configure -C h8 -S akih8_3069f + command: ./configure -C h8 -S akih8_3069f + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "make depend" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make depend TARGET=h8300-pizzafactory-elf && echo && echo Done. + command: make depend TARGET=h8300-pizzafactory-elf && echo && echo Done. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "build JSP kernel" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make TARGET=h8300-pizzafactory-elf + command: make TARGET=h8300-pizzafactory-elf + workdir: ${CHE_PROJECTS_ROOT}/jsp_core diff --git a/devfiles/jsp_core/lm32-ecp2/devfile.yaml b/devfiles/jsp_core/lm32-ecp2/devfile.yaml index 4fb289d76..c22573d62 100644 --- a/devfiles/jsp_core/lm32-ecp2/devfile.yaml +++ b/devfiles/jsp_core/lm32-ecp2/devfile.yaml @@ -19,19 +19,23 @@ commands: actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core/cfg && make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + command: make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core/cfg - name: "configure sample1" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && ./configure -C lm32 -S ecp2 + command: ./configure -C lm32 -S ecp2 + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "make depend" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make depend TARGET=lm32-pizzafactory-elf && echo && echo Done. + command: make depend TARGET=lm32-pizzafactory-elf && echo && echo Done. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "build JSP kernel" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make TARGET=lm32-pizzafactory-elf + command: make TARGET=lm32-pizzafactory-elf + workdir: ${CHE_PROJECTS_ROOT}/jsp_core diff --git a/devfiles/jsp_core/m32r-m3a_2131/devfile.yaml b/devfiles/jsp_core/m32r-m3a_2131/devfile.yaml index 8221ca49f..8f2c0a81b 100644 --- a/devfiles/jsp_core/m32r-m3a_2131/devfile.yaml +++ b/devfiles/jsp_core/m32r-m3a_2131/devfile.yaml @@ -19,19 +19,23 @@ commands: actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core/cfg && make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + command: make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core/cfg - name: "configure sample1" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && ./configure -C m32r -S m3a_2131 + command: ./configure -C m32r -S m3a_2131 + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "make depend" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make depend TARGET=m32r-pizzafactory-elf && echo && echo Done. + command: make depend TARGET=m32r-pizzafactory-elf && echo && echo Done. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "build JSP kernel" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make TARGET=m32r-pizzafactory-elf + command: make TARGET=m32r-pizzafactory-elf + workdir: ${CHE_PROJECTS_ROOT}/jsp_core diff --git a/devfiles/jsp_core/m32r-m3a_za36/devfile.yaml b/devfiles/jsp_core/m32r-m3a_za36/devfile.yaml index bd5e10c8a..2eed452bd 100644 --- a/devfiles/jsp_core/m32r-m3a_za36/devfile.yaml +++ b/devfiles/jsp_core/m32r-m3a_za36/devfile.yaml @@ -19,19 +19,23 @@ commands: actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core/cfg && make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + command: make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core/cfg - name: "configure sample1" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && ./configure -C m32r -S m3a_za36 + command: ./configure -C m32r -S m3a_za36 + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "make depend" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make depend TARGET=m32r-pizzafactory-elf && echo && echo Done. + command: make depend TARGET=m32r-pizzafactory-elf && echo && echo Done. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "build JSP kernel" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make TARGET=m32r-pizzafactory-elf + command: make TARGET=m32r-pizzafactory-elf + workdir: ${CHE_PROJECTS_ROOT}/jsp_core diff --git a/devfiles/jsp_core/m68k-dve68k/devfile.yaml b/devfiles/jsp_core/m68k-dve68k/devfile.yaml index f76a8e152..16887564b 100644 --- a/devfiles/jsp_core/m68k-dve68k/devfile.yaml +++ b/devfiles/jsp_core/m68k-dve68k/devfile.yaml @@ -19,19 +19,23 @@ commands: actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core/cfg && make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + command: make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core/cfg - name: "configure sample1" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && ./configure -C m68k -S dve68k + command: ./configure -C m68k -S dve68k + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "make depend" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make depend TARGET=m68k-pizzafactory-elf && echo && echo Done. + command: make depend TARGET=m68k-pizzafactory-elf && echo && echo Done. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "build JSP kernel" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make TARGET=m68k-pizzafactory-elf + command: make TARGET=m68k-pizzafactory-elf + workdir: ${CHE_PROJECTS_ROOT}/jsp_core diff --git a/devfiles/jsp_core/microblaze-mire_multi/devfile.yaml b/devfiles/jsp_core/microblaze-mire_multi/devfile.yaml index d04212e39..8e56b18eb 100644 --- a/devfiles/jsp_core/microblaze-mire_multi/devfile.yaml +++ b/devfiles/jsp_core/microblaze-mire_multi/devfile.yaml @@ -19,19 +19,23 @@ commands: actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core/cfg && make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + command: make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core/cfg - name: "configure sample1" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && ./configure -C microblaze -S mire_multi + command: ./configure -C microblaze -S mire_multi + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "make depend" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make depend TARGET=microblaze-pizzafactory-elf && echo && echo Done. + command: make depend TARGET=microblaze-pizzafactory-elf && echo && echo Done. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "build JSP kernel" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make TARGET=microblaze-pizzafactory-elf + command: make TARGET=microblaze-pizzafactory-elf + workdir: ${CHE_PROJECTS_ROOT}/jsp_core diff --git a/devfiles/jsp_core/microblaze-miref/devfile.yaml b/devfiles/jsp_core/microblaze-miref/devfile.yaml index 9cf1c2c1d..028386121 100644 --- a/devfiles/jsp_core/microblaze-miref/devfile.yaml +++ b/devfiles/jsp_core/microblaze-miref/devfile.yaml @@ -19,19 +19,23 @@ commands: actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core/cfg && make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + command: make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core/cfg - name: "configure sample1" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && ./configure -C microblaze -S miref + command: ./configure -C microblaze -S miref + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "make depend" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make depend TARGET=microblaze-pizzafactory-elf && echo && echo Done. + command: make depend TARGET=microblaze-pizzafactory-elf && echo && echo Done. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "build JSP kernel" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make TARGET=microblaze-pizzafactory-elf + command: make TARGET=microblaze-pizzafactory-elf + workdir: ${CHE_PROJECTS_ROOT}/jsp_core diff --git a/devfiles/jsp_core/microblaze-multimedia/devfile.yaml b/devfiles/jsp_core/microblaze-multimedia/devfile.yaml index 5cdf55f99..2f6c7671b 100644 --- a/devfiles/jsp_core/microblaze-multimedia/devfile.yaml +++ b/devfiles/jsp_core/microblaze-multimedia/devfile.yaml @@ -19,19 +19,23 @@ commands: actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core/cfg && make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + command: make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core/cfg - name: "configure sample1" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && ./configure -C microblaze -S multimedia + command: ./configure -C microblaze -S multimedia + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "make depend" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make depend TARGET=microblaze-pizzafactory-elf && echo && echo Done. + command: make depend TARGET=microblaze-pizzafactory-elf && echo && echo Done. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "build JSP kernel" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make TARGET=microblaze-pizzafactory-elf + command: make TARGET=microblaze-pizzafactory-elf + workdir: ${CHE_PROJECTS_ROOT}/jsp_core diff --git a/devfiles/jsp_core/microblaze-suzaku/devfile.yaml b/devfiles/jsp_core/microblaze-suzaku/devfile.yaml index fcafe1923..3b3c382a7 100644 --- a/devfiles/jsp_core/microblaze-suzaku/devfile.yaml +++ b/devfiles/jsp_core/microblaze-suzaku/devfile.yaml @@ -19,19 +19,23 @@ commands: actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core/cfg && make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + command: make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core/cfg - name: "configure sample1" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && ./configure -C microblaze -S suzaku + command: ./configure -C microblaze -S suzaku + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "make depend" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make depend TARGET=microblaze-pizzafactory-elf && echo && echo Done. + command: make depend TARGET=microblaze-pizzafactory-elf && echo && echo Done. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "build JSP kernel" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make TARGET=microblaze-pizzafactory-elf + command: make TARGET=microblaze-pizzafactory-elf + workdir: ${CHE_PROJECTS_ROOT}/jsp_core diff --git a/devfiles/jsp_core/mips32-malta/devfile.yaml b/devfiles/jsp_core/mips32-malta/devfile.yaml index 671a12caa..51f758277 100644 --- a/devfiles/jsp_core/mips32-malta/devfile.yaml +++ b/devfiles/jsp_core/mips32-malta/devfile.yaml @@ -19,19 +19,23 @@ commands: actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core/cfg && make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + command: make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core/cfg - name: "configure sample1" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && ./configure -C mips32 -S malta + command: ./configure -C mips32 -S malta + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "make depend" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make depend TARGET=mips-pizzafactory-elf && echo && echo Done. + command: make depend TARGET=mips-pizzafactory-elf && echo && echo Done. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "build JSP kernel" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make TARGET=mips-pizzafactory-elf + command: make TARGET=mips-pizzafactory-elf + workdir: ${CHE_PROJECTS_ROOT}/jsp_core diff --git a/devfiles/jsp_core/mips32-sead3/devfile.yaml b/devfiles/jsp_core/mips32-sead3/devfile.yaml index bf517050d..9be34af14 100644 --- a/devfiles/jsp_core/mips32-sead3/devfile.yaml +++ b/devfiles/jsp_core/mips32-sead3/devfile.yaml @@ -19,19 +19,23 @@ commands: actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core/cfg && make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + command: make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core/cfg - name: "configure sample1" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && ./configure -C mips32 -S sead3 + command: ./configure -C mips32 -S sead3 + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "make depend" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make depend TARGET=mips-pizzafactory-elf && echo && echo Done. + command: make depend TARGET=mips-pizzafactory-elf && echo && echo Done. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "build JSP kernel" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make TARGET=mips-pizzafactory-elf + command: make TARGET=mips-pizzafactory-elf + workdir: ${CHE_PROJECTS_ROOT}/jsp_core diff --git a/devfiles/jsp_core/mips32-semc5701/devfile.yaml b/devfiles/jsp_core/mips32-semc5701/devfile.yaml index b0f14b49a..526214c60 100644 --- a/devfiles/jsp_core/mips32-semc5701/devfile.yaml +++ b/devfiles/jsp_core/mips32-semc5701/devfile.yaml @@ -19,19 +19,23 @@ commands: actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core/cfg && make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + command: make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core/cfg - name: "configure sample1" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && ./configure -C mips32 -S semc5701 + command: ./configure -C mips32 -S semc5701 + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "make depend" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make depend TARGET=mips-pizzafactory-elf && echo && echo Done. + command: make depend TARGET=mips-pizzafactory-elf && echo && echo Done. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "build JSP kernel" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make TARGET=mips-pizzafactory-elf + command: make TARGET=mips-pizzafactory-elf + workdir: ${CHE_PROJECTS_ROOT}/jsp_core diff --git a/devfiles/jsp_core/sh1-kz_sh1/devfile.yaml b/devfiles/jsp_core/sh1-kz_sh1/devfile.yaml index a134df89c..a6a00d729 100644 --- a/devfiles/jsp_core/sh1-kz_sh1/devfile.yaml +++ b/devfiles/jsp_core/sh1-kz_sh1/devfile.yaml @@ -19,19 +19,23 @@ commands: actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core/cfg && make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + command: make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core/cfg - name: "configure sample1" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && ./configure -C sh1 -S kz_sh1 + command: ./configure -C sh1 -S kz_sh1 + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "make depend" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make depend TARGET=sh-pizzafactory-elf && echo && echo Done. + command: make depend TARGET=sh-pizzafactory-elf && echo && echo Done. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "build JSP kernel" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make TARGET=sh-pizzafactory-elf + command: make TARGET=sh-pizzafactory-elf + workdir: ${CHE_PROJECTS_ROOT}/jsp_core diff --git a/devfiles/jsp_core/sh1-zunda_sh1/devfile.yaml b/devfiles/jsp_core/sh1-zunda_sh1/devfile.yaml index 2a96e878b..b351d43ee 100644 --- a/devfiles/jsp_core/sh1-zunda_sh1/devfile.yaml +++ b/devfiles/jsp_core/sh1-zunda_sh1/devfile.yaml @@ -19,19 +19,23 @@ commands: actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core/cfg && make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + command: make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core/cfg - name: "configure sample1" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && ./configure -C sh1 -S zunda_sh1 + command: ./configure -C sh1 -S zunda_sh1 + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "make depend" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make depend TARGET=sh-pizzafactory-elf && echo && echo Done. + command: make depend TARGET=sh-pizzafactory-elf && echo && echo Done. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "build JSP kernel" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make TARGET=sh-pizzafactory-elf + command: make TARGET=sh-pizzafactory-elf + workdir: ${CHE_PROJECTS_ROOT}/jsp_core diff --git a/devfiles/jsp_core/sh2-apsh2f6a/devfile.yaml b/devfiles/jsp_core/sh2-apsh2f6a/devfile.yaml index 1415af3f2..48231e4e6 100644 --- a/devfiles/jsp_core/sh2-apsh2f6a/devfile.yaml +++ b/devfiles/jsp_core/sh2-apsh2f6a/devfile.yaml @@ -19,19 +19,23 @@ commands: actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core/cfg && make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + command: make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core/cfg - name: "configure sample1" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && ./configure -C sh2 -S apsh2f6a + command: ./configure -C sh2 -S apsh2f6a + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "make depend" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make depend TARGET=sh-pizzafactory-elf && echo && echo Done. + command: make depend TARGET=sh-pizzafactory-elf && echo && echo Done. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "build JSP kernel" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make TARGET=sh-pizzafactory-elf + command: make TARGET=sh-pizzafactory-elf + workdir: ${CHE_PROJECTS_ROOT}/jsp_core diff --git a/devfiles/jsp_core/sh2-hsb7616it/devfile.yaml b/devfiles/jsp_core/sh2-hsb7616it/devfile.yaml index 48028c1c4..f9892de44 100644 --- a/devfiles/jsp_core/sh2-hsb7616it/devfile.yaml +++ b/devfiles/jsp_core/sh2-hsb7616it/devfile.yaml @@ -19,19 +19,23 @@ commands: actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core/cfg && make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + command: make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core/cfg - name: "configure sample1" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && ./configure -C sh2 -S hsb7616it + command: ./configure -C sh2 -S hsb7616it + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "make depend" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make depend TARGET=sh-pizzafactory-elf && echo && echo Done. + command: make depend TARGET=sh-pizzafactory-elf && echo && echo Done. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "build JSP kernel" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make TARGET=sh-pizzafactory-elf + command: make TARGET=sh-pizzafactory-elf + workdir: ${CHE_PROJECTS_ROOT}/jsp_core diff --git a/devfiles/jsp_core/sh3-ms7727cp01/devfile.yaml b/devfiles/jsp_core/sh3-ms7727cp01/devfile.yaml index 8f186c241..88e1cd166 100644 --- a/devfiles/jsp_core/sh3-ms7727cp01/devfile.yaml +++ b/devfiles/jsp_core/sh3-ms7727cp01/devfile.yaml @@ -19,19 +19,23 @@ commands: actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core/cfg && make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + command: make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core/cfg - name: "configure sample1" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && ./configure -C sh3 -S ms7727cp01 + command: ./configure -C sh3 -S ms7727cp01 + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "make depend" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make depend TARGET=sh-pizzafactory-elf && echo && echo Done. + command: make depend TARGET=sh-pizzafactory-elf && echo && echo Done. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "build JSP kernel" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make TARGET=sh-pizzafactory-elf + command: make TARGET=sh-pizzafactory-elf + workdir: ${CHE_PROJECTS_ROOT}/jsp_core diff --git a/devfiles/jsp_core/sh3-solution_engine/devfile.yaml b/devfiles/jsp_core/sh3-solution_engine/devfile.yaml index 9f74a2717..b7198b79a 100644 --- a/devfiles/jsp_core/sh3-solution_engine/devfile.yaml +++ b/devfiles/jsp_core/sh3-solution_engine/devfile.yaml @@ -19,19 +19,23 @@ commands: actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core/cfg && make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + command: make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core/cfg - name: "configure sample1" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && ./configure -C sh3 -S solution_engine + command: ./configure -C sh3 -S solution_engine + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "make depend" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make depend TARGET=sh-pizzafactory-elf && echo && echo Done. + command: make depend TARGET=sh-pizzafactory-elf && echo && echo Done. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "build JSP kernel" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make TARGET=sh-pizzafactory-elf + command: make TARGET=sh-pizzafactory-elf + workdir: ${CHE_PROJECTS_ROOT}/jsp_core diff --git a/devfiles/jsp_core/v850-tk850_kj1/devfile.yaml b/devfiles/jsp_core/v850-tk850_kj1/devfile.yaml index e39b84323..06f517189 100644 --- a/devfiles/jsp_core/v850-tk850_kj1/devfile.yaml +++ b/devfiles/jsp_core/v850-tk850_kj1/devfile.yaml @@ -19,19 +19,23 @@ commands: actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core/cfg && make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + command: make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core/cfg - name: "configure sample1" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && ./configure -C v850 -S tk850_kj1 + command: ./configure -C v850 -S tk850_kj1 + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "make depend" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make depend TARGET=v850-pizzafactory-elf && echo && echo Done. + command: make depend TARGET=v850-pizzafactory-elf && echo && echo Done. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "build JSP kernel" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make TARGET=v850-pizzafactory-elf + command: make TARGET=v850-pizzafactory-elf + workdir: ${CHE_PROJECTS_ROOT}/jsp_core diff --git a/devfiles/jsp_core/v850-tk850_sg2/devfile.yaml b/devfiles/jsp_core/v850-tk850_sg2/devfile.yaml index 008b02d9a..691f976d6 100644 --- a/devfiles/jsp_core/v850-tk850_sg2/devfile.yaml +++ b/devfiles/jsp_core/v850-tk850_sg2/devfile.yaml @@ -19,19 +19,23 @@ commands: actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core/cfg && make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + command: make CC=gcc-4.7 CXX=g++-4.7 && echo && echo Build complete. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core/cfg - name: "configure sample1" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && ./configure -C v850 -S tk850_sg2 + command: ./configure -C v850 -S tk850_sg2 + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "make depend" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make depend TARGET=v850-pizzafactory-elf && echo && echo Done. + command: make depend TARGET=v850-pizzafactory-elf && echo && echo Done. + workdir: ${CHE_PROJECTS_ROOT}/jsp_core - name: "build JSP kernel" actions: - type: exec component: pizza-dev - command: cd ${CHE_PROJECTS_ROOT}/jsp_core && make TARGET=v850-pizzafactory-elf + command: make TARGET=v850-pizzafactory-elf + workdir: ${CHE_PROJECTS_ROOT}/jsp_core diff --git a/devfiles/nodejs-mongo/devfile.yaml b/devfiles/nodejs-mongo/devfile.yaml index 3348523d3..fac091c8e 100644 --- a/devfiles/nodejs-mongo/devfile.yaml +++ b/devfiles/nodejs-mongo/devfile.yaml @@ -4,10 +4,10 @@ metadata: generateName: nodejs-mongo- projects: - - name: nodejs-mongodb-app + name: nodejs-mongodb-sample source: type: git - location: "/~https://github.com/gothinkster/node-express-realworld-example-app" + location: "/~https://github.com/che-samples/nodejs-mongodb-sample" components: - type: chePlugin @@ -23,17 +23,15 @@ components: value: 220fd770-c028-480d-8f95-f84353c7d55a - name: NODE_ENV value: production - - name: MONGODB_URI - value: mongodb://user:password@mongo/db memoryLimit: 512Mi endpoints: - name: 'nodejs' - port: 3000 + port: 8080 mountSources: true - type: dockerimage alias: mongo - image: centos/mongodb-34-centos7 + image: docker.io/centos/mongodb-34-centos7 memoryLimit: 512Mi env: - name: MONGODB_USER @@ -41,30 +39,38 @@ components: - name: MONGODB_PASSWORD value: password - name: MONGODB_DATABASE - value: db + value: guestbook - name: MONGODB_ADMIN_PASSWORD value: password volumes: - name: mongo-storage containerPath: /var/lib/mongodb/data endpoints: - - name: mongo + - name: mongodb-34-centos7 port: 27017 attributes: discoverable: 'true' public: 'false' commands: - - name: run the web app + name: run the application actions: - - type: exec - component: nodejs - command: npm install && npm run dev - workdir: ${CHE_PROJECTS_ROOT}/nodejs-mongodb-app + - type: exec + component: nodejs + command: npm install && node --inspect=9229 app.js + workdir: ${CHE_PROJECTS_ROOT}/nodejs-mongodb-sample - - name: create test user + name: Debug remote node application actions: - - type: exec - component: nodejs - command: | - curl -X POST --data '{"user": {"username": "test", "email": "test@test.com", "password": "password"}}' -H "Content-Type: application/json" http://localhost:3000/api/users + - type: vscode-launch + referenceContent: | + { + "version": "0.2.0", + "configurations": [ + { + "type": "node", + "name": "Debug (Attach) - Remote", + "request": "attach", + "port": 9229 + }] + } diff --git a/devfiles/nodejs/devfile.yaml b/devfiles/nodejs/devfile.yaml index ffef54804..a55c31e6f 100644 --- a/devfiles/nodejs/devfile.yaml +++ b/devfiles/nodejs/devfile.yaml @@ -68,7 +68,7 @@ commands: "address": "localhost", "port": 9229, "localRoot": "${workspaceFolder}", - "remoteRoot": "#{workspaceFolder}" + "remoteRoot": "${workspaceFolder}" } ] } diff --git a/devfiles/php-laravel/devfile.yaml b/devfiles/php-laravel/devfile.yaml index 841367f92..63dfc47a0 100644 --- a/devfiles/php-laravel/devfile.yaml +++ b/devfiles/php-laravel/devfile.yaml @@ -32,7 +32,7 @@ components: - type: dockerimage alias: mysql - image: centos/mysql-57-centos7 + image: docker.io/centos/mysql-57-centos7 env: - name: MYSQL_USER value: homestead diff --git a/devfiles/php-mysql/devfile.yaml b/devfiles/php-mysql/devfile.yaml index abfa8ca1f..a41f84d82 100644 --- a/devfiles/php-mysql/devfile.yaml +++ b/devfiles/php-mysql/devfile.yaml @@ -32,7 +32,7 @@ components: - type: dockerimage alias: mysql - image: centos/mysql-57-centos7 + image: docker.io/centos/mysql-57-centos7 env: - name: MYSQL_USER value: user diff --git a/devfiles/php-symfony/devfile.yaml b/devfiles/php-symfony/devfile.yaml index 8bca073e8..fb9ff0b8c 100644 --- a/devfiles/php-symfony/devfile.yaml +++ b/devfiles/php-symfony/devfile.yaml @@ -34,7 +34,7 @@ components: - type: dockerimage alias: mysql - image: centos/mysql-57-centos7 + image: docker.io/centos/mysql-57-centos7 env: - name: MYSQL_USER value: db_user diff --git a/devfiles/php-web-simple/devfile.yaml b/devfiles/php-web-simple/devfile.yaml index 16989d6d1..3dbdf53b3 100644 --- a/devfiles/php-web-simple/devfile.yaml +++ b/devfiles/php-web-simple/devfile.yaml @@ -61,3 +61,23 @@ commands: else echo "DocumentRoot already configured!" fi +- + name: Debug current file + actions: + - type: vscode-launch + referenceContent: | + { + "version": "0.2.0", + "configurations": [ + { + "name": "Launch currently open script", + "type": "php", + "request": "launch", + "program": "${file}", + "stopOnEntry": true, + "cwd": "${fileDirname}", + "port": 9000, + "runtimeExecutable": "php" + } + ] + }