Thanks, David and Cesar!

The Jenkins part is working.  My tests runs that pushed to `asf-site` all 
worked and since the last email I've completed it and we now have automated 
publishing to the `asf-site` branch.  The job is setup to run daily, but any of 
us can click the 'Build Now' button at any time if you're impatient.

  - 
https://github.com/apache/tomee-site-pub/commit/3409970cd9cd0dbf806da49ff9edc0c37d152e46

FYI, Cesar, your test didn't work because you need to select `git-websites` as 
the node.  That has the credentials setup and permissions to publish to an 
`asf-site` or `asf-staging-*` branch.

What doesn't work is that our website was setup to use `master` not `asf-site`, 
so after the switch from `master` to `asf-site` updates do not reach 
https://tomee.apache.org.

I filed a ticket (INFRA-21903).  I worked a bit with @fluxo on #asfinfra and 
neither of us were able to figure it out.  I suspect @Humbedooh will get it 
resolved.

The good news is that when he does, we're completely setup for automated 
publishes to the website!

-- 
David Blevins
http://twitter.com/dblevins
http://www.tomitribe.com

> On May 19, 2021, at 7:52 PM, Cesar Hernandez <cesargu...@gmail.com> wrote:
> 
> Hi David,
> 
> I tried to do these steps using jenkins pipeline with a test job here:
> https://ci-builds.apache.org/job/Tomee/job/test-pipeline/
> The problem [1] I'm getting seems to be related to the fact that the CI
> user doesn't have write access to the repo:
> 
> "remote: Permission to apache/tomee-site-pub.git denied to ****. "
> 
> 
> [1]
> 
> + git commit -m test publish from ci-builds.apache.org using jenkins
> [asf-staging-test 678b293a4] test publish from ci-builds.apache.org
> using jenkins
> 1 file changed, 1 insertion(+), 1 deletion(-)[Pipeline]
> withCredentials
> <https://ci-builds.apache.org/job/Tomee/job/test-pipeline/14/console#>Masking
> supported pattern matches of $GIT_USERNAME or $GIT_PASSWORD[Pipeline]
> { 
> <https://ci-builds.apache.org/job/Tomee/job/test-pipeline/14/console#>[Pipeline]
> sh <https://ci-builds.apache.org/job/Tomee/job/test-pipeline/14/console#>
> 
> + git push origin HEAD:asf-staging-test
> remote: Permission to apache/tomee-site-pub.git denied to ****.
> fatal: unable to access 'https://github.com/apache/tomee-site-pub/':
> The requested URL returned error: 403[Pipeline] }[Pipeline] //
> withCredentials[Pipeline] }[Pipeline] // stage[Pipeline] }[Pipeline]
> // node[Pipeline] End of PipelineERROR: script returned exit code 128
> Finished: FAILURE
> 
> 
> 
> 
> El mié, 19 may 2021 a las 19:03, David Blevins (<david.blev...@gmail.com>)
> escribió:
> 
>> I've been trying to setup automatic website publishing.
>> 
>> So far I have a test Jenkins job that does a simple commit/push:
>> 
>> - https://ci-builds.apache.org/job/Tomee/job/site-publish
>> 
>> At the moment it's just a simple Freestyle job with a test script to see a
>> successful commit/push work:
>> 
>>    git clone https://gitbox.apache.org/repos/asf/tomee-site-pub.git -b
>> asf-staging-test
>>    cd tomee-site-pub
>>    date > test.txt
>>    git add test.txt
>>    git commit -m "test publish from ci-builds.apache.org" test.txt
>>    git push origin asf-staging-test
>> 
>> The trick and where I'm stuck is that we're using `master` as our main
>> branch for https://tomee.apache.org and Jenkins is setup to only let us
>> push a branch called `asf-site` or `asf-staging-*`
>> 
>> I've attempted to switch `tomee-site-pub` from `master` to `asf-site`, but
>> it doesn't seem to work.  I've filed a ticket with Infra and will keep you
>> updated:
>> 
>> - https://issues.apache.org/jira/browse/INFRA-21903
>> 
>> 
>> --
>> David Blevins
>> http://twitter.com/dblevins
>> http://www.tomitribe.com
>> 
>> 
> 
> -- 
> Atentamente:
> César Hernández.

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to