Pipeline just started, and then found FATAL: file does not exist. And don't have any clues about the file was referred.
The file is fresh generated, and then I modified a bit on chmod +x mvnw for other error I found before on Google. But it's not related.
.gitlab-ci.yml and push to the repository5.8.2
[email protected] C:\sandbox\my-project
`-- [email protected]
##### **JHipster configuration, a `.yo-rc.json` file generated in the root folder**
{
"generator-jhipster": {
"promptValues": {
"packageName": "com.comp.proj",
"nativeLanguage": "ja"
},
"jhipsterVersion": "5.8.2",
"applicationType": "monolith",
"baseName": "my-project",
"packageName": "com.comp.proj",
"packageFolder": "com/comp/proj,
"serverPort": "8080",
"authenticationType": "jwt",
"cacheProvider": "ehcache",
"enableHibernateCache": true,
"websocket": false,
"databaseType": "sql",
"devDatabaseType": "postgresql",
"prodDatabaseType": "postgresql",
"searchEngine": "elasticsearch",
"messageBroker": false,
"serviceDiscoveryType": "eureka",
"buildTool": "maven",
"enableSwaggerCodegen": false,
"jwtSecretKey": "bXktc2VjcmV0LXRva2VuLXRvLWNoYW5nZS1pbi1wcm9kdWN0aW9uLWFuZC10by1rZWVwLWluLWEtc2VjdXJlLXBsYWNl",
"clientFramework": "angularX",
"useSass": false,
"clientPackageManager": "npm",
"testFrameworks": ["gatling"],
"jhiPrefix": "jhi",
"entitySuffix": "",
"dtoSuffix": "DTO",
"otherModules": [],
"enableTranslation": true,
"nativeLanguage": "ja",
"languages": ["ja", "en"]
}
}
entityName.json files generated in the .jhipster directory
JDL entity definitions
java version "1.8.0_201"
Java(TM) SE Runtime Environment (build 1.8.0_201-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode)
git version 2.21.0.windows.1
node: v11.10.1
npm: 6.9.0
Windows 10 (1809 update), Chrome, but the issue might not related.
@xenogew Can you create a public sample repository on Gitlab with same error produced?
@pmverma Sure, here jHipster-Gitlab-CICD-failed
And here for log jHip-n-CICD-Log
Can you try the trick with making the wrappet executable? The fatal file not found doesn't fail the build. It tries to extract the cache which of course doesn't exist for a first build yet. But I will check later too.
@atomfrede pardon, but I can't get your suggestion. Can you please describe more in specific command or method I need to do?
Does it related to JHipster cache I chose the choice, when first generated project?
No. I am talking about the gitlab ci cache. Give me a minute.
I have forked and tested.
It is related to permission issue.
Have a detail look at log https://gitlab.com/pmverma/gitlabcibug/-/jobs/173964839
User jhipster can not execute root files.
Pasting the log if repo get deleted.
[0KRunning with gitlab-runner 11.8.0 (4745a6f3)
[0;m[0K on docker-auto-scale 72989761
[0;m[0KUsing Docker executor with image jhipster/jhipster:v5.8.1 ...
[0;m[0KPulling docker image jhipster/jhipster:v5.8.1 ...
[0;m[0KUsing docker image sha256:748c8a298c696c8ca68cb5f2fe90a64962731584685018ae96a6e41319352eef for jhipster/jhipster:v5.8.1 ...
[0;msection_start:1552023422:prepare_script
[0KRunning on runner-72989761-project-11212949-concurrent-0 via runner-72989761-srm-1552023318-3d684673...
section_end:1552023427:prepare_script
[0Ksection_start:1552023427:get_sources
[0K[32;1mCloning repository...[0;m
Cloning into '/builds/pmverma/gitlabcibug'...
[32;1mChecking out daf5b80e as master...[0;m
[32;1mSkipping Git submodules setup[0;m
section_end:1552023428:get_sources
[0Ksection_start:1552023428:restore_cache
[0K[32;1mChecking cache for master...[0;m
[31;1mFATAL: file does not exist [0;m
[0;33mFailed to extract cache[0;m
section_end:1552023429:restore_cache
[0Ksection_start:1552023429:download_artifacts
[0Ksection_end:1552023431:download_artifacts
[0Ksection_start:1552023431:build_script
[0K[32;1m$ whoami[0;m
jhipster
[32;1m$ ls -ltr *[0;m
-rw-rw-rw-. 1 root root 2854 Mar 8 05:37 tslint.json
-rw-rw-rw-. 1 root root 742 Mar 8 05:37 tsconfig.json
-rw-rw-rw-. 1 root root 799 Mar 8 05:37 tsconfig-aot.json
-rw-rw-rw-. 1 root root 117 Mar 8 05:37 proxy.conf.json
-rw-rw-rw-. 1 root root 74 Mar 8 05:37 postcss.config.js
-rw-rw-rw-. 1 root root 55343 Mar 8 05:37 pom.xml
-rw-rw-rw-. 1 root root 5142 Mar 8 05:37 package.json
-rw-rw-rw-. 1 root root 799328 Mar 8 05:37 package-lock.json
-rw-rw-rw-. 1 root root 5810 Mar 8 05:37 mvnw.cmd
-rw-rw-rw-. 1 root root 9113 Mar 8 05:37 mvnw
-rw-rw-rw-. 1 root root 986 Mar 8 05:37 angular.json
-rw-rw-rw-. 1 root root 7059 Mar 8 05:37 README.md
webpack:
total 52
-rw-rw-rw-. 1 root root 4306 Mar 8 05:37 webpack.prod.js
-rw-rw-rw-. 1 root root 4413 Mar 8 05:37 webpack.dev.js
-rw-rw-rw-. 1 root root 3964 Mar 8 05:37 webpack.common.js
-rw-rw-rw-. 1 root root 1305 Mar 8 05:37 utils.js
-rw-rw-rw-. 1 root root 4459 Mar 8 05:37 logo-jhipster.png
src:
total 16
drwxrwxrwx. 6 root root 4096 Mar 8 05:37 test
drwxrwxrwx. 7 root root 4096 Mar 8 05:37 main
[32;1m$ pwd[0;m
/builds/pmverma/gitlabcibug
[32;1m$ export MAVEN_USER_HOME=`pwd`/.maven[0;m
[32;1m$ ./mvnw com.github.eirslett:frontend-maven-plugin:install-node-and-npm -DnodeVersion=v10.15.0 -DnpmVersion=6.4.1 -Dmaven.repo.local=$MAVEN_USER_HOME[0;m
/bin/bash: line 82: ./mvnw: Permission denied
section_end:1552023433:build_script
[0Ksection_start:1552023433:after_script
[0Ksection_end:1552023434:after_script
[0Ksection_start:1552023434:upload_artifacts_on_failure
[0Ksection_end:1552023436:upload_artifacts_on_failure
[0K[31;1mERROR: Job failed: exit code 1
[0;m
Exactly. The wrapper files are executable in our repository and I use gitlab ci a lot and it worked without any problems (for gradle). Has it something to do with using windows as client os (maybe it overwrites the executable flag?)
@atomfrede As you can see there is no execute permission so I doubt even root can not run ./mvnw.
You are right. Seen it too. Mh maybe something with the latest update of the ci runner infrastruture?
@xenogew Can you make the wrapper files executable via windows? If you can it works just fine https://gitlab.com/atomfrede/gitlabcibug/-/jobs/173967808
Exactly. The wrapper files are executable in our repository and I use gitlab ci a lot and it worked without any problems (for gradle). Has it something to do with using windows as client os (maybe it overwrites the executable flag?)
Sorry I am wrong! the unix maven wrapper is not marked executable in our repository Sorry my bad.
@atomfrede Apologize, but I don't get the meaning and the term of "make wrapper files executable", do you have any hint or link to let me understand?
Try git update-index --chmod=+x mvnw such that the file is marked as executable and commit & push to your git repository again.
@atomfrede did it, but still same
ci-cd after git update-index --chmod=+x mvnw
Sorry, forgot to tell you to remove chmod +x mvnw from the before_script of your your gitlab ci config.
I see the build is running. Will check why the wrapper is not executable by default on another machine without my develop environment for jhipster.
@atomfrede : it is not the 1st time we saw this issue. Maybe we can add some documentation at https://www.jhipster.tech/setting-up-ci/ ?
Yes will do it.
On Fri, Mar 8, 2019, 08:07 Pascal Grimaud notifications@github.com wrote:
@atomfrede https://github.com/atomfrede : it is not the 1st time we saw
this issue. Maybe we can add some documentation at
https://www.jhipster.tech/setting-up-ci/ ?—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/9391#issuecomment-470828678,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAMaiUT8dZJanjcg_20_Aq-9ZqTLQsVVks5vUgw3gaJpZM4bkeE4
.
@pascalgrimaud should (or can) we make the generator call git update-index --chmod=+x mvnw at the end to make sure the wrapper is executable?
I think it's a good idea, we can try