-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(deploy): add Source Control Management context to api request #183
Conversation
Started the github context retrieval
Source Control Management Context added to the deployment request under sourceControl
Changed the ScmContext and made and embedded struct githubScmc
d57cbcd
to
a5b84c4
Compare
I miss read somethings, sanity checking now
Taking into account the Env variables already being there when the test are run in github
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When you merge this it gets auto-published as a dev release which some (not all though) of our projects use.
So once the actions are complete you can UAT this before promoting the dev release to a proper full release that is consumed by customers
added missing property 'sourcecontrol: null'
Validate that env variables are not empty Validate that pr pointer is not empty when a bad token is given
cmd/sourceControl/github.go
Outdated
const ( | ||
ghToken = "GH_TOKEN" | ||
ghRepo = "GITHUB_REPOSITORY" | ||
ghRefName = "GITHUB_REF_NAME" | ||
ghActor = "GITHUB_ACTOR" | ||
ghSha = "GITHUB_SHA" | ||
ghEvent = "GITHUB_EVENT_NAME" | ||
ghRef = "GITHUB_REF" | ||
ghTriggeringActor = "GITHUB_TRIGGERING_ACTOR" | ||
ghRefType = "GITHUB_REF_TYPE" | ||
ghServer = "GITHUB_SERVER_URL" | ||
ghRunId = "GITHUB_RUN_ID" | ||
ghWorkflow = "GITHUB_WORKFLOW" | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should all be available in deploy-engine:api -- but the names start as Github (so GithubToken, etc).
cmd/sourceControl/scm.go
Outdated
const ( | ||
github de.Manager = "github" | ||
bitbucket de.Manager = "bitbucket" | ||
branch de.Reference = "branch" | ||
tagRef de.Reference = "tag" | ||
pullRequest de.Event = "pull_request" | ||
push de.Event = "push" | ||
workflowDispatch de.Event = "workflow_dispatch" | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are likewise available in deploy-engine :)
SonarQube Quality Gate |
CDAAS-2741
Move the logic for generating the information from the github action to the armory-cli
This change adds a Sim property to the request made to the deploy engine API so that work in Deploy engine will later saved and this information will be available for the PR lineage in the UI.
This was tested by running the armory client pointing to the remote-dev armory address using the new flag --with-scm. Using the goland debugging tools I was able to validate that the scmc data is being add to the request and the pipeline is triggered and deployed without issues