Github Actions fails in qa but passes in dev - yaml

Built a cloudformation stack and I want to deploy it using Github Actions. In the .yml, there are options to build in dev or qa. Running the script in dev passes. Running the script in qa fails and gives me this error
botocore.exceptions.ClientError: An error occurred (ValidationError) when calling the CreateStack operation: Parameters: [GroupId] must have values
I'm not sure why. Any ideas?
I tried adding GroupId to the script, but then different errors pop up stating that Region and Environment are not in the template, which is false.

Related

Error Raised Only When Using Jenkins Pipeline

I am trying to setup a Jenkins pipeline using scripted pipeline with a windows 2019 server, however I ran into this error while trying to build
> webpack --config ./config/webpack-cli-prod.config.js
C:\myProject\node_modules\webpack\lib\javascript\JavascriptModulesPlugin.js:143
throw new TypeError(
^
TypeError: The 'compilation' argument must be an instance of Compilation
at Function.getCompilationHooks (C:\myProject\node_modules\webpack\lib\javascript\JavascriptModulesPlugin.js:143:10)
at SourceMapDevToolModuleOptionsPlugin.apply (C:\myProject\node_modules\webpack\lib\SourceMapDevToolModuleOptionsPlugin.js:50:27)
at C:\myProject\node_modules\webpack\lib\SourceMapDevToolPlugin.js:163:53
at Hook.eval [as call] (eval at create (C:\myProject\node_modules\tapable\lib\HookCodeFactory.js:19:10), <anonymous>:100:1)
at Hook.CALL_DELEGATE [as _call] (C:\myProject\node_modules\tapable\lib\Hook.js:14:14)
at Compiler.newCompilation (C:\myProject\node_modules\webpack\lib\Compiler.js:1122:26)
at C:\myProject\node_modules\webpack\lib\Compiler.js:1166:29
at Hook.eval [as callAsync] (eval at create (C:\myProject\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:6:1)
at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (C:\myProject\node_modules\tapable\lib\Hook.js:18:14)
at Compiler.compile (C:\myProject\node_modules\webpack\lib\Compiler.js:1161:28)
I tried to run same command/step using freestyle Jenkins job, and it works without this error.
I tried to run the same command on the Jenkins agent locally, and it works without this error.
I looked up on google, and came across this link here, I tried to use newer version of html-webpack-plugin, and we also tried to build without the plugin. All come to the same result, that the error would occur only when running from Jenkins scripted pipeline.
I also tried with a different server, while keeping the same agent and job configuration, and I also get the same error.
The version of npm is 8.11.0, the node version is 16.16.0. The agent is connected through running the agent.jar file from the agent.
The only difference I see between the freestyle job and the scripted pipeline job is the freestyle job appears to be run as SYSTEM by the Jenkins server, whereas the pipeline job is probably run with lower privilege (I am not entirely sure though). I saw also this post, where it says
in the Freestyle job everything is executed in the agent, but for the Scripted Pipeline Job, the pipeline code is translated in the controller to atomic commands that are sent to the agents.
But I have no idea how to make the scripted pipeline job run just like the freestyle job.
On one hand, it appears to have to do with webpack, and on the other it appears to be related to Jenkins since running freestyle and locally on the server is without errors.
This is how my Jenkins scripted pipeline looks like (with sensitive information removed)
node("My-Server"){
dir("C:\\MyProject"){
stage('Pre-Test Build Client (Web)') {
dir("aFolder"){
bat 'npm run build-all-prod' // This is the script that invoke the webpack build command
}
}
}
}
I have run out of options, and do not where to go from here, and I couldn't find any more information on google that would be helpful. Any help here would be really appreciated. Thank you.
I'm not sure if jenkins creates the same environment variables, and command line tools (you can configure some on the node's configuration page). I would check if the node's environment variables and tools are the same in freestyle vs pipeline job by running something like this in each job, and comparing the output:
bat 'echo %PATH%'
bat 'which webpack'
bat 'npm list webpack'
Another thing worth checking is whether you're using batch script in both jobs, and not eg shell in freestyle.
Lastly I found a gh issue whith the same error as you, caused by having 2 different installations of webpack, one on v5. May be worth looking into, if everything else fails.

Cypress test tool fails to load, with error 'watching config files Error: UNKNOWN'

I'm working with the Cypress test suite and am rolling it out across our development team. We all run on virtual machines that are, in principle, identical; in practice the machines are re-built once a month so in the meantime developers are free to download and install anything they require so the machines can get messy.
I have a git repository with the cypress code. The primary development environment is dotnet, so the cypress tests are the only node.js code being worked on. I have had a number of developers able to set up the cypress tests on their vms by following the steps of
install latest node.js (16.17.1)
clone from git
run 'npm install' to get the relevant libraries. package.json refers to Cypress 10.10.0
All works fine and they can run the cypress desktop tool and run tests okay. However, I have one developer whose machine is not playing ball. After running the above, when attempting to run cypress the tool displays the not-very-useful error of 'Warning:Unexpected Internal Error. We encountered an unexpected internal error. Please check GitHub or open a new issue if you don't see one already with the details below:'
There are, unfortunately, no details below.
I have been able to run the cypress desktop tool from cmd.exe with DEBUG=cypress:* set on and got a decent amount of debug output. Comparing a working machine to the non-working machine I can see the difference in the output starts at an error message as follows
2022-10-17T00:12:58.883Z cypress:lifecycle:ProjectConfigManager error watching config files Error: UNKNOWN: unknown error, watch
at FSEvent.FSWatcher._handle.onchange (node:internal/fs/watchers:204:21)
{
errno: -4094,
syscall: 'watch',
code: 'UNKNOWN',
filename: null
}
I've hit the googles but not got much information on what this is referring to - I assume there's some configuration file that's not set up on this specific developer's machine.
Has anyone else come across this error before, and if so have you any suggestions where I can look to hunt down the issue?

GitLab-CI: sonar-scanner : The term 'sonar-scanner' is not recognized as the name of a cmdlet, function,

I'm trying to add SonarQube to a local instance of GitLab-CI, but can't get past this error produced by GitLab-CI Runner:
Note: GitLab-Runner, Sonar-Scanner and SonarQube are all installed on the same Windows server.
My first thought was, it can't find the runner, installation/permission problem. So....
I have verified:
SonarQube Service run as Admin and has full access to Sonar-Scanner directory
GitLab Runner Service as Admin and has full access to Sonar-Scanner directory
Sonar-Scanner Installation double checked (Standalone executable: sonarscanner-for-msbuild) (installed per https://docs.sonarqube.org/latest/analysis/scan/sonarscanner-for-msbuild/ )
Sonar-Scanner added to Environment Variables' 'Path':
And still the same error so I tried running Sonar-Scanner on its own:
and that seems to run ok. But GitLab still produces the same issue. Maybe I'm using the wrong Sonar-Scanner?
I'm fairly new to GitLab-CI's Runner so any guidance/suggestions you can offer is greatly appreciated. Not sure where else to look (I've read everything/anything remotely related).
My issue was related to environment path. I have multiple accounts.
GitLab Runner Service as Admin and has full access to Sonar-Scanner directory
The account that GitLab runner was using was not the account that had the environment variables. Once SonarScanner directory was added to the user environment variables (Path) of the GitLab runner windows account, it worked as expected.

Heroku deployment error via codeship

I want to deploy django app to heroku via codeship and it generate an error and that is wget -O/dev/null http://something.herokuapp.com
How to fix the problem
Marko from the Codeship team here. Could you paste some more log output, or open a ticket on https://helpdesk.codeship.com?
Judging from the command you pasted above, I'd guess the check if the Heroku app, that you just deployed to, is running fails and this causes the build itself to fail.
Without any additional configuration we check the root URL for your application at http://HEROKU_APP_NAME.herokuapp.com via wget and see if it returns an HTTP/2xx or HTTP/3xx status code.
If it does, the check succeeds, else the build fails.
You can take a look at the script we use to perform the check at https://github.com/codeship/scripts/blob/master/utilities/check_url.sh

fabric8 -The last operation resulted in the following error: Unauthorized

I am working with kubernetes on google cloud,
I have created a fabric8 cluster: http://fabric8.io/guide/getStarted/gke.html
when the cluster is up and running i pull remote repositories and it works but when i try create a new app and i get the following msg:
The last operation resulted in the following error:
Unauthorized
log:2016-08-21T16:39:07.505206481Z Both
io.fabric8.forge.rest.git.RepositoriesResource#projectRepositoryResource
and
io.fabric8.forge.rest.git.RepositoriesResource#projectRepositoryResource
are equal candidates for handling the current request which can lead
to unpredictable results
can any body help me understand what this error means?
Any chance of seeing the full log of the fabric8-forge pod?
kubectl logs fabric8-forge-xxxx
Were you creating a project using the wizard using the gogs git server or did you try to import a project from an external git repository?

Resources