I am trying to release a specific version via artifactory. Promoting to a release folder gives me a 403 error with below error:
{
"errors" : [ {
"status" : 403,
"message" : "You are not permitted to execute the promotion 'snapshotToRelease'."
} ]
}
Looking at the error it's a permission issue and I have tried most of the permissions for the user that tries to release the build but no luck. Below is the api resource I'm trying to execute
/api/plugins/build/promote/snapshotToRelease
I suppose you're using this plugin?
The way this promotion is configured, only the following users can run it:
Users with admin privileges
A user with the username "jenkins"
If neither of these describe the user in question, and you're allowed to edit the plugin file, you can change the code to work with other users:
snapshotToRelease(users: ["my-promoter"], params: ...) { buildName, buildNumber, params ->
// ...
}
Or any user in a group:
snapshotToRelease(groups: ["my-promote-group"], params: ...) { buildName, buildNumber, params ->
// ...
}
(See the documentation for more details.)
Related
Trying to block all but allow specific plugins. I have the okta one and the web password filler working, but not the logon assist. I've tried putting in (secret-server-logon-assist-ff57#thycotic.com), and {secret-server-logon-assist-ff57#thycotic.com}, and also without any extras. These codes come from just the numeric URL (ie https://addons.mozilla.org/firefox/downloads/file/1747490) which says "Secret Server Login Assist (secret-server-logon-assist-ff57#thycotic.com) is blocked by your system administrator. Extension not on OAI allowed list". Am I misreading this message, or missing something on this specific one?
I posted this on support.mozilla.org, but haven't gotten any replies yet...
{
"*": {
"blocked_install_message" : "Extension not on OAI allowed list",
"installation_mode": "blocked"
},
"dd1e31d5-3623-45cb-b1ad-64074d36b360#thycotic.com": {
"installation_mode": "allowed",
"install_url": "https://addons.mozilla.org/firefox/downloads/file/3906662/secret_server_web_password_filler-3.2-fx.xpi"
},
"secret-server-logon-assist-ff57#thycotic.com": {
"installation_mode": "allowed",
"install_url": "https://addons.mozilla.org/firefox/downloads/file/1747490/secret_server_login_assist-2.1.1-an+fx.xpi"
},
"plugin#okta.com": {
"installation_mode": "allowed",
"install_url": "https://addons.mozilla.org/firefox/downloads/file/3901586/okta_browser_plugin-6.8.0-an+fx.xpi"
}
}
snip
I am attempting to launch a Dagster pipeline run with the GraphQL API. I have Dagit running locally and a working pipeline that I can trigger via the playground.
However, I am now trying to trigger the pipeline via GraphQL Playground, available at /graphql.
I am using the following mutation:
mutation ExecutePipeline(
$repositoryLocationName: String!
$repositoryName: String!
$pipelineName: String!
$runConfigData: RunConfigData!
$mode: String!
)
...and hence am providing the following query params:
{
"repositoryName": "my_repo",
"repositoryLocationName": <???>,
"pipelineName": "my_pipeline",
"mode": "dev",
"runConfigData": {<MY_RUN_CONFIG>}
}
I am not sure what value repositoryLocationName should take? I have tried a few but receive the following error:
{
"data": {
"launchPipelineExecution": {
"__typename": "PipelineNotFoundError"
}
}
}
This is the tutorial I am following.
Short answer:
Each repository lives inside a repository location. Dagster provides a default repository location name if you do not provide one yourself. To find the location name, you can click the repository picker in Dagit, and it'll be next to the repository name:
In this example, the repository name is toys_repository, and the location name is dagster_test.toys.repo
Longer answer:
A workspace (defined with your workspace.yaml) is a collection of repository locations.
There are currently three types of repository locations:
Python file
Python module
gRPC server
Each repository location can have multiple repositories. Once you define the location, Dagster is able to automatically go find all the repositories in that location. In the example above, I defined my workspace to have a single Python module repository location:
load_from:
- python_module: dagster_test.toys.repo
Note that simply specified a module and did not specify a repository location name, so Dagster assigned a default repository location name.
If I wanted to specify a location name, I would do:
load_from:
- python_module:
module_name: dagster_test.toys.repo
location_name: "my_custom_location_name"
Similarly for a python file location:
load_from:
- python_file: repo.py
Or with a custom repository location name:
load_from:
- python_file:
relative_path: repo.py
location_name: "my_custom_location_name"
You can also find out using a GraphQL query. Starting from the example provided in the documentation, you just need to add
repositoryOrigin {
repositoryLocationName
}
resulting in
query PaginatedPipelineRuns {
pipelineRunsOrError {
__typename
... on PipelineRuns {
results {
runId
pipelineName
status
runConfigYaml
repositoryOrigin {
repositoryLocationName
}
stats {
... on PipelineRunStatsSnapshot {
startTime
endTime
stepsFailed
}
}
}
}
}
}
This will return the repository location name for any run that is returned. Trigger the pipeline that you want the location name for in the UI before querying and that run will be your first result.
I'm trying to post to a Slack channel whenever CI fails using a groovy script. But however when I try to implement this inside failure block I'm getting this error
Error when executing failure post condition:
java.lang.NoSuchMethodError: No such DSL method 'steps' found among steps [archive, bat, build, catchError, checkout, deleteDir, dir, dockerFingerprintFrom, dockerFingerprintRun, echo, envVarsForTool, error, fileExists, getContext, git, input, isUnix, junit, library, libraryResource, load, lock, mail, milestone, node, parallel
However, I was able to apply this same code to send Slack notifications in other pipelines under stages blocks. Looks as if it's having issues when applied to post block.
post {
always {
cleanWs()
}
failure {
steps {
slackSend baseUrl: 'https://hooks.slack.com/services/',
channel: '#build-failures',
iconEmoji: '',
message: "CI failing for - #${env.BRANCH_NAME} - ${currentBuild.currentResult} (<${env.BUILD_URL}|Open>)",
teamDomain: 'differentau',
tokenCredentialId: 'slack-token-build-failures',
username: ''
}
}
}
this should work:
post {
always {
cleanWs()
}
failure {
slackSend baseUrl: 'https://hooks.slack.com/services/',
channel: '#build-failures',
iconEmoji: '',
message: "CI failing for - #${env.BRANCH_NAME} - ${currentBuild.currentResult} (<${env.BUILD_URL}|Open>)",
teamDomain: 'differentau',
tokenCredentialId: 'slack-token-build-failures',
username: ''
}
}
I got this working with my public github account where I was using something like this:
maven {
url "https://raw.githubusercontent.com/tvelev92/reactnativeandroidmaven/master/"
}
Then I decided I want it to be private and I put it on my company's gitlab and provisioned an access token however, I cannot figure out how to change build.gradle to accomplish a successful import of the pom file. Here is what I have however, I am receiving a 401 server response.
maven {
url "https://gitlabdev../../mobile/mysdk"
credentials(HttpHeaderCredentials) {
name = "password"
value = "..."
}
authentication {
header(HttpHeaderAuthentication)
}
}
please try:
url "https://raw.githubusercontent.com/tvelev92/reactnativeandroidmaven/raw/master/"
This is an extension to my previous question:
Setup mailgun with parse-server on Heroku
When you run '$ npm install parse-server-mailgun' it installs a bunch of directories and files on my current directory. However when i edit any of these, specifically the email templates, or anything thing that isnt in the main root directory of my parse-server-example folder, they don't push to Heroku.
I assume, if this is the case that it must just be pushing the main config files located in the root dir and then pulling the rest from nom somewhere?
How to i push the entire directory and all its sub folder/files to my Heroku server? Or edit the email templates already on the server?
Sorry this is a bit f a stupid question probably.
You should not modify the templates from the package's folder. Instead, create your own templates in your project's directory, and then reference those when initializing ParseServer. Then simply add these new files to your git repository and they'll be available on the server.
For instance:
emailAdapter: {
module: 'parse-server-mailgun',
options: {
// The address that your emails come from
fromAddress: 'Hello <hello#example.com>',
// Your domain from mailgun.com
domain: config.Mailgun.domain,
// Your API key from mailgun.com
apiKey: config.Mailgun.api,
templates: {
verificationEmail: {
subject: 'Please verify your e-mail for Example.com',
pathPlainText: './email/emailVerification/index.txt',
pathHtml: './email/emailVerification/index.html',
callback: function (user) { return { firstName: user.get('firstName') }; }
// Now you can use {{firstName}} in your templates
}
}
}
}
Simple fix. Put them in the root directory of the build. They will automatically be committed tot he server
You can use this mail adapter is really easy to use and also you can use it to multi language mails.
Hope that can help you. 😁👌
A little example of how you can use it.
emailAdapter: {
module: 'parse-smtp-template',
options: {
...
template: true,
templatePath: "views/templates/template.html",
// Custome options to your emails
// You can add more options if you need
passwordOptions: {
subject: "Password recovery",
body: "Custome pasword recovery email body",
btn: "Recover your password"
/* --EXTRA PARAMETERS--
others: {
extraParameter
}
*/
},
confirmOptions: {
subject: "E-mail confirmation",
body: "Custome email confirmation body",
btn: "confirm your email"
},
}
}
https://github.com/macarthuror/parse-smtp-template