Is there a way to keep Hudson / Jenkins configuration files in source control?

后端 未结 10 813
难免孤独
难免孤独 2020-11-29 15:45

I am new to Hudson / Jenkins and was wondering if there is a way to check in Hudson\'s configuration files to source control.

Ideally I want to be able to click some

10条回答
  •  萌比男神i
    2020-11-29 16:08

    Answer from Mark (https://stackoverflow.com/a/4066654/142207) should work for SVN and Git (although Git configuration did not work for me).

    But if you need it to work with Mercurial repo, create a job with following script:

    hg remove -A || true
    hg add ../../config.xml
    hg add ../../*/config.xml
    if [ ! -z "`hg status -admrn`" ]; then
        hg commit -m "Scheduled commit" -u fill_in_the@blank.com
        hg push
    fi
    

提交回复
热议问题