First, we will use Google Cloud Build to create a npm docker image with the JFrog CLI. This will enable us to use JFrog CLI to build npm packages.
Google Cloud Build uses Docker to execute builds. For each build step, Cloud Build executes a Docker container as an instance of docker run.
Return to your Cloud Shell terminal and change directory to gcp-gke-workshop/jfrog-cli-docker.
We will use Google Cloud Build to create JFrog CLI docker image. This build command uses cloudbuild.yaml. If you look inside this file, you will find it performs following steps
docker build
to create the docker imagedocker tag
to tag newly created imagedocker login
to log into your Free Tierdocker push
to push the newly created image to Artifactory’s Docker repository.gcloud builds submit --substitutions=_JFROG_SERVER_NAME="${JFROG_SERVER_NAME}",_JFROG_USER="${JFROG_USER}",_JFROG_API_KEY="${JFROG_API_KEY}" --gcs-log-dir=gs://${PROJECT_ID}_cloudbuild/clouddays --config=cloudbuild.yaml .
This command should result in a successful build of docker image and it should be pushed to Artifactory.