Skip to content
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

[JAMES-3226] Automatically publish staging doc #11

Merged
merged 5 commits into from Apr 2, 2021

Conversation

chibenwa
Copy link
Contributor

@chibenwa chibenwa commented Apr 2, 2021

No description provided.

This enables building and publishing the antora documentation
automatically when the build of the master branche of james-project is
green.
@chibenwa
Copy link
Contributor Author

chibenwa commented Apr 2, 2021

org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
WorkflowScript: 163: unexpected token: } @ line 163, column 1.
   }
   ^

1 error

	at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:310)
	at org.codehaus.groovy.control.ErrorCollector.addFatalError(ErrorCollector.java:150)
	at org.codehaus.groovy.control.ErrorCollector.addError(ErrorCollector.java:120)
	at org.codehaus.groovy.control.ErrorCollector.addError(ErrorCollector.java:132)
	at org.codehaus.groovy.control.SourceUnit.addError(SourceUnit.java:350)
	at org.codehaus.groovy.antlr.AntlrParserPlugin.transformCSTIntoAST(AntlrParserPlugin.java:144)
	at org.codehaus.groovy.antlr.AntlrParserPlugin.parseCST(AntlrParserPlugin.java:110)
	at org.codehaus.groovy.control.SourceUnit.parse(SourceUnit.java:234)
	at org.codehaus.groovy.control.CompilationUnit$1.call(CompilationUnit.java:168)
	at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:943)
	at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:605)
	at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:581)
	at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:558)
	at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:298)
	at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:268)
	at groovy.lang.GroovyShell.parseClass(GroovyShell.java:688)
	at groovy.lang.GroovyShell.parse(GroovyShell.java:700)
	at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.doParse(CpsGroovyShell.java:142)
	at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:127)
	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:571)
	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:523)
	at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:337)
	at hudson.model.ResourceController.execute(ResourceController.java:97)
	at hudson.model.Executor.run(Executor.java:429)
Finished: FAILURE

@chibenwa
Copy link
Contributor Author

chibenwa commented Apr 2, 2021

org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
WorkflowScript: 122: Undefined section "unstable" @ line 122, column 5.
       unstable {
       ^

WorkflowScript: 127: Undefined section "success" @ line 127, column 5.
       success {
       ^

WorkflowScript: 159: Undefined section "always" @ line 159, column 5.
       always {
       ^

I think unstable sction makes no sense here.

@jeantil
Copy link
Contributor

jeantil commented Apr 2, 2021

so no it doesn't make much sense but it seems like it's not the issue here success and always should be defined but they don't seem to work either

@chibenwa
Copy link
Contributor Author

chibenwa commented Apr 2, 2021

Yes I do not understand either.

@jeantil
Copy link
Contributor

jeantil commented Apr 2, 2021

it a {} thing again you need to revert a26e00b and to remove the } after the failure block (around line 117)

Jenkinsfile Outdated Show resolved Hide resolved
@jeantil
Copy link
Contributor

jeantil commented Apr 2, 2021

I tried linting with https://docs.cloudbees.com/docs/admin-resources/latest/pipelines/pipeline-dev-tools#linter but for now I couldn't get it to work :(

@jeantil
Copy link
Contributor

jeantil commented Apr 2, 2021

I pushed a fixed version on my branch (with separated commits for each step) , I was able to lint it

export JENKINS_URL=https://builds.apache.org/ 
export  JENKINS_CRUMB=$(http $JENKINS_URL/crumbIssuer/api/xml\?xpath=concat\(//crumbRequestField,\":\",//crumb\))   curl -X POST -H $JENKINS_CRUMB -F "jenkinsfile=<Jenkinsfile" $JENKINS_URL/pipeline-model-converter/validate
# returns Jenkinsfile successfully validated.

it lives at https://github.com/jeantil/james-site/tree/automatically-publish-staging-documenttion-on-james-project-build

@jeantil
Copy link
Contributor

jeantil commented Apr 2, 2021

\o/ :rocket:

@chibenwa chibenwa merged commit 422a92b into apache:staging Apr 2, 2021
@jeantil
Copy link
Contributor

jeantil commented Apr 2, 2021

Quick update that this configuration does work : https://builds.apache.org/job/james/job/ApacheJames-Website/job/staging/13/ was triggered by upstream https://builds.apache.org/job/james/job/ApacheJames/job/master/57/

we have auto deploy of documentation work 🎉

chibenwa added a commit that referenced this pull request Apr 7, 2021
This enables building and publishing the antora documentation
automatically when the build of the master branche of james-project is
green.

Co-authored-by: Jean Helou <jhe@codamens.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants