You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by tison <wa...@gmail.com> on 2023/05/26 11:33:29 UTC

ASF Maven credential in a project-wise token?

Hi,

I'm configuring tokens for automatically deploying artifacts to the ASF
snapshot repository[1].

It requires configuring a user token to auth to the repository. Although
I'm wondering if I must use my personal token or if there is some
project-wise token to use. Even asking for an INFRA member to help
configure, passing over a personal token to another one increases the risk.

Best,
tison.

[1]
https://github.com/tisonkun/opendal/actions/runs/5090173050/workflow#L129

AW: ASF Maven credential in a project-wise token?

Posted by Christofer Dutz <ch...@c-ware.de>.
Hi,

and sorry for the late response.

Assuming it’s a Maven build, that you’re talking about.

The Jenkins machines (at least the ones labeled “ubuntu”) have maven credentials available in their settings.xml.
However, for the build to pick them up it’s important that you didn’t change the names of the repository ids.
So, if you correctly set the most recent apache parent as parent of your project, this should be setup automatically.

Then it’s as simple as doing a “mvn deploy” on Jenkins.

Hope that helps.


Chris



Von: tison <wa...@gmail.com>
Datum: Montag, 29. Mai 2023 um 11:05
An: general@incubator.apache.org <ge...@incubator.apache.org>, dev@opendal.apache.org <de...@opendal.apache.org>
Betreff: Re: ASF Maven credential in a project-wise token?
Thanks for your reference, Martin!

cc dev@opendal.a.o - I'm going to open a branch on the upstream repo to
verify this setting when I find some time.

Best,
tison.


Martin Grigorov <mg...@apache.org> 于2023年5月29日周一 16:21写道:

> Hi,
>
> Here is a setup using username and password provided by the Infra team -
>
> https://github.com/apache/avro/blob/0be01a58bd7586982953dda45d53ac3551c7b6c4/.github/workflows/java-publish-snapshot.yml#L56-L62
>
>  - name: Deploy Maven snapshots
>         env:
>           ASF_USERNAME: ${{ secrets.NEXUS_USER }}
>           ASF_PASSWORD: ${{ secrets.NEXUS_PW }}
>         run: |
>           echo
>
> "<settings><servers><server><id>apache.snapshots.https</id><username>$ASF_USERNAME</username><password>$ASF_PASSWORD</password></server></servers></settings>"
> > settings.xml
>           mvn --settings settings.xml -U -B -e -fae -ntp -DskipTests deploy
>
> I am not sure whether those are available per project or globally for the
> 'apache' Github organization.
> Try it and if it fails then contact the Infra team to add them for your
> project.
>
> On Sat, May 27, 2023 at 6:19 AM tison <wa...@gmail.com> wrote:
>
> > Hi Christofer,
> >
> > Thanks for your reply! Two questions here:
> >
> > 1. Are there instructions to set up such Jenkins workflow? I remember
> that
> > the last few time I try to set up a hello-world workflow for another ASF
> > project but fail to get it right. I read some of the INFRA pages but
> still
> > I don't know how to create a project and how to properly configure the
> > workflow.
> >
> > > the credentials are there
> >
> > 2. Who's credentials?
> >
> > Best,
> > tison.
> >
> >
> > Christofer Dutz <ch...@c-ware.de> 于2023年5月27日周六 05:08写道:
> >
> > > If you run the build on asf Jenkins the credentials are there. You just
> > > need to inherit from the latest apache pom and it should work.
> > >
> > > Chris
> > >
> > > Gesendet von Outlook für Android<https://aka.ms/AAb9ysg>
> > > ________________________________
> > > From: tison <wa...@gmail.com>
> > > Sent: Friday, May 26, 2023 1:33:29 PM
> > > To: Maven Developers List <de...@maven.apache.org>; Incubator <
> > > general@incubator.apache.org>
> > > Subject: ASF Maven credential in a project-wise token?
> > >
> > > Hi,
> > >
> > > I'm configuring tokens for automatically deploying artifacts to the ASF
> > > snapshot repository[1].
> > >
> > > It requires configuring a user token to auth to the repository.
> Although
> > > I'm wondering if I must use my personal token or if there is some
> > > project-wise token to use. Even asking for an INFRA member to help
> > > configure, passing over a personal token to another one increases the
> > risk.
> > >
> > > Best,
> > > tison.
> > >
> > > [1]
> > >
> >
> https://github.com/tisonkun/opendal/actions/runs/5090173050/workflow#L129
> > >
> >
>

AW: ASF Maven credential in a project-wise token?

Posted by Christofer Dutz <ch...@c-ware.de>.
Hi,

and sorry for the late response.

Assuming it’s a Maven build, that you’re talking about.

The Jenkins machines (at least the ones labeled “ubuntu”) have maven credentials available in their settings.xml.
However, for the build to pick them up it’s important that you didn’t change the names of the repository ids.
So, if you correctly set the most recent apache parent as parent of your project, this should be setup automatically.

Then it’s as simple as doing a “mvn deploy” on Jenkins.

Hope that helps.


Chris



Von: tison <wa...@gmail.com>
Datum: Montag, 29. Mai 2023 um 11:05
An: general@incubator.apache.org <ge...@incubator.apache.org>, dev@opendal.apache.org <de...@opendal.apache.org>
Betreff: Re: ASF Maven credential in a project-wise token?
Thanks for your reference, Martin!

cc dev@opendal.a.o - I'm going to open a branch on the upstream repo to
verify this setting when I find some time.

Best,
tison.


Martin Grigorov <mg...@apache.org> 于2023年5月29日周一 16:21写道:

> Hi,
>
> Here is a setup using username and password provided by the Infra team -
>
> https://github.com/apache/avro/blob/0be01a58bd7586982953dda45d53ac3551c7b6c4/.github/workflows/java-publish-snapshot.yml#L56-L62
>
>  - name: Deploy Maven snapshots
>         env:
>           ASF_USERNAME: ${{ secrets.NEXUS_USER }}
>           ASF_PASSWORD: ${{ secrets.NEXUS_PW }}
>         run: |
>           echo
>
> "<settings><servers><server><id>apache.snapshots.https</id><username>$ASF_USERNAME</username><password>$ASF_PASSWORD</password></server></servers></settings>"
> > settings.xml
>           mvn --settings settings.xml -U -B -e -fae -ntp -DskipTests deploy
>
> I am not sure whether those are available per project or globally for the
> 'apache' Github organization.
> Try it and if it fails then contact the Infra team to add them for your
> project.
>
> On Sat, May 27, 2023 at 6:19 AM tison <wa...@gmail.com> wrote:
>
> > Hi Christofer,
> >
> > Thanks for your reply! Two questions here:
> >
> > 1. Are there instructions to set up such Jenkins workflow? I remember
> that
> > the last few time I try to set up a hello-world workflow for another ASF
> > project but fail to get it right. I read some of the INFRA pages but
> still
> > I don't know how to create a project and how to properly configure the
> > workflow.
> >
> > > the credentials are there
> >
> > 2. Who's credentials?
> >
> > Best,
> > tison.
> >
> >
> > Christofer Dutz <ch...@c-ware.de> 于2023年5月27日周六 05:08写道:
> >
> > > If you run the build on asf Jenkins the credentials are there. You just
> > > need to inherit from the latest apache pom and it should work.
> > >
> > > Chris
> > >
> > > Gesendet von Outlook für Android<https://aka.ms/AAb9ysg>
> > > ________________________________
> > > From: tison <wa...@gmail.com>
> > > Sent: Friday, May 26, 2023 1:33:29 PM
> > > To: Maven Developers List <de...@maven.apache.org>; Incubator <
> > > general@incubator.apache.org>
> > > Subject: ASF Maven credential in a project-wise token?
> > >
> > > Hi,
> > >
> > > I'm configuring tokens for automatically deploying artifacts to the ASF
> > > snapshot repository[1].
> > >
> > > It requires configuring a user token to auth to the repository.
> Although
> > > I'm wondering if I must use my personal token or if there is some
> > > project-wise token to use. Even asking for an INFRA member to help
> > > configure, passing over a personal token to another one increases the
> > risk.
> > >
> > > Best,
> > > tison.
> > >
> > > [1]
> > >
> >
> https://github.com/tisonkun/opendal/actions/runs/5090173050/workflow#L129
> > >
> >
>

Re: ASF Maven credential in a project-wise token?

Posted by tison <wa...@gmail.com>.
Thanks for your reference, Martin!

cc dev@opendal.a.o - I'm going to open a branch on the upstream repo to
verify this setting when I find some time.

Best,
tison.


Martin Grigorov <mg...@apache.org> 于2023年5月29日周一 16:21写道:

> Hi,
>
> Here is a setup using username and password provided by the Infra team -
>
> https://github.com/apache/avro/blob/0be01a58bd7586982953dda45d53ac3551c7b6c4/.github/workflows/java-publish-snapshot.yml#L56-L62
>
>  - name: Deploy Maven snapshots
>         env:
>           ASF_USERNAME: ${{ secrets.NEXUS_USER }}
>           ASF_PASSWORD: ${{ secrets.NEXUS_PW }}
>         run: |
>           echo
>
> "<settings><servers><server><id>apache.snapshots.https</id><username>$ASF_USERNAME</username><password>$ASF_PASSWORD</password></server></servers></settings>"
> > settings.xml
>           mvn --settings settings.xml -U -B -e -fae -ntp -DskipTests deploy
>
> I am not sure whether those are available per project or globally for the
> 'apache' Github organization.
> Try it and if it fails then contact the Infra team to add them for your
> project.
>
> On Sat, May 27, 2023 at 6:19 AM tison <wa...@gmail.com> wrote:
>
> > Hi Christofer,
> >
> > Thanks for your reply! Two questions here:
> >
> > 1. Are there instructions to set up such Jenkins workflow? I remember
> that
> > the last few time I try to set up a hello-world workflow for another ASF
> > project but fail to get it right. I read some of the INFRA pages but
> still
> > I don't know how to create a project and how to properly configure the
> > workflow.
> >
> > > the credentials are there
> >
> > 2. Who's credentials?
> >
> > Best,
> > tison.
> >
> >
> > Christofer Dutz <ch...@c-ware.de> 于2023年5月27日周六 05:08写道:
> >
> > > If you run the build on asf Jenkins the credentials are there. You just
> > > need to inherit from the latest apache pom and it should work.
> > >
> > > Chris
> > >
> > > Gesendet von Outlook für Android<https://aka.ms/AAb9ysg>
> > > ________________________________
> > > From: tison <wa...@gmail.com>
> > > Sent: Friday, May 26, 2023 1:33:29 PM
> > > To: Maven Developers List <de...@maven.apache.org>; Incubator <
> > > general@incubator.apache.org>
> > > Subject: ASF Maven credential in a project-wise token?
> > >
> > > Hi,
> > >
> > > I'm configuring tokens for automatically deploying artifacts to the ASF
> > > snapshot repository[1].
> > >
> > > It requires configuring a user token to auth to the repository.
> Although
> > > I'm wondering if I must use my personal token or if there is some
> > > project-wise token to use. Even asking for an INFRA member to help
> > > configure, passing over a personal token to another one increases the
> > risk.
> > >
> > > Best,
> > > tison.
> > >
> > > [1]
> > >
> >
> https://github.com/tisonkun/opendal/actions/runs/5090173050/workflow#L129
> > >
> >
>

Re: ASF Maven credential in a project-wise token?

Posted by tison <wa...@gmail.com>.
Thanks for your reference, Martin!

cc dev@opendal.a.o - I'm going to open a branch on the upstream repo to
verify this setting when I find some time.

Best,
tison.


Martin Grigorov <mg...@apache.org> 于2023年5月29日周一 16:21写道:

> Hi,
>
> Here is a setup using username and password provided by the Infra team -
>
> https://github.com/apache/avro/blob/0be01a58bd7586982953dda45d53ac3551c7b6c4/.github/workflows/java-publish-snapshot.yml#L56-L62
>
>  - name: Deploy Maven snapshots
>         env:
>           ASF_USERNAME: ${{ secrets.NEXUS_USER }}
>           ASF_PASSWORD: ${{ secrets.NEXUS_PW }}
>         run: |
>           echo
>
> "<settings><servers><server><id>apache.snapshots.https</id><username>$ASF_USERNAME</username><password>$ASF_PASSWORD</password></server></servers></settings>"
> > settings.xml
>           mvn --settings settings.xml -U -B -e -fae -ntp -DskipTests deploy
>
> I am not sure whether those are available per project or globally for the
> 'apache' Github organization.
> Try it and if it fails then contact the Infra team to add them for your
> project.
>
> On Sat, May 27, 2023 at 6:19 AM tison <wa...@gmail.com> wrote:
>
> > Hi Christofer,
> >
> > Thanks for your reply! Two questions here:
> >
> > 1. Are there instructions to set up such Jenkins workflow? I remember
> that
> > the last few time I try to set up a hello-world workflow for another ASF
> > project but fail to get it right. I read some of the INFRA pages but
> still
> > I don't know how to create a project and how to properly configure the
> > workflow.
> >
> > > the credentials are there
> >
> > 2. Who's credentials?
> >
> > Best,
> > tison.
> >
> >
> > Christofer Dutz <ch...@c-ware.de> 于2023年5月27日周六 05:08写道:
> >
> > > If you run the build on asf Jenkins the credentials are there. You just
> > > need to inherit from the latest apache pom and it should work.
> > >
> > > Chris
> > >
> > > Gesendet von Outlook für Android<https://aka.ms/AAb9ysg>
> > > ________________________________
> > > From: tison <wa...@gmail.com>
> > > Sent: Friday, May 26, 2023 1:33:29 PM
> > > To: Maven Developers List <de...@maven.apache.org>; Incubator <
> > > general@incubator.apache.org>
> > > Subject: ASF Maven credential in a project-wise token?
> > >
> > > Hi,
> > >
> > > I'm configuring tokens for automatically deploying artifacts to the ASF
> > > snapshot repository[1].
> > >
> > > It requires configuring a user token to auth to the repository.
> Although
> > > I'm wondering if I must use my personal token or if there is some
> > > project-wise token to use. Even asking for an INFRA member to help
> > > configure, passing over a personal token to another one increases the
> > risk.
> > >
> > > Best,
> > > tison.
> > >
> > > [1]
> > >
> >
> https://github.com/tisonkun/opendal/actions/runs/5090173050/workflow#L129
> > >
> >
>

Re: ASF Maven credential in a project-wise token?

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

Here is a setup using username and password provided by the Infra team -
https://github.com/apache/avro/blob/0be01a58bd7586982953dda45d53ac3551c7b6c4/.github/workflows/java-publish-snapshot.yml#L56-L62

 - name: Deploy Maven snapshots
        env:
          ASF_USERNAME: ${{ secrets.NEXUS_USER }}
          ASF_PASSWORD: ${{ secrets.NEXUS_PW }}
        run: |
          echo
"<settings><servers><server><id>apache.snapshots.https</id><username>$ASF_USERNAME</username><password>$ASF_PASSWORD</password></server></servers></settings>"
> settings.xml
          mvn --settings settings.xml -U -B -e -fae -ntp -DskipTests deploy

I am not sure whether those are available per project or globally for the
'apache' Github organization.
Try it and if it fails then contact the Infra team to add them for your
project.

On Sat, May 27, 2023 at 6:19 AM tison <wa...@gmail.com> wrote:

> Hi Christofer,
>
> Thanks for your reply! Two questions here:
>
> 1. Are there instructions to set up such Jenkins workflow? I remember that
> the last few time I try to set up a hello-world workflow for another ASF
> project but fail to get it right. I read some of the INFRA pages but still
> I don't know how to create a project and how to properly configure the
> workflow.
>
> > the credentials are there
>
> 2. Who's credentials?
>
> Best,
> tison.
>
>
> Christofer Dutz <ch...@c-ware.de> 于2023年5月27日周六 05:08写道:
>
> > If you run the build on asf Jenkins the credentials are there. You just
> > need to inherit from the latest apache pom and it should work.
> >
> > Chris
> >
> > Gesendet von Outlook für Android<https://aka.ms/AAb9ysg>
> > ________________________________
> > From: tison <wa...@gmail.com>
> > Sent: Friday, May 26, 2023 1:33:29 PM
> > To: Maven Developers List <de...@maven.apache.org>; Incubator <
> > general@incubator.apache.org>
> > Subject: ASF Maven credential in a project-wise token?
> >
> > Hi,
> >
> > I'm configuring tokens for automatically deploying artifacts to the ASF
> > snapshot repository[1].
> >
> > It requires configuring a user token to auth to the repository. Although
> > I'm wondering if I must use my personal token or if there is some
> > project-wise token to use. Even asking for an INFRA member to help
> > configure, passing over a personal token to another one increases the
> risk.
> >
> > Best,
> > tison.
> >
> > [1]
> >
> https://github.com/tisonkun/opendal/actions/runs/5090173050/workflow#L129
> >
>

Re: ASF Maven credential in a project-wise token?

Posted by tison <wa...@gmail.com>.
Hi Christofer,

Thanks for your reply! Two questions here:

1. Are there instructions to set up such Jenkins workflow? I remember that
the last few time I try to set up a hello-world workflow for another ASF
project but fail to get it right. I read some of the INFRA pages but still
I don't know how to create a project and how to properly configure the
workflow.

> the credentials are there

2. Who's credentials?

Best,
tison.


Christofer Dutz <ch...@c-ware.de> 于2023年5月27日周六 05:08写道:

> If you run the build on asf Jenkins the credentials are there. You just
> need to inherit from the latest apache pom and it should work.
>
> Chris
>
> Gesendet von Outlook für Android<https://aka.ms/AAb9ysg>
> ________________________________
> From: tison <wa...@gmail.com>
> Sent: Friday, May 26, 2023 1:33:29 PM
> To: Maven Developers List <de...@maven.apache.org>; Incubator <
> general@incubator.apache.org>
> Subject: ASF Maven credential in a project-wise token?
>
> Hi,
>
> I'm configuring tokens for automatically deploying artifacts to the ASF
> snapshot repository[1].
>
> It requires configuring a user token to auth to the repository. Although
> I'm wondering if I must use my personal token or if there is some
> project-wise token to use. Even asking for an INFRA member to help
> configure, passing over a personal token to another one increases the risk.
>
> Best,
> tison.
>
> [1]
> https://github.com/tisonkun/opendal/actions/runs/5090173050/workflow#L129
>

Re: ASF Maven credential in a project-wise token?

Posted by Christofer Dutz <ch...@c-ware.de>.
If you run the build on asf Jenkins the credentials are there. You just need to inherit from the latest apache pom and it should work.

Chris

Gesendet von Outlook für Android<https://aka.ms/AAb9ysg>
________________________________
From: tison <wa...@gmail.com>
Sent: Friday, May 26, 2023 1:33:29 PM
To: Maven Developers List <de...@maven.apache.org>; Incubator <ge...@incubator.apache.org>
Subject: ASF Maven credential in a project-wise token?

Hi,

I'm configuring tokens for automatically deploying artifacts to the ASF
snapshot repository[1].

It requires configuring a user token to auth to the repository. Although
I'm wondering if I must use my personal token or if there is some
project-wise token to use. Even asking for an INFRA member to help
configure, passing over a personal token to another one increases the risk.

Best,
tison.

[1]
https://github.com/tisonkun/opendal/actions/runs/5090173050/workflow#L129

Re: ASF Maven credential in a project-wise token?

Posted by Christofer Dutz <ch...@c-ware.de>.
If you run the build on asf Jenkins the credentials are there. You just need to inherit from the latest apache pom and it should work.

Chris

Gesendet von Outlook für Android<https://aka.ms/AAb9ysg>
________________________________
From: tison <wa...@gmail.com>
Sent: Friday, May 26, 2023 1:33:29 PM
To: Maven Developers List <de...@maven.apache.org>; Incubator <ge...@incubator.apache.org>
Subject: ASF Maven credential in a project-wise token?

Hi,

I'm configuring tokens for automatically deploying artifacts to the ASF
snapshot repository[1].

It requires configuring a user token to auth to the repository. Although
I'm wondering if I must use my personal token or if there is some
project-wise token to use. Even asking for an INFRA member to help
configure, passing over a personal token to another one increases the risk.

Best,
tison.

[1]
https://github.com/tisonkun/opendal/actions/runs/5090173050/workflow#L129