Need suggestions about build OpenWrt in docker with jenkins

Hi all,

On our release flow, we would like use Jenkins Pipeline to build firmware and release it.
We try to use following example code to build firmware from openwrt.

pipeline {
    environment {
    agent {
        docker {
            image 'openwrt:rts'
    stages {
        stage('Checkout') {
            steps {
                git(url: 'ssh://git@git01/openwrt/openwrt.git', branch: '19.07.7/development')
        stage('Build in Docker') {
            steps {
                sh '''
                    source env/$PROJECT.conf;

Since the feeds are private repo in our server, git clone needs key to checkout the code of feeds.
Inside docker env, we do not have the key(no home directory to save key) to clone feeds from our server.
Does anyone have experience about how to resolve authentication problem at git clone in docker?
I hope this is clear for anyone. Thanks.

  1. Declare credentials under an arbitrary ID in Jenkins
  2. Specify that ID to the git step using the credentialsId option
1 Like

Hi @Fiouz

credentialsId is easy way to apply specific authentication to docker. Thanks.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.