Giter Site home page Giter Site logo

jenkinsfile's Introduction

Jenkinsfile

plugins we use Terraform Plugin

CloudBees Docker Build and Publish plugin

Docker API Plugin

Docker Pipeline

Google Container Registry Auth Plugin

Google Kubernetes Engine Plugin

Google OAuth Credentials plugin ############################################################################################## Plugins installation Docker cli installation https://docs.docker.com/engine/install/ubuntu/ or sudo apt install docker.io -y

getent group docker [verify if present] sudo su jenkins sudo groupadd docker sudo usermod -aG docker $USER sudo ls -l /var/run/docker.sock sudo ls -l /var/run/docker.sock sudo systemctl status docker sudo systemctl start docker getent group docker [verify if jenkins is added to the group] Add docker & Jenkins into sudoers vi /etc/sudoers jenkins ALL=(ALL) NOPASSWD:ALL docker ALL=(ALL) NOPASSWD:ALL Ensure to logout & log back into jenkins for changes to apply. Both from CLI & GUI #Note: Mandatrory to restart Jenkins Still getting authentication error for pushing docker image gcloud auth login gcloud auth configure-docker us-central1-docker.pkg.dev

gcloud CLI installation https://cloud.google.com/sdk/docs/install#versioned Kubectl installation https://cloud.google.com/kubernetes-engine/docs/how-to/cluster-access-for-kubectl#apt sudo apt-get install google-cloud-sdk-gke-gcloud-auth-plugin GitHub code for mvn-project https://github.com/shantanu-da/mvn-project GitHub code for pipelines https://github.com/shantanu-da/Jenkinsfile GithUb code for helm chart

Performed these commands on Jenkins CLI after CI-CD Pipeline worked fine. Problem is: Helm chart is getting deployed but Image pull fromGCR gives authentication error kubectl create secret docker-registry gcr-access-token
--docker-server=us.gcr.io
--docker-username=oauth3accesstoken
--docker-password="$(gcloud auth print-access-token)"
--docker-email=[email protected] kubectl delete secret gcr-access-token kubectl patch serviceaccount default -p '{"imagePullSecrets": [{"name": "gcr-access-token"}]}' [seviceaccount is of kubernetes, not GCP serviceaccount] Reference documentation: https://blog.container-solutions.com/using-google-container-registry-with-kubernetes Docker DocumentationDocker Documentation Install Docker Engine on Ubuntu Jumpstart your client-side server applications with Docker Engine on Ubuntu. This guide details prerequisites and multiple methods to install Docker Engine on Ubuntu. Jan 31st (37 kB) https://docs.docker.com/engine/install/ubuntu/

Google CloudGoogle Cloud Install the gcloud CLI | Google Cloud CLI Documentation (17 kB) https://cloud.google.com/sdk/docs/install#versioned

Google CloudGoogle Cloud Install kubectl and configure cluster access | Google Kubernetes Engine (GKE) | Google Cloud (17 kB) https://cloud.google.com/kubernetes-engine/docs/how-to/cluster-access-for-kubectl#apt

GitHubGitHub GitHub - shantanu-da/mvn-project Contribute to shantanu-da/mvn-project development by creating an account on GitHub. (36 kB) https://github.com/shantanu-da/mvn-project

GitHubGitHub GitHub - shantanu-da/Jenkinsfile Contribute to shantanu-da/Jenkinsfile development by creating an account on GitHub. (32 kB)

jenkinsfile's People

Contributors

shantanu-da avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.