Closed vdelendik closed 4 years ago
+ ./gradlew clean /home/.../onPush-..._tmp/durable-04da73ba/script.sh: 1: /home/jenkins/agent/workspace/..._tmp/durable-04da73ba/script.sh: ./gradlew: not found
it should be fixed in 5.2 @sandinosanchez, please provide test steps
feature delivered in #869
Environment:
infra-branch: develop
Objective:
Verify that the execution of gradle builds works with gradlew from the repository and gradle embedded tool from the infra.
Pre-conditions:
Follow the steps(./zebrunner.sh stop if you have a running instance): 1.1. cd jenkins 1.2. nano .env 1.3. change TAG_JENKINS_SLAVE=latest-alpine > TAG_JENKINS_SLAVE=latest-alpine-jdk11 1.4. cd .. && ./zebrunner.sh start
Go to jenkins > Manage jenkins > Global Properties > Add the following params: 2.1. GITHUB_HOST = gitlab.com 2.2. GITHUB_ORGANIZATION = sandino320 2.3. GITHUB_API_URL = https://gitlab/api/v4 2.4. GITHUB_HTML_URL = https://gitlab.com/sandino320/iam-service
Run RegistterOrganization with orgName = sandino320
Run RegisterRepository with:
Test scenario 1:
Test scenario 2:
Expected results:
Test Scenario 1:
[INFO] gradleBuild->call
[Pipeline] fileExists
[Pipeline] tool
Unpacking https://services.gradle.org/distributions/gradle-6.3-bin.zip to /opt/jenkins/tools/hudson.plugins.gradle.GradleInstallation/G6 on jenkins-slave
[Pipeline] isUnix
[Pipeline] withGradle
[Pipeline] {
[Pipeline] sh
+ /opt/jenkins/tools/hudson.plugins.gradle.GradleInstallation/G6/bin/gradle clean '-Dsonar.host.url=http://54.197.68.167:80/sonarqube' '-Dsonar.log.level=INFO' '-Dsonar.projectVersion=1' '-Dsonar.branch.name=master' sonarqube
Welcome to Gradle 6.3!
**Test Scenario 2:**
1. onPushJob executed successfully. On the onPush logs look for the following:
[INFO] gradleBuild->call [Pipeline] fileExists [Pipeline] isUnix [Pipeline] withGradle [Pipeline] { [Pipeline] sh
git rev-parse --is-inside-work-tree # timeout=10 git config remote.origin.url https://gitlab.com/sandino320/iam-service # timeout=10 Fetching upstream changes from https://gitlab.com/sandino320/iam-service git --version # timeout=10 git fetch --no-tags --force --progress -- https://gitlab.com/sandino320/iam-service +refs/heads/develop:refs/remotes/origin/develop # timeout=15 git rev-parse origin/develop^{commit} # timeout=10 git config core.sparsecheckout # timeout=10 git checkout -f a5e06157bc9df4f0109b2a2490a047f7fcc9d1d4 # timeout=15 .........10%..........20%..........30%..........40%.........50%..........60%..........70%..........80%.........90%..........100% Welcome to Gradle 6.5!
P.S: recommend to run git stash after testing for removing the changes made in step 1.3 of the pre-conditions to avoid any conflicts when pulling
Fixed: Environment:
Test Scenario 1:
Used onPushJob with branch = master onPushJob executed successfully
Test Scenario 2:
Used onPushJob with branch = develop onPushJob executed successfully.
We have gradle tool enabled by default. it should be used if no gradlew wrapper in the repo