About Missing Remote File - gitlab-ci

When I run the pipeline, the Gitlab server alerts me that the remote YML file is missing, I used the Custom project CI config Path,(Setting => CI/CDL =>General pipelines=>Custom CI Config Path), below is my setup and error screen shot
Custom CI Config Path
Error Screnn Shot:Missing File

References to external YML are only supported in versions after Gitlab 12.6 after checking the official documentation

Related

CodePipeline ElasticBeanstalk [ERROR] An error occurred during execution of command [app-deploy] - [CheckProcfileForDotNetCoreApplication]

I've built a Code Pipeline (Source > Build > Deploy) and it's failing on the deploy step.
It's a Net Core 3.1 Api project.
I check the elastic beanstalk logs and I see:
2020/07/02 14:14:00.600060 [ERROR] An error occurred during execution of command [app-deploy] - [CheckProcfileForDotNetCoreApplication]. Stop running the command. Error: error stat /var/app/staging/MyApi/MyApi.dll: no such file or directory with file /var/app/staging/MyApi/MyApi.dll
As far as I know I have no control over /var/app/staging/ and this is built in AWS stuff?
The build step is working so I am unsure on this error.
My buildspec.yml is:
version: 0.2
phases:
build:
commands:
- dotnet publish -c release -o ./build_output ./MyApi/MyApi.csproj
artifacts:
files:
- '**/*'
base-directory: 'build_output'
This is the "zipfile/build_output" folder:
This is the zip file root folder:
These are the files in the build artifacts zip file that pipeline is using. The error says it cannot find MyAppName.dll (renamed to MyApi in the pic). It's there so I wonder why the problem.
Perhaps it doesnt like the folder structure in the zip file - see pic.
I had the same problem.
In my case, if the solution name and project name were different, I got the same error when I deployed the code from Visual Studio to Beanstalk, but when I added a project with the same name as the solution name and built it, I didn't get an error.
I suspect that there will be behavior during deployment that assumes the .dll file has the same name as the solution name.
Warning: This is a workaround, not a solution!
On the project that's failing to deploy, change the "Assembly name" in Project Properties / Application tab, to the name of the DLL it's missing (typically the solution name or the first period-separated part of the namespace).
i.e. "SLNNAME"
Then, redeploy your beanstalk app and it should work.
As Marcin correctly noticed, the indentation was incorrect for the "base-directory"
base-directory: 'build_output'
Should be
base-directory: 'build_output'
As others have noted, it is looking for only the first part of your project name .dll. In my case, my project and Assembly name were both UC.Web which yielded the error during deployment:
Error: error stat /var/app/staging/UC.dll: no such file or directory with file /var/app/staging/UC.dll
My solution that worked was I renamed my Assembly name from UC.Web to simply UC and it deployed successfully. While a solution for everyone, it is a workaround for the time being until Amazon fixes this.

Build from external GIT repo located in networkshare

I have problem to create service connection under TFS2015 Update2.
I have GIT remote REPO located in server and i access it by network share folder in this format:
\\server\GIT_REPOS\GIT_REPO_TO_BUILD_FROM\
I tried add new External GIT REPO Connection under TFS configuration as follow:
Connection name: Git repo
Server url: \\server\GIT_REPOS\GIT_REPO_TO_BUILD_FROM\
UserName: domain\username
Password: userPassword
When I try queue new build i get this error:
Failed to resolve path 'file://server/GIT_REPOS/GIT_REPO_TO_BUILD_FROM/': The filename, directory name, or volume label syntax is incorrect.
Prepare repository failed with exception.
Know someone correct way how to use it with network shared REPO ?
Thanks for help a lot.
According to website https://git-scm.com/book/ch4-1.html, Git supports Local protocol and can use the path to the repository as the URL, but in TFS build, local path isn't supported (I got the same error as you).
As an alternate, you need to publish your repo to a server. Meanwhile, you may consider submit a UserVoice at website https://visualstudio.uservoice.com/forums/121579-visual-studio-2015 to specify the requirement of supporting local git.

Jenkins: Error in Selenium Publish Report

I have properly configured the Seleniumhq plugin into Jenkins. I've also tried to run it in my local Jenkins and it worked. The problems I encounter are as follows:
suiteFile directory reads from C drive ONLY. Example, C:\TestSelenium\testSuite.html
When I try to specify the absolute path to my test suite (workspace), I get the error
The suiteFile is not a file or an url ! Check your build configuration.
Same thing happens with resultFile.
When I add post-build action "Publish Selenium Report," I'm getting an error because the newly created resultFile is saved into C:\TestResult\result.html and not in the workspace.

Using Sonarqube with Xcode

I am following this article to integrate SonarQube with Xcode and analyse Objective-C code. Though the setup is functional and getting no error/warnings after running the shell script, no violations are shown in the Dashboard. All i get to see is basic metrics like no. of lines of code, no. of files, etc.
Is there anyone who has tried this and guide me further.
In addition to the article you have specified above, I have few additions to that. You can follow the steps below,
Prerequisites:
Sonar
Sonar-runner
SonarQube Objective-C plugin (Licensed)
XCTool
OCLint (violations) and gcovr (code coverage)
MySql and JDK
Installation Steps:
Download and install MySql dmg. And then start the MySQL server from the System Preferences or via the command line or if restarted it has to be command line.
To start - sudo /usr/local/mysql/support-files/mysql.server start
To restart - sudo /usr/local/mysql/support-files/mysql.server restart
To stop - sudo /usr/local/mysql/support-files/mysql.server stop
Download and install latest JDK version.
Go to the terminal and enter the following commands to install the
prerequisites. (Homebrew is the package
management system for Mac Operating System. to install homebrew, enter the command -
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)")
Sonar - brew install sonar
Sonar-runner - brew install sonar-runner
XCTool - brew install xctool
OCLint - brew install oclint or
brew install https://gist.githubusercontent.com/TonyAnhTran/e1522b93853c5a456b74/raw/157549c7a77261e906fb88bc5606afd8bd727a73/oclint.rb for version 0.8.1(updated))
gcovr - brew install gcovr
Configuration:
- Set environment path of the Sonar:
export SONAR_HOME=/usr/local/Cellar/sonar-runner/2.4/libexec
export SONAR=$SONAR_HOME/bin
export PATH=$SONAR:$PATH
finally the command echo $SONAR_HOME should return the path - /usr/local/Cellar/sonar-runner/2.4/libexec
- Set up MySql DB:
export PATH=${PATH}:/usr/local/mysql/bin
mysql -u root;
CREATE DATABASE sonar_firstdb;
CREATE USER 'sonar'#'localhost' IDENTIFIED BY 'sonar';
GRANT ALL PRIVILEGES ON sonar_firstdb.* TO 'sonar'#'localhost';
FLUSH PRIVILEGES;
exit
- Set Sonar configuration settings:
vi /usr/local/Cellar/sonar/5.1.2/libexec/conf/sonar.properties
You can comment out most options except credentials and mysql and make sure that you enter the correct database name.
eg:
sonar.jdbc.url=jdbc:mysql://localhost:3306/**sonar_firstdb**?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true
.
vi /usr/local/Cellar/sonar-runner/2.4/libexec/conf/sonar-runner.properties
You can comment out most options except credentials and mysql and make sure that you enter the correct database name.
eg:
sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar_firstdb?useUnicode=true&characterEncoding=utf8
Start sonar using the command -
sonar start
The command will launch sonar so navigate to http://localhost:9000 in your browser of choice. Login (admin/admin) and have a look around.
Now you have to install the Objective-C or Swift plugin.
Move to Settings -> System -> Update Center -> Available Plugins (install the required plugin).
You have to restart the sonar to complete the installation once the pligin is added, And add license key once the plugin is installed.
through terminal go to the root directory of a project you want sonar to inspect, and create a project specific properties file with the following command:
vi sonar-project.properties
Add the following project specific properties and edit the bolded sections as per your project.
// Required configuration
sonar.projectKey=**com.payoda.wordsudoku**
sonar.projectName=**DragDrop**
sonar.projectVersion=**1.0**
sonar.language=**objc**
// Project description
sonar.projectDescription=**Sample description**
// Path to source directories
sonar.sources=**~/path to your project**
// Path to test directories (comment if no test)
//sonar.tests=testSrcDir
// Xcode project configuration (.xcodeproj or .xcworkspace)
// -> If you have a project: configure only sonar.objectivec.project
// -> If you have a workspace: configure sonar.objectivec.workspace and sonar.objectivec.project
// and use the later to specify which project(s) to include in the analysis (comma separated list)
sonar.objectivec.project=**DragDrop.xcodeproj**
// sonar.objectivec.workspace=myApplication.xcworkspace
// Scheme to build your application
sonar.objectivec.appScheme=**DragDrop**
// Scheme to build and run your tests (comment following line of you don't have any tests)
//sonar.objectivec.testScheme=myApplicationTests
/////////////////////////
// Optional configuration
// Encoding of the source code
sonar.sourceEncoding=**UTF-8**
// JUnit report generated by run-sonar.sh is stored in sonar-reports/TEST-report.xml
// Change it only if you generate the file on your own
// Change it only if you generate the file on your own
// The XML files have to be prefixed by TEST- otherwise they are not processed
// sonar.junit.reportsPath=sonar-reports/
// Cobertura report generated by run-sonar.sh is stored in sonar-reports/coverage.xml
// Change it only if you generate the file on your own
// sonar.objectivec.coverage.reportPattern=sonar-reports/coverage*.xml
// OCLint report generated by run-sonar.sh is stored in sonar-reports/oclint.xml
// Change it only if you generate the file on your own
// sonar.objectivec.oclint.report=sonar-reports/oclint.xml
// Paths to exclude from coverage report (tests, 3rd party libraries etc.)
// sonar.objectivec.excludedPathsFromCoverage=pattern1,pattern2
sonar.objectivec.excludedPathsFromCoverage=.*Tests.*
// Project SCM settings
// sonar.scm.enabled=true
// sonar.scm.url=scm:git:https://...
Save the file and you can reuse the same for other projects.
In the project root directory run the command - sonar-runner
You should try it with an older version of SonarQube (< 4.0 usually works).

Maven deploy fails for Apache Archiva

I have a Maven project which generates a 413.06 KB jar file. I have to deploy it on Apache Archiva based managed repository. I have tried to deploy different versions, and it created required layout and structure, uploaded some files, even it uploaded that jar with 200~ KB. every time the jar file size changes but always it fails to upload 413.06 KB jar file.
Information:-
I am running standalone Archiva
I have given guest account to Global Repository Manager & "Repository Manager - MYREPO"
I have also tried a separate account in Archiva with "Repository Manager - MYREPO" rights and configured it in maven's settings.xml file to set custom timeout.
I am getting following error
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy
(default-deploy) on project SharedshelfRepository: Error deploying artifact: Transfer error:
The server did not respond within the configured timeout. -> [Help 1]
that might be maven-deploy-plugin issue, resources plugin itself needs several dependencies,try manually jar nad p
What version of Maven are you using? You might try 3.0.4 as it has a different HTTP library. I'm also not sure if there's more context for what was happening when it timed out (it seems more request oriented rather than deploy oriented, and deploy does request some metadata).
I can't see that you'd need to alter the timeout, as none of the defaults should apply to such a small file. How long does it take to fail?