Quantcast
Channel: Active questions tagged dockerfile - DevOps Stack Exchange
Viewing all articles
Browse latest Browse all 136

Package installed using Dockerfile not available on Jenkins pipeline stage

$
0
0

I'm having sort of a weird problem with my Jenkins pipeline. I've defined a Dockerfile which installs some tools I need for my CI/CD pipeline, such as node, npm, sfdx, and sfpowerkit (a plugin for sfdx). This is the Dockerfile:

FROM node:14.14-alpine#add usefull toolsRUN apk add --update --no-cache  \  git \  findutils \  bash \  unzip \  curl \  wget \  nodejs-npm \  openjdk8-jre \  openssh-client \  perl \  jq# install Salesforce CLI from npmRUN npm install sfdx-cli --globalRUN sfdx --version# install sfpowerkit - https://github.com/Accenture/sfpowerkitRUN echo y | sfdx plugins:install sfpowerkitRUN sfdx plugins

My Jenkinsfile is pretty simple as well:

pipeline {    agent {        dockerfile true    }    stages {        stage("build") {            steps {                echo "build step"                sh 'node --version'                sh 'npm --version'                sh "sfdx --version"                sh "sfdx plugins --core"                sh "sfdx plugins"                sh "sfdx commands"                sh 'sfdx sfpowerkit --help'<-- this command fails            }        }    }}

The problem is that even though I install the plugin sfpowerkit and it shows on the job output that it was successfully installed, the plugin is not available inside the build stage.

This is during the Dockerfile image construction:

sfdx plugins command during Dockerfile build

And this is during the build stage on the pipeline:

sfdx plugins command during build stage

I can't find out what the problem is, and why the plugin is not available after constructing the container through the Dockerfile.

Would anyone be kind to help?

Thank you!!


Viewing all articles
Browse latest Browse all 136

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>