I am unable to commit my changes to GIT, I am getting below messages while committing my changes.
> tests:twig:lint:files
Linting twig files...
All Twig files contain valid syntax.
> tests:yaml:lint:files
Linting YAML files...
> tests:composer:validate
Validating composer.json and composer.lock...
[ExecStack] composer validate --no-check-all --ansi
[ExecStack] Running composer validate --no-check-all --ansi in
/Users/784187/Projects/takeda/takeda-poc
./composer.json is valid
[ExecStack] Done in 0.796s
Your local code has passed git pre-commit validation.
Executing .git/hooks/commit-msg...
Validating commit message syntax...
[error] Invalid commit message!
Commit messages must conform to the regex /(^BLT-[0-9]+(: )[^ ].{15,}\.)|(Merge branch (.)+)/
The commit message should include your project prefix, followed by a hyphen and ticket number, followed by a colon and a space, fifteen characters or more describing the commit, and end with a period.
Example: BLT-123: Update module configuration.
It's due to your BLT default configuration.
Go to the file blt/blt.yml and replace prefix value with your project code.
project:
prefix: BLT
to
project:
prefix: YOUR-PROJECT-CODE
If you set prefix value as PRJ then the commit message format will be
PRJ-[ticket number]: [message with minimum 15 letter]
Example: PRJ-123: Added Initial source code with configuration.
Related
I am building a .NET application in Azure DevOps, setting its version using GitVersion through Cake script, and then build it. It appears to get the Build number from this value created in GitVersion. I want the informational build number to populate part of my name. I am using the designer but for ease of use, here is the YAML file of the publish artifact step:
#Your build pipeline references the ‘deployment.PPILDeployDirectory’ variable, which you’ve selected to be settable at queue time. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it settable at queue time. See https://go.microsoft.com/fwlink/?linkid=865971
#Your build pipeline references the ‘deployment.integration.environment’ variable, which you’ve selected to be settable at queue time. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it settable at queue time. See https://go.microsoft.com/fwlink/?linkid=865971
steps:
- task: PublishBuildArtifacts#1
displayName: 'Publish Integration Artifact copy'
inputs:
PathtoPublish: '$(deployment.PPILDeployDirectory)'
ArtifactName: '$(deployment.integration.environment)_integration_drop'
How do I suffix my ArtifactName with the informational build number (which includes the branch and build information)? What is the variable I need to grab? Are there any other variables related to build numbers that I should be aware of?
How do I suffix my ArtifactName with the informational build number (which includes the branch and build information)?
You can use the variables $(Build.BuildNumber) and $(Build.SourceBranchName) as suffix of your ArtifactName, like:
- task: PublishBuildArtifacts#1
displayName: 'Publish Artifact: dist'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'Test_$(Build.BuildNumber)_$(Build.SourceBranchName)'
After build, we could to see log under the summary tab, build number is 20190425.7 and source branch is master.
The list of available variables is found at:
https://learn.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=azure-devops&tabs=yaml#predefined-variables
Hope this helps.
I get this javascript-error in Sitecore 8 > Control Panel when e.g. clicking "Install a package" or any other link:
ReferenceError: scForm is not defined
Looking in Firebug, seems like a file is missing: http://my.site/-/speak/v1/assets/main.js.
Found out: this error occurs, because the file App_Config/Include/.Sitecore.Speak.Important.config is missing.
Why is it missing? Because filename starts with a period '.', and we use TeamCity and Octopus Deploy / OctoPack to generate a NuGet package for deploying.
This is by-design behaviour by OctoPack - i.e. to not include files with leading periods in output packages (see here). But as comments state, there is now an option to allow for dot-files to deploy:
In your build-build step in TeamCity (runner type MsBuild or Visual Studio (sln)), in the field Command line parameters, insert or append the following:
/p:OctoPackNuGetArguments=-NoDefaultExcludes
Who the heck names files with a leading period anyway...
I've pull a rails project from the github. When I ran this project, it didn't work, the message here:
Usage:
rails new APP_PATH [options]
Options:
-r, [--ruby=PATH] # Path to the Ruby binary of your choice
# Default: /home/hien/.rbenv/versions/2.0.0-p451/b
in/ruby
-m, [--template=TEMPLATE] # Path to some application template (can be a file
system path or URL)
[--skip-gemfile], [--no-skip-gemfile] # Don't create a Gemfile
-B, [--skip-bundle], [--no-skip-bundle] # Don't run bundle install
-G, [--skip-git], [--no-skip-git] # Skip .gitignore file
[--skip-keeps], [--no-skip-keeps] # Skip source control .keep files
-O, [--skip-active-record], [--no-skip-active-record] # Skip Active Record files
-V, [--skip-action-view], [--no-skip-action-view] # Skip Action View files
-S, [--skip-sprockets], [--no-skip-sprockets] # Skip Sprockets files
[--skip-spring], [--no-skip-spring] # Don't install Spring application preloader
-d, [--database=DATABASE] # Preconfigure for selected database (options: mys
ql/oracle/postgresql/sqlite3/frontbase/ibm_db/sqlserver/jdbcmysql/jdbcsqlite3/jdbcpostgresql/jdbc)
# Default: sqlite3
-j, [--javascript=JAVASCRIPT] # Preconfigure for selected JavaScript library
# Default: jquery
-J, [--skip-javascript], [--no-skip-javascript] # Skip JavaScript files
[--dev], [--no-dev] # Setup the application with Gemfile pointing to y
our Rails checkout
[--edge], [--no-edge] # Setup the application with Gemfile pointing to R
ails repository
-T, [--skip-test-unit], [--no-skip-test-unit] # Skip Test::Unit files
[--rc=RC] # Path to file containing extra configuration opti
ons for rails command
[--no-rc], [--no-no-rc] # Skip loading of extra configuration options from
.railsrc file
Runtime options:
-f, [--force] # Overwrite files that already exist
-p, [--pretend], [--no-pretend] # Run but do not make any changes
-q, [--quiet], [--no-quiet] # Suppress status output
-s, [--skip], [--no-skip] # Skip files that already exist
Rails options:
-h, [--help], [--no-help] # Show this help message and quit
-v, [--version], [--no-version] # Show Rails version number and quit
Description:
The 'rails new' command creates a new Rails application with a default
directory structure and configuration at the path you specify.
You can specify extra command-line arguments to be used every time
'rails new' runs in the .railsrc configuration file in your home directory.
Note that the arguments specified in the .railsrc file don't affect the
defaults values shown above in this help message.
Example:
rails new ~/Code/Ruby/weblog
This generates a skeletal Rails installation in ~/Code/Ruby/weblog.
See the README in the newly created application to get going.
I found that, the project missing config/application.rb and Gemfile files. So what can I do with this problem, should I add these files by my own or any other solution?
rails new . inside folder with the project you pulled, dont overwrite files when prompted (also there is a huge possibility that project you're pulling is missing some config files)
I'm trying to .gitignore emacs temporary/autosave files. I'm using...
\.\#.*
in my .gitignore.
But git add -A run in a subfolder is still giving me:
# new file: .#make_collections.py
# new file: .#norm_collections.py
# new file: make_collections.py
# new file: norm_collections.py
even though
\.\#.*
is clearly getting the right file names and not the wrong ones when I test it with a regex tester.
You can also instruct emacs to save the autosave files in a different directory altogether by setting the variable auto-save-file-name-transforms, I have this in my init file
(setq auto-save-file-name-transforms
`((".*" ,(concat user-emacs-directory "auto-save/") t)))
This instructs emacs to store the auto-saves inside the auto-save folder in the user-emacs-directory (usually ~/.emacs.d).
To save backup files in a different directory set the variable backup-directory-alist, the following will save backup files inside backups folder in the user-emacs-directory
(setq backup-directory-alist
`(("." . ,(expand-file-name
(concat user-emacs-directory "backups")))))
gitignore doesn't use regular expressions. Instead it uses shell glob patters. The man page tells you two things important for this situation:
Otherwise, Git treats the pattern as a shell glob suitable for
consumption by fnmatch(3) with the FNM_PATHNAME flag.
and
A line starting with # serves as a comment. Put a backslash ("\")
in front of the first hash for patterns that begin with a hash.
This means that the pattern you want to use is simply .#*.
Now the second pattern that matov mentioned, #*, doesn't do anything as it is treated as a comment by git. Hence me quoting that second sentence from the man page.
Emacs autosave files are ignored with
\#*#
files are ignored with:
\#*\#
.\#*
If you want an easy way to ignore files, you can also use http://www.gitignore.io which helps create useful .gitignore files for your project.
Here is the emacs template: https://www.gitignore.io/api/emacs
There is also documentation demonstrating how to run gi from the command line.
To suppress the temporary Emacs files appearing on git status globally, you can do the following:
Configure git to use a global excludesfile
Since this is a common problem, git has a specific solution to that:
Patterns which a user wants Git to ignore in all situations (e.g., backup or temporary files generated by the user’s editor of choice) generally go into a file specified by core.excludesFile in the user’s ~/.gitconfig
git config --global core.excludesfile ~/.gitignore_global
Create the respective file
cd
touch .gitignore_global
Paste the following template into the file
# -*- mode: gitignore; -*-
*~
\#*\#
/.emacs.desktop
/.emacs.desktop.lock
*.elc
auto-save-list
tramp
.\#*
# Org-mode
.org-id-locations
*_archive
# flymake-mode
*_flymake.*
# eshell files
/eshell/history
/eshell/lastdir
# elpa packages
/elpa/
# reftex files
.rel
# AUCTeX auto folder
/auto/
# cask packages
.cask/
dist/
# Flycheck
flycheck_*.el
# server auth directory
/server/
# projectiles files
.projectile
# directory configuration
.dir-locals.el
# network security
/network-security.data
Watch git do its magic! :)
I have a TeamCity Build Configuration that includes the following to publish artifacts:
Source\Builder\bin\Release\*.dll=>release
This works fine, however I am wanting to exclude one dll (there are quite a few) and have read that you can use + & - operators to do this. Something along the lines of:
+: Source\Builder\bin\Release\*.dll=>release
-: Source\Builder\bin\Release\Builder.*
As soon as I add these in, no artifacts are published and I get the following error in the build log (looks like it is counting the + as part of the path):
[Publishing artifacts] Collecting files to publish [+:Source\Builder\bin\Release\*.dll=>release]
[Publishing artifacts] Artifacts path +:Source/Builder/bin/Release/*.dll not found
I am using version 7.1.1, anyone any ideas (I am not sure whether these operators are even valid). I have seen a solution with MSBuild but am surprised this functionality is not available.
Thanks in advance.
I don't believe you can.
However, if you are using the artifacts in another build configuration as an artifact dependency, you can exclude a particular file there.
When you set up the dependencies, you can specify a negative operator like this:
+:release/**=>Dependencies/SomeProject
-:release/SomeBinary.dll
It is a horrible hack, but one way you could get it to work would be to set up a new build configuration which gets the dependencies as an artifact dependency, excluding the one binary, and then publishes its own artifacts.
As in, create a new build configuration and publish:
Dependencies/SomeProject=>release
Then reference the artifacts from this build configuration instead of the other one.
A little bit late for the party, but there is still no fix...
I ended up adding a last build step to the project. It is command line > custom script. Then I used this commands to remove the files that I didn't want in the artifacts. This runs just before artifacts collection.
del /S /Q "src\apps\*.xml"
del /S /Q "src\apps\*.pdb"
Explanation for del command
/S Delete from all Subfolders (DELTREE)
/Q Quiet mode, do not give a Yes/No Prompt before deleting
* Match any characters
Our current options are to vote for this feature request at
http://youtrack.jetbrains.com/issue/TW-5244 and fail back to workarounds.
TeamCity artifact paths combine folders question hints that the same target folder can be reused for multiple path patterns.
TeamCity docs also state that
TeamCity will create directories starting from the first occurrence of
the wildcard in the pattern.
So in many cases it's possible to inverse exclusion problem to multiple inclusions.
For example, instead of lurking how to exclude -:**/.svn from my templates I was able just to filter them by extension:
templates/**/*.vm => templates
templates/**/*.xsl => templates