Skip to content

Unable to integrate with Jenkins #116

@nadishan

Description

@nadishan

I run this image using Jenkins. But gradlew is failed with this error message.

The SDK directory is not writable (/opt/android)

Jenkinsefile

pipeline {
  agent {
    docker {
      image 'reactnativecommunity/react-native-android'
    }

  }
  stages {
    stage('Test') {
      steps {
        sh 'npm install'
      }
    }

    stage('Build') {
      steps {
        sh 'cd android && chmod +x gradlew && ./gradlew assembleRelease'
      }
    }

    stage('PROD') {
      parallel {
        stage('PROD') {
          steps {
            echo 'prod'
          }
        }

        stage('DEV') {
          steps {
            echo 'dev'
          }
        }

      }
    }

  }
  environment {
    npm_config_cache = 'npm-cache'
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions