Skip to content

Commit

Permalink
Merge branch 'main' into investigate-che-20822
Browse files Browse the repository at this point in the history
  • Loading branch information
musienko-maxim committed Dec 8, 2021
2 parents 00ea03c + fcb04b7 commit 33097e6
Show file tree
Hide file tree
Showing 14 changed files with 2,724 additions and 49 deletions.
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ body:
label: Che version
description: if workspace is running, version can be obtained with help/about menu
options:
- "7.39@latest"
- "7.40@latest"
- "next (development version)"
- "7.39"
- "7.38"
- "7.37"
- "7.36"
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/next-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,9 @@ jobs:
set -xe
SHORT_SHA1=$(git rev-parse --short HEAD)
echo ::set-output name=short_sha1::${SHORT_SHA1}
echo "Copying source code to dockerfile directory"
cp -r "tests/e2e" "dockerfiles/e2e/e2e"
docker build -t quay.io/eclipse/che-e2e:next dockerfiles/e2e/
cd tests/e2e
docker build -t quay.io/eclipse/che-e2e:next -f build/dockerfiles/Dockerfile .
docker tag quay.io/eclipse/che-e2e:next quay.io/eclipse/che-e2e:${SHORT_SHA1}
- name: Push docker images
run: |
Expand Down
84 changes: 84 additions & 0 deletions .github/workflows/release-changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
#
# Copyright (c) 2021 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#

name: Release changelog

on:
push:
tags:
- '7.*'
workflow_dispatch:
inputs:
version:
description: 'The version that is going to be released. Should be in format 7.y.z'
required: true
default: ''
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up GH checkout and tokens
run: |
git config --global user.name "Mykhailo Kuznietsov"
git config --global user.email "mkuznets@redhat.com"
git config --global push.default matching
export GITHUB_TOKEN=${{ secrets.CHE_BOT_GITHUB_TOKEN }}
export CHE_BOT_GITHUB_TOKEN=${{ secrets.CHE_BOT_GITHUB_TOKEN }}
- name: Create changelog
id: generate-release-changelog
# wrapper for https://github.com/github-changelog-generator/github-changelog-generator
uses: heinrichreimer/github-changelog-generator-action@v2.2
env:
GITHUB_TOKEN: ${{ secrets.CHE_BOT_GITHUB_TOKEN }}
CHANGELOG_GITHUB_TOKEN: ${{ secrets.CHE_BOT_GITHUB_TOKEN }}
with:
repo: eclipse/che
# output: CHANGELOG-next.md
dateFormat: "%Y-%m-%d"
onlyLastTag: "true"
stripHeaders: "true"
stripGeneratorNotice: "true"
maxIssues: 200
verbose: true
releaseBranch: main # TODO: change to main
dueTag: ${{ github.event.inputs.version }} # all issues up to the current release tag
filterByMilestone: false # this requires that we get good at setting milestone when something is actually DONE rather than when we think it'll be done
pullRequests: false # only include issues, not PRs, since PRs span multiple repos and are too noisy to include
issuesWoLabels: false # no labels? no logged change
issues: true
# issueLineLabels: "ALL" # doesn't work - /usr/local/bundle/gems/github_changelog_generator-1.15.2/lib/github_changelog_generator/generator/section.rb:52:in `get_string_for_issue': undefined method `line_labels_for' for #<GitHubChangelogGenerator::Section:0x00005608809a9988> (NoMethodError)
compareLink: false
unreleased: true # show unreleased, but closed items
addSections: '{"sprint/current-sprint":{"prefix":"**Issues in Current Sprint:**","labels":["sprint/current-sprint"]}, "new&noteworthy":{"prefix":"**New and Noteworthy Issues:**","labels":["new&noteworthy"]}}'
excludeTags: '' # comma,delimited,list,of,tags
# includeLabels: ''
excludeLabels: "kind/release"
enhancementLabel: "Enhancements, Epics, and UX"
enhancementLabels: "kind/enhancement,kind/epic,kind/ux"
bugsLabel: "Bugs fixed"
bugLabels: "kind/bug"
token: ${{ secrets.CHE_BOT_GITHUB_TOKEN }}
- name: Create GH Release
id: create_release
uses: ncipollo/release-action@v1.8.0
env:
GITHUB_TOKEN: ${{ secrets.CHE_BOT_GITHUB_TOKEN }}
with:
allowUpdates: true
body: ${{ steps.generate-release-changelog.outputs.changelog }}
draft: false
name: Eclipse Che ${{ github.event.inputs.version }}
omitBodyDuringUpdate: false
omitNameDuringUpdate: false
prerelease: false
tag: ${{ github.event.inputs.version }}
token: ${{ secrets.CHE_BOT_GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ jobs:
fetch-depth: 0
-
name: Check existing tags
if: github.event.inputs.forceRecreateTags == 'true'
run: |
set +e
RECREATE_TAGS=${{ github.event.inputs.forceRecreateTags }}
Expand All @@ -42,6 +41,7 @@ jobs:
if [[ ${RECREATE_TAGS} == "true" ]]; then
echo "[INFO] Removing tag for ${VERSION} version. New tag will be recreated during release."
git push origin :$VERSION
git tag -d || true
else
echo "[ERROR] Cannot proceed with release - tag ${EXISTING_TAG} already exists."
exit 1
Expand Down
55 changes: 55 additions & 0 deletions .github/workflows/typescript-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#
# Copyright (c) 2021 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#

name: typescript-publish-next

on:
workflow_dispatch:
push:
branches:
- main
- 7.**.x
paths:
- 'tests/e2e/**'
- '.github/workflows/typescript-publish.yml'

jobs:
publish:
runs-on: ubuntu-20.04
steps:
- uses: actions/setup-node@v1
with:
node-version: '12'
registry-url: 'https://registry.npmjs.org'
scope: '@eclipse-che'
- name: Clone source code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: publish
env:
NODE_AUTH_TOKEN: ${{secrets.CHE_NPM_AUTH_TOKEN}}
run: |
if [[ ${GITHUB_REF##*/} == "7."**".x" ]]; then
echo "[INFO] using ${GITHUB_REF##*/} tag"
DIST_TAG=${GITHUB_REF##*/}
else
echo "[INFO] using "next" tag"
DIST_TAG=next
fi
cd tests/e2e
npm ci && npm run tsc
SHORT_SHA1=$(git rev-parse --short=7 HEAD)
CURRENT_VERSION=$(sed -r 's/(.*)-SNAPSHOT/\1/' ../../VERSION)
NEW_VERSION="${CURRENT_VERSION}-dev-${SHORT_SHA1}"
sed -i -r -e "s/(\"version\": )(\".*\")/\1\"$NEW_VERSION\"/" package.json
npm publish --tag $DIST_TAG
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.40.0-SNAPSHOT
7.41.0-SNAPSHOT
16 changes: 8 additions & 8 deletions make-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ bump_version () {
echo "Updating project version to ${NEXT_VERSION}"
echo "${NEXT_VERSION}" > VERSION

cd tests/e2e
pushd tests/e2e >/dev/null || exit
npm --no-git-tag-version version --allow-same-version "${NEXT_VERSION}"
sed_in_place -r -e "/@eclipse-che\/api|@eclipse-che\/workspace-client|@eclipse-che\/workspace-telemetry-client/!s/(\"@eclipse-che\/..*\": )(\".*\")/\1\"$VERSION\"/" package.json
cd ..
git add VERSION package.json
popd >/dev/null || exit

COMMIT_MSG="chore: Bump to ${NEXT_VERSION} in ${BUMP_BRANCH}"
git commit -asm "${COMMIT_MSG}"
git pull origin "${BUMP_BRANCH}"
Expand Down Expand Up @@ -152,12 +152,11 @@ set -e

# change VERSION file
echo "${VERSION}" > VERSION
git add VERSION

cd tests/e2e
pushd tests/e2e >/dev/null || exit
sed_in_place -r -e "/@eclipse-che\/api|@eclipse-che\/workspace-client|@eclipse-che\/workspace-telemetry-client/!s/(\"@eclipse-che\/..*\": )(\".*\")/\1\"$VERSION\"/" package.json
npm --no-git-tag-version version --allow-same-version "${VERSION}"
cd ../..
popd >/dev/null || exit

echo "Copying source code to dockerfile directory"
cp -r "tests/e2e" "dockerfiles/e2e/e2e"
Expand All @@ -170,11 +169,12 @@ docker push quay.io/eclipse/che-e2e:latest
# update template in the release tag
update_issue_template "${VERSION}" "${ISSUE_TEMPLATE_FILE}"

COMMIT_MSG="chore: Release ${VERSION}"
git commit -asm "${COMMIT_MSG}"

# tag the release
git tag "${VERSION}"
git push origin "${VERSION}"
COMMIT_MSG="chore: Release ${VERSION}"
git commit -asm "${COMMIT_MSG}"

# now update ${BASEBRANCH} to the new snapshot version
git checkout "${BASEBRANCH}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ RUN apt-get update && apt-get install && \
npm install -g typescript && \
apt-get install x11vnc ffmpeg -y

COPY --chown=0:0 entrypoint.sh /tmp/
COPY --chown=0:0 build/dockerfiles/entrypoint.sh /tmp/

RUN mkdir /tmp/e2e && \
chmod -R 777 /tmp/e2e

RUN sed -i "s/nodaemon=true/nodaemon=false/" /etc/supervisord.conf

COPY e2e/package.json e2e/package-lock.json /tmp/e2e/
COPY package.json package-lock.json /tmp/e2e/

RUN cd /tmp/e2e && \
npm --silent i

COPY e2e /tmp/e2e
COPY . /tmp/e2e

WORKDIR /tmp/e2e

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ installed Docker on your machine.
These tests serves for testing Che 7 happy path. You can see description about these tests here: https://github.com/eclipse/che/tree/master/tests/e2e.

## How to run it
The easiest way is to run them via Docker. To build locally you have go to ` dockerfiles ` folder and execute following command:
The easiest way is to run them via Docker. To build locally you have to execute the following command:

```
./e2e/build.sh
docker build -f build/dockerfiles/Dockerfile -t eclipse/che-e2e:next .
```
This command builds docker image named ` eclipse/che-e2e:nightly `. This image is build nightly and pushed to registry, so you don't have to build that image locally.
You can run the tests inside this docker image. You have to set URL of running Che and increase shared memory size (low shared memory makes chrome driver crash).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ do
done

# Print information about launching tests
if mount | grep 'e2e'; then
if mount | grep 'e2e' && ! mount | grep 'e2e/report'; then
echo "The local code is mounted. Executing local code."
cd /tmp/e2e || exit
npm install
Expand Down
File renamed without changes.
Loading

0 comments on commit 33097e6

Please sign in to comment.