Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

chore(tasks): use default shell instead of hardcoded one #1243

Closed
wants to merge 1 commit into from

Conversation

vitaliy-guliy
Copy link
Contributor

@vitaliy-guliy vitaliy-guliy commented Nov 1, 2021

Signed-off-by: Vitaliy Gulyy [email protected]

What does this PR do?

When executing command, switches to using the default shell, as it configured in /etc/passws.

Screenshot/screencast of this PR

Screenshot explaining the problem
Screenshot from 2021-10-27 18-02-20

What issues does this PR fix or reference?

eclipse-che/che#20699

How to test this PR?

  • create a workspace with following
devfile
---
apiVersion: 1.0.0
metadata:
  name: java-guestbook-dev-environment

projects:
  - name: java-guestbook
    source:
      type: git
      location: "https://github.com/vitaliy-guliy/java-guestbook.git"
      branch: master

components:
  - type: cheEditor
    alias: che-theia
    reference: https://raw.githubusercontent.com/chepullreq4/pr-check-files/master/che-theia/pr-1243/che_theia_meta.yaml
    memoryLimit: 512Mi

  -
    type: chePlugin
    id: redhat/java8/latest

  -
    type: dockerimage
    alias: maven
    # image: quay.io/eclipse/che-java8-maven:ce0526f
    image: quay.io/devfile/universal-developer-image:ubi8-112f94a
    env:
    - name: MAVEN_CONFIG
      value: ""
    - 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
    - name: debug
      attributes:
        public: 'false'
      port: 5005
    volumes:
    - name: m2
      containerPath: /home/user/.m2

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"
  • run maven build backend command
  • pay attention which shell is used for tasks

PR Checklist

As the author of this Pull Request I made sure that:

Reviewers

Reviewers, please comment how you tested the PR when approving it.

Happy Path Channel

HAPPY_PATH_CHANNEL=next

@codecov
Copy link

codecov bot commented Nov 1, 2021

Codecov Report

Merging #1243 (0685251) into main (c299f59) will decrease coverage by 0.04%.
The diff coverage is 27.05%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1243      +/-   ##
==========================================
- Coverage   32.78%   32.74%   -0.05%     
==========================================
  Files         290      296       +6     
  Lines        9885     9852      -33     
  Branches     1457     1325     -132     
==========================================
- Hits         3241     3226      -15     
+ Misses       6641     6622      -19     
- Partials        3        4       +1     
Impacted Files Coverage Δ
...theia-about/src/browser/about-che-theia-dialog.tsx 0.00% <0.00%> (ø)
...credentials/src/browser/che-credentials-service.ts 0.00% <0.00%> (ø)
...entials/src/browser/credentials-frontend-module.ts 0.00% <0.00%> (ø)
...eia-credentials/src/common/credentials-protocol.ts 0.00% <0.00%> (ø)
...eia-credentials/src/node/che-credentials-server.ts 0.00% <0.00%> (ø)
...s/src/node/che-theia-credentials-backend-module.ts 0.00% <0.00%> (ø)
...rowser/src/browser/che-mini-browser-environment.ts 0.00% <0.00%> (ø)
...ia-plugin-remote/src/node/hosted-plugin-service.ts 0.00% <0.00%> (ø)
...in-remote/src/node/plugin-remote-backend-module.ts 0.00% <0.00%> (ø)
...theia-plugin-remote/src/node/plugin-remote-init.ts 0.00% <0.00%> (ø)
... and 212 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a85b346...0685251. Read the comment docs.

@che-bot
Copy link
Contributor

che-bot commented Nov 1, 2021

✅ E2E Happy path tests succeed 🎉

Try Che-Theia editor only Try Che-Theia with Java/maven example Try Che-Theia with NodeJs example

See Details

name link
che-theia quay.io/crw_pr/che-theia:1243
che-theia-endpoint-runtime-binary quay.io/crw_pr/che-theia-endpoint-runtime-binary:1243

Test product:

  • Use comment "[crw-ci-test]" to rerun happy path E2E test.
  • Use comment "[crw-ci-test --rebuild]" to re-build the images and rerun happy path E2E test.

Eclipse Che QE channel: https://mattermost.eclipse.org/eclipse/channels/eclipse-che-qe

@vitaliy-guliy vitaliy-guliy deleted the use-default-shell branch November 3, 2021 17:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants