diff --git a/Dockerfile b/Dockerfile index 47ef3983a..7b198cb81 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,16 +1,19 @@ FROM nasqueron/arcanist RUN export DEBIAN_FRONTEND=noninteractive \ && apt-get update \ && apt-get -y install \ g++ \ apache2 \ mariadb-server \ + sudo \ && rm -rf /var/lib/apt/lists/* RUN /etc/init.d/mysql start \ && mysqladmin -u root password root \ && /etc/init.d/mysql stop +RUN echo 'ALL ALL = (ALL) NOPASSWD: ALL' >> /etc/sudoers + RUN /opt/libphutil/scripts/build_xhpast.php diff --git a/Jenkinsfile b/Jenkinsfile index 71de3d739..0e8ed0c58 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,57 +1,57 @@ pipeline { agent { dockerfile { additionalBuildArgs '--tag arcanist' } } environment { HOME = "$WORKSPACE" GIT_COMMITTER_NAME = 'jenkins' GIT_COMMITTER_EMAIL = 'jenkins@c4science.ch' } stages { stage('start services') { steps { - sh '/etc/init.d/mysql start' - sh '/etc/init.d/apache2 start' + sh 'sudo /etc/init.d/mysql start' + sh 'sudo /etc/init.d/apache2 start' } } stage('install phabricator'){ steps { sh ''' git clone -b stable https://c4science.ch/source/libphutil.git git clone -b stable https://secure.phabricator.com/diffusion/ARC/arcanist.git ''' sh ''' cd phabricator ./bin/config set mysql.host localhost ./bin/config set mysql.user root ./bin/config set mysql.pass root ./bin/storage upgrade --force ''' } } stage('arcanist') { steps { sh 'arc lint --everything --severity error' sh 'arc unit --everything --rev HEAD^' } } stage('celerity') { steps { sh './bin/celerity map' } } } post { always { archiveArtifacts artifacts: './resources/celerity/map.php' } } options { checkoutToSubdirectory('phabricator') } }