-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
init not working as expected with pre-build #4838
Comments
/schedule |
Same Issue. When creating a new workspace with extension no task is running. tasks:
- name: Run Client
before: cd client
init: yarn install
command: yarn start
env:
DANGEROUSLY_DISABLE_HOST_CHECK: true
openMode: tab-after
- name: Run Server
init: npm install
command: npm run server
openMode: tab-after
vscode:
extensions:
- formulahendry.auto-close-tag
- coenraads.bracket-pair-colorizer
- pkief.material-icon-theme
- eamodio.gitlens
- usernamehw.errorlens
- >-
https://marketplace.visualstudio.com/_apis/public/gallery/publishers/eg2/vsextensions/tslint/1.0.47/vspackage
ports:
- port: 3000
onOpen: open-browser
visibility: public
- port: 4000
onOpen: ignore
visibility: public |
Update: After removing |
is 'env' a useable option? Have you tried the command: |
https://www.gitpod.io/docs/references/gitpod-yml#tasksnenv I did other workaround in |
/assign |
@jmcelreavey I'm afraid I cannot re-produce the issue. The repository you linked behaves as intended: the init task gets run during the prebuild, and is not re-executed when the workspace starts. Note: we modify the terminal history to make it look like the task just ran. You can tell that the command ran as part of the prebuild because the log output appears before
To make sure this behaviour doesn't break in the future (and as one more step to verify the correct behaviour), I've written a bunch of unit tests: #4903 |
@faisal-m16 Unfortunately prebuilds don't give a whole lot of feedback when the |
Bug description
I currently have the following logic in place:
This works perfectly, however, the documentation is telling me
prebuild
has been deprecated and I should replace it withinit
however when I do this it doesn't rebuild the init step, it runs during startup.Steps to reproduce
Gitpod up the repository:
https://gitpod.io/#https://github.com/jmcelreavey/dev-job
Expected behavior
I would expect the GitHub pre-build functionality to see the init and run it prior to me starting the workspace
Example repository
https://github.com/jmcelreavey/dev-job
Anything else?
No response
The text was updated successfully, but these errors were encountered: