One place for hosting & domains

      Jenkins

      Comment installer Jenkins sur Ubuntu 20.04


      Introduction

      Si vous devez réaliser des tâches techniques répétitives, cela peut s’avérer être difficile de trouver des solutions d’automatisation qui répondent à vos attentes. Avec Jenkins, un serveur d’automatisation open-source, vous pouvez gérer vos tâches efficacement de la construction au déploiement de logiciels. Jenkins est basé sur Java. Son installation se fait à partir de paquets Ubuntu ou en téléchargeant et exécutant son fichier d’archive d’applications web (WAR) : une série de fichiers qui constituent une application web complète à exécuter sur un serveur.

      Dans ce tutoriel, nous allons installer Jenkins sur Ubuntu 20.04, démarrer le serveur de développement et créer un utilisateur administratif afin que vous commenciez à découvrir les capacités de Jenkins. Lorsque, à la fin de ce tutoriel, vous disposerez d’un serveur de niveau de développement prêt à l’utilisation suivez le guide Comment configurer Jenkins avec SSL en utilisant un proxy inverse Nginx sur Ubuntu 18.04 pour sécuriser cette installation.

      Conditions préalables

      Pour suivre ce tutoriel, vous aurez besoin de :

      Étape 1 — Installation de Jenkins

      La version de Jenkins incluse par défaut dans les paquets Ubuntu est souvent inférieure à la dernière version disponible sur le projet en lui-même. Installez Jenkins en utilisant les paquets gérés par le projet pour être sûr de bien avoir les dernières corrections et fonctionnalités.

      Tout d’abord, ajoutez la clé du référentiel au système :

      • wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add -

      Une fois la clé ajoutée, le système affichera OK.

      Ensuite, ajoutons l’adresse du référentiel Debian sur la sources.list​​​​​​ du serveur :

      • sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'

      Une fois les deux commandes saisies, nous exécuterons la update afin que apt utilise le nouveau référentiel.

      Enfin, nous installerons Jenkins et ses dépendances.

      Maintenant que Jenkins et ses dépendances sont installés, nous allons démarrer le serveur Jenkins.

      Étape 2 — Démarrage de Jenkins

      Démarrons Jenkins en utilisant systemctl :

      sudo systemctl start jenkins
      

      Étant donné que systemctl n’affichera pas le résultat de l’état, nous utiliserons la commande status pour vérifier si Jenkins a bien démarré :

      • sudo systemctl status jenkins

      Si tout a bien bien fonctionné, au début, le résultat de statut affiche que le service est actif et configuré pour démarrer au lancement :

      Output

      ● jenkins.service - LSB: Start Jenkins at boot time Loaded: loaded (/etc/init.d/jenkins; generated) Active: active (exited) since Fri 2020-06-05 21:21:46 UTC; 45s ago Docs: man:systemd-sysv-generator(8) Tasks: 0 (limit: 1137) CGroup: /system.slice/jenkins.service

      Maintenant que Jenkins est opérationnel, ajustons nos règles de pare-feu afin de pouvoir l’atteindre à partir d’un navigateur web et terminer la configuration initiale.

      Étape 3 — Ouvrir le pare-feu

      Pour configurer un pare-feu UFW, consultez Configuration initiale du serveur avec Ubuntu 20.04, Étape 4 – Configuration d’un pare-feu de base. Jenkins fonctionne par défaut sur le port 8080. Nous allons ouvrir ce port en utilisant ufw :

      Remarque : si le pare-feu est inactif, les commandes suivantes autoriseront OpenSSH et activeront le pare-feu :

      • sudo ufw allow OpenSSH
      • sudo ufw enable

      Vérifiez l’état de ufw pour confirmer les nouvelles règles :

      Vous remarquerez que le trafic vers le port 8080 est autorisé depuis n’importe où :

      Output

      Status: active To Action From -- ------ ---- OpenSSH ALLOW Anywhere 8080 ALLOW Anywhere OpenSSH (v6) ALLOW Anywhere (v6) 8080 (v6) ALLOW Anywhere (v6)

      Une fois Jenkins installé et notre pare-feu configuré, nous pouvons achever l’étape d’installation et nous plonger dans la configuration de Jenkins.

      Étape 4 — Configuration de Jenkins

      Pour configurer votre installation, consultez Jenkins sur son port par défaut, 8080 en utilisant votre nom de domaine ou l’adresse IP de votre serveur : http://your_server_ip_or_domain:8080

      Vous devriez voir apparaître l’écran Unlock Jenkins qui affichera l’emplacement du mot de passe initial :

      Ecran Débloquer Jenkins

      Dans la fenêtre du terminal, utilisez la commande cat pour afficher le mot de passe :

      • sudo cat /var/lib/jenkins/secrets/initialAdminPassword

      Copiez le mot de passe alphanumérique composé de 32 caractères du terminal et collez-le dans le champ Administrator password, puis cliquez sur Continue.

      L’écran suivant présente l’option d’installer des plugins suggérés ou de sélectionner des plugins spécifiques :

      Personnaliser l'écran de Jenkins

      Nous allons cliquer sur l’option Installer les plugins suggérés, qui lancera immédiatement le processus d’installation.

      Écran d'installation des plugins de Jenkins

      Une fois l’installation terminée, vous serez invité à configurer le premier utilisateur administratif. Vous pouvez sauter cette étape et continuer comme admin en utilisant le mot de passe initial utilisé ci-dessus, mais nous allons prendre quelque minutes pour créer l’utilisateur.

      Remarque : le serveur Jenkins par défaut n’est pas crypté, ce qui signifie que les données soumises avec ce formulaire ne sont pas protégées. Consultez Comment configurer Jenkins avec SSL en utilisant un proxy inverse Nginx sur Ubuntu 20.04 pour protéger les identifiants d’utilisateur et les informations sur les constructions transmises via l’interface web.

      Écran Créer le premier utilisateur administrateur de Jenkins

      Saisissez le nom et le mot de passe de votre utilisateur :

      Créer un utilisateur dans Jenkins

      Vous verrez apparaître une page Instance configuration qui vous demandera de confirmer l’URL préférée de votre instance Jenkins. Vérifiez qu’il s’agit bien du nom de domaine ou de l’adresse IP de votre serveur :

      Configuration d'instance dans Jenkins

      Après avoir confirmé l’exactitude des informations, cliquez sur Save and Finish Vous verrez apparaître une page de confirmation confirmant que « Jenkins est prêt ! » :

      Écran Jenkins est prêt

      Cliquez sur Start using Jenkins pour consulter le tableau de bord principal de Jenkins :

      Bienvenue dans l'écran de Jenkins

      À ce stade, vous avez terminé d’installer correctement Jenkins.

      Conclusion

      Dans ce tutoriel, vous avez installé Jenkins en utilisant les paquets fournis par le projet, démarré le serveur, ouvert le pare-feu et créé un utilisateur administratif. À ce stade, vous pouvez commencer à explorer Jenkins.

      Une fois que vous aurez terminé, suivez le guide Comment configurer Jenkins avec SSL en utilisant un proxy inverse Nginx sur Ubuntu 20.04 pour protéger vos mots de passe, ainsi que toute information sensible du système ou du produit qui sera envoyée entre votre machine et le serveur en texte clair pour continuer à utiliser Jenkins.

      Pour en savoir plus sur ce que vous pouvez faire avec Jenkins, consultez d’autres tutoriels sur le sujet :



      Source link

      Como instalar o Jenkins no Ubuntu 20.04


      Introdução

      Quando confrontado com tarefas técnicas repetitivas, encontrar soluções de automação que funcionem pode ser uma tarefa árdua. Com o Jenkins, um servidor de automação de código aberto, você pode gerenciar eficientemente tarefas que vão desde a compilação até a implantação de software. O Jenkins é baseado em Java, instalado a partir de pacotes do Ubuntu ou baixando e executando seu arquivo de aplicativos web (WAR) — uma coleção de arquivos que constituem uma aplicação web completa para ser executada em um servidor.

      Neste tutorial, instalaremos o Jenkins no Ubuntu 20.04, iniciaremos o servidor de desenvolvimento e criaremos um usuário administrativo para que você comece a explorar o que o Jenkins pode fazer. Embora você vá ter um servidor de desenvolvimento pronto para ser usado na conclusão deste tutorial, para proteger esta instalação para a produção, siga o guia How to Configure Jenkins with SSL Using an Nginx Reverse Proxy on Ubuntu 18.04.

      Pré-requisitos

      Para seguir este tutorial, será necessário:

      Passo 1 — Instalando o Jenkins

      A versão do Jenkins incluída com os pacotes padrão do Ubuntu está, frequentemente, atrás da versão mais recente disponível do projeto. Para garantir que você tenha as últimas correções e recursos, use os pacotes mantidos pelo projeto para instalar o Jenkins.

      Primeiro, adicione a chave do repositório ao sistema:

      • wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add -

      Depois que a chave for adicionada, o sistema irá retornar com um OK.

      Em seguida, adicione o endereço do repositório de pacotes Debian ao sources.list do servidor:

      • sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'

      Depois que os dois comandos foram digitados, executaremos o update para que o apt use o novo repositório.

      Finalmente, instalaremos o Jenkins e suas dependências.

      Agora que o Jenkins e suas dependências estão funcionando, vamos iniciar o servidor Jenkins.

      Passo 2 — Inicializando o Jenkins

      Vamos iniciar o Jenkins usando o systemctl:

      sudo systemctl start jenkins
      

      Como o systemctl não mostra saída de status, vamos utilizar o comando status para verificar se o Jenkins iniciou com sucesso:

      • sudo systemctl status jenkins

      Se tudo correu bem, o começo da saída de status deve mostrar que o serviço está ativo e configurado para iniciar na inicialização:

      Output

      ● jenkins.service - LSB: Start Jenkins at boot time Loaded: loaded (/etc/init.d/jenkins; generated) Active: active (exited) since Fri 2020-06-05 21:21:46 UTC; 45s ago Docs: man:systemd-sysv-generator(8) Tasks: 0 (limit: 1137) CGroup: /system.slice/jenkins.service

      Agora que o Jenkins está funcionando, vamos ajustar nossas regras de firewall para que possamos acessá-lo a partir de um navegador Web para completar a configuração inicial.

      Passo 3 — Abrindo o firewall

      Para configurar um firewall UFW, veja o tutorial Initial Server Setup with Ubuntu 20.04, Step 4- Setting up a Basic Firewall Por padrão, o Jenkins é executado na porta 8080. Abriremos essa porta usando o ufw:

      Nota: Se o firewall estiver inativo, os comandos a seguir permitirão o OpenSSH e habilitarão o firewall:

      • sudo ufw allow OpenSSH
      • sudo ufw enable

      Verifique o status do ufw para confirmar as novas regras:

      Você vai notar que o tráfego está autorizado para a porta 8080 a partir de qualquer lugar:

      Output

      Status: active To Action From -- ------ ---- OpenSSH ALLOW Anywhere 8080 ALLOW Anywhere OpenSSH (v6) ALLOW Anywhere (v6) 8080 (v6) ALLOW Anywhere (v6)

      Com o Jenkins instalado e nosso firewall configurado, podemos completar o estágio de instalação e mergulhar na configuração do Jenkins.

      Passo 4 — Configurando o Jenkins

      Para configurar sua instalação, visite o Jenkins na sua porta padrão, 8080, usando o nome de domínio ou endereço IP do seu servidor: http://your_server_ip_or_domain:8080

      Você deve receber a tela Unlock Jenkins, que exibe a localização da senha inicial:

      Unlock Jenkins screen

      Na janela do terminal, utilize o comando cat para mostrar a senha:

      • sudo cat /var/lib/jenkins/secrets/initialAdminPassword

      Copie a senha alfanumérica de 32 caracteres do terminal e cole-a no campo Administrator password, e então clique em Continue.

      A tela seguinte apresenta a opção de instalar plug-ins sugeridos ou selecionar plug-ins específicos:

      Customize Jenkins Screen

      Vamos clicar na opção Install suggested plugins, que iniciará imediatamente o processo de instalação:

      Jenkins Getting Started Install Plugins Screen

      Quando a instalação for concluída, você será solicitado a configurar o primeiro usuário administrativo. É possível ignorar este passo e continuar como admin usando a senha inicial que usamos acima, mas vamos gastar um tempo para criar o usuário.

      Nota: o servidor padrão Jenkins NÃO é criptografado, então os dados apresentados com este formulário não estão protegidos. Consulte o tutorial How to Configure Jenkins with SSL Using an Nginx Reverse Proxy on Ubuntu 20.04 para proteger as credenciais de usuário e informações sobre as compilações que são transmitidas através da interface Web.

      Jenkins Create First Admin User Screen

      Digite o nome e senha para seu usuário:

      Jenkins Create User

      Você verá uma página Instance Configuration que pedirá que você confirme o URL preferido para sua instância Jenkins. Confirme o nome do domínio para seu servidor ou o endereço IP do seu servidor:

      Jenkins Instance Configuration

      Após confirmar as informações apropriadas, clique em Save and Finish. Você receberá uma página de confirmação informando “Jenkins is Ready!”:

      Jenkins is ready screen

      Clique em Start using Jenkins para visitar o painel principal do Jenkins:

      Welcome to Jenkins Screen

      Neste ponto, você completou a instalação do Jenkins com sucesso.

      Conclusão

      Neste tutorial, você instalou o Jenkins usando os pacotes fornecidos pelo projeto, iniciou o servidor, abriu o firewall e criou um usuário administrativo. Agora, você pode começar a explorar o Jenkins.

      Quando você tiver completado sua exploração, siga o tutorial How to Configure Jenkins with SSL Using an Nginx Reverse Proxy on Ubuntu 20.04 para proteger suas senhas, bem como quaisquer informações sensíveis de produto ou de sistema que serão enviadas entre sua máquina e o servidor em texto simples usando o Jenkins.

      Para saber mais sobre o que você pode fazer usando o Jenkins, confira outros tutoriais sobre o assunto:



      Source link

      How to Deploy Jenkins X in Linode Kubernetes Engine


      Updated by Linode Contributed by Daniele Polencic

      Marquee image for How to Deploy Jenkins X in Linode Kubernetes Engine

      What is Jenkins X?

      Jenkins X is CI/CD tool that automates the management of development environments and the promotion of new versions of applications between environments. This guide illustrates how to install Jenkins X on Linode Kubernetes Engine.

      Before You Begin

      1. You will need a personal GitHub account. If you don’t have one, you can register here.
      2. You need a GitHub account for your bot. This bot automates actions like triaging issues, merging Pull Requests, etc. You can register your bot account here.
      3. You will need an account on DockerHub. If you don’t have one, you can register here.

      Create an LKE Cluster

      Follow the instructions in Deploying and Managing a Cluster with Linode Kubernetes Engine Tutorial to create and connect to an LKE cluster.

      We recommend using three 16GB Linodes to start with.

      Creating a Kubernetes cluster on Linode

      You can verify that the installation is successful with:

      kubectl get nodes
      

      The output should similar to:

        
      NAME                        STATUS   ROLES    AGE   VERSION
      lke7189-9006-5f05145fc9a3   Ready       8h    v1.17.3
      lke7189-9006-5f051460a1e2   Ready       8h    v1.17.3
      lke7189-9006-5f0514617a87   Ready       8h    v1.17.3
      
      

      Install jx

      To install Jenkins X, you need the jx command-line tool. You can find the instruction on how to install jx on the official documentation.

      You can verify that the installation is successful with:

      jx version
      

      The output should be similar to:

        
      Version        2.1.80
      Commit         b2bd447
      Build date     2020-06-23T15:34:17Z
      Go version     1.13.8
      Git tree state clean
      
      

      Bootstrap Jenkins X

      Note

      If you used the export command with the KUBECONFIG variable so that you can use kubectl to connect to your cluster, you will need to perform the following steps in the same terminal terminal window where you executed that command in order for jx to also be able to connect to your cluster.

      1. Create a new folder, navigate to the new folder, and execute the jx boot command to start a new project:

        mkdir jenkins-x
        cd jenkins-x
        jx boot
        

        The command prompts the following message:

          
        Creating boot config with defaults, as not in an existing boot directory with a git repository.
        No Jenkins X pipeline file jenkins-x.yml or no jx boot requirements file jx-requirements.yml found. You are not running this command from inside a Jenkins X Boot git clone
        To continue we will clone https://github.com/jenkins-x/jenkins-x-boot-config.git @ master to jenkins-x-boot-config
        ? Do you want to clone the Jenkins X Boot Git repository? [? for help] (Y/n)
        
        

        Yes is the default answer, so you can press enter and continue to the next step.

      2. In the next step, the CLI clones the Jenkins X configuration repo and validates your configuration.

        The command-line tool expects the cluster name to be in the format <project id>_<zone>_<cluster name> — which is the default if you want to use Google Kubernetes Engine. Since Linode Kubernetes Engine doesn’t follow the same naming pattern, the validation fails:

          
        Cloning https://github.com/jenkins-x/jenkins-x-boot-config.git @ master to jenkins-x-boot-config
        Attempting to resolve version for boot config https://github.com/jenkins-x/jenkins-x-boot-config.git from https://github.com/jenkins-x/jenkins-x-versions.git
        Booting Jenkins X
        
        STEP: validate-git command: /bin/sh -c jx step git validate in dir: /tmp/jenkinsx/jenkins-x-boot-config/env
        
        STEP: verify-preinstall command: /bin/sh -c jx step verify preinstall --provider-values-dir="kubeProviders" in dir: /tmp/jenkinsx/jenkins-x-boot-config
        
        error: : unable to parse lke7389 as <project id>_<zone>_<cluster name>
        error: failed to interpret pipeline file /tmp/jenkinsx/jenkins-x-boot-config/jenkins-x.yml: failed to run '/bin/sh -c jx step verify preinstall --provider-values-dir="kubeProviders"' command in directory '/tmp/jenkinsx/jenkins-x-boot-config', output: ''
        
        

        But don’t worry, this error can be fixed. If you inspect the current folder, you should notice that jx created a jenkins-x-boot-config folder. In that folder, there’s a jx-requirements.yml file with the details of your cluster.

        Open that with your favourite editor and identify the line that starts with: provider: gke. You should change that to provider: kubernetes.

        jx-requirements.yml
         1
         2
         3
         4
         5
         6
         7
         8
         9
        10
        
        autoUpdate:
          enabled: false
          schedule: ""
        bootConfigURL: https://github.com/jenkins-x/jenkins-x-boot-config.git
        cluster:
          gitKind: github
          gitName: github
          gitServer: https://github.com
          namespace: jx
          provider: gke # <- you should change this line to "kubernetes"!
      3. It’s time to run the jx boot command again, but this time from within the jenkins-x-boot-config folder:

        cd jenkins-x-boot-config
        jx boot
        

        This time, the command stops at a different step, which has you confirm you’d like to run jx on a service that is not GKE or EKS:

          
        Attempting to resolve version for boot config https://github.com/jenkins-x/jenkins-x-boot-config from https://github.com/jenkins-x/jenkins-x-versions.git
        Booting Jenkins X
        
        STEP: validate-git command: /bin/sh -c jx step git validate in dir: /tmp/jenkinsx/jenkins-x-boot-config/env
        
        STEP: verify-preinstall command: /bin/sh -c jx step verify preinstall --provider-values-dir="kubeProviders" in dir: /tmp/jenkinsx/jenkins-x-boot-config
        
        jx boot has only been validated on GKE and EKS, we'd love feedback and contributions for other Kubernetes providers
        ? Continue execution anyway? (Y/n)
        
        

        Yes is the default answer, so press enter and continue executing.

      4. The next question is the cluster name:

          
        ? Cluster name
        
        

        Enter jenkins-x-lke.

      5. Next, make yourself the Git Owner.

          
        ? Git Owner name for environment repositories
        
        

        Type in your GitHub username, and press enter.

      6. In the next step, name the users you wish to associate as an approver. This should include your username and the names of any other members of your team which you wish to grant this ability, and the input should be a comma separated list.

          
        Environment repos will be private, if you want to create public environment repos, please set environmentGitPublic to true in jx-requirements.yml
        ? Comma-separated git provider usernames of approvers for development environment repository
        
        
      7. Pay attention to the next question, which describes that the webhooks will be called over HTTP, not HTTPS:

          
        Locking version stream https://github.com/jenkins-x/jenkins-x-versions.git to release v1.0.529. Jenkins X will use this release rather than master to resolve all versions from now on.
        writing the following to the OWNERS file for the development environment repository:
        approvers:
        - <your_GitHub_username>
        reviewers:
        - <your_GitHub_username>
        WARNING: TLS is not enabled so your webhooks will be called using HTTP. This means your webhook secret will be sent to your cluster in the clear. See https://jenkins-x.io/docs/getting-started/setup/boot/#ingress for more information
        ? Do you wish to continue? [? for help] (y/N)
        
        

        Notice how No is the default answer. However, you should answer Yes and move on to the next question.

      8. In the next steps, jx configures several components in your cluster. It might take a while before you’re requested to interact with the terminal. When you do, the next questions are about the Jenkins X admin:

          
        ? Jenkins X Admin Username (admin)
        ? Jenkins X Admin Password
        
        

        You should choose a name and a password for the admin user.

      9. Next, you enter in the info about your Jenkins X Bot.

        The bot will help you triage issues, Pull Requests and execute chores. In this part, you should enter the details for your bot (the GitHub account that you created in advance):

          
        ? Pipeline bot Git username
        ? Pipeline bot Git email address
        ? Pipeline bot Git token
        
        

        You can create a token for your bot by visiting this URL.

        Note

        Please note that you should create the token with the Bot’s account and not yours.

        Creating an API token on GitHub

      10. You can use the same token for the next question (and just press enter):

          
        ? HMAC token, used to validate incoming webhooks. Press enter to use the generated token
        
        
      11. The next question is crucial, as it concerns how Jenkins X will interact with the docker registry:

          
        ? Do you want to configure non default Docker Registry? (y/N)
        
        

        Linode does not offer a container registry at the moment, so you will use Docker Hub as your container registry. You should answer Yes which is NOT the default option. Answer the following questions accordingly:

          
        ? Do you want to configure non default Docker Registry? Yes
        ? Docker Registry Url <accept-the-default-value>
        ? Docker Registry username <enter-your-dockerhub-username>
        ? Docker Registry password <enter-your-dockerhub-password>
        ? Docker Registry email <enter-your-dockerhub-email>
        
        

      The installation should complete with the following output:

        
      Verifying the git config
      Verifying username <bot-name> at git server github at https://github.com
      Found 1 organisation in git server https://github.com: learnk8s
      Validated pipeline user <bot-name> on git server https://github.com
      Git tokens seem to be setup correctly
      Installation is currently looking: GOOD
      Using namespace 'jx' from context named 'lke7411-ctx' on server 'https://c50d6328-b182-4fe9-9746-7f6e2b2e1b4d.ap-south-1.linodelke.net:443'.
      
      

      Jenkins X is installed!

      If you inspect your GitHub profile, you might have noticed that there are three new private repositories:

      • environment-jenkins-x-lke-dev
      • environment-jenkins-x-lke-staging
      • environment-jenkins-x-lke-prod

      The repositories hold the configuration for each environment.

      Your First Project

      In this part, you will set up a CI/CD pipeline for a Java (Spring Boot) application. The same steps are valid for any other language or framework.

      1. You should fork the Jenkins X Demo repository from LearnK8s.

      2. Next, clone the repository locally and change your current directory, being sure to add your GitHub username to the cloned repository’s address:

        git clone [email protected]:your-github-username/jenkins-x-demo
        cd jenkins-x-demo
        
      3. You can import the project in Jenkins X with the following command:

        jx import
        

        You will see a similar output to this:

          
        PipelineActivity for <your-gh-username>-jenkins-x-demo-master-1
        upserted PipelineResource meta-<your-gh-username>-jenkins-x-dlncr for the git repository https://github.com/<your-gh-username>/jenkins-x-demo.git
        upserted Task meta-<your-gh-username>-jenkins-x-dlncr-meta-pipeline-1
        upserted Pipeline meta-<your-gh-username>-jenkins-x-dlncr-1
        created PipelineRun meta-<your-gh-username>-jenkins-x-dlncr-1
        created PipelineStructure meta-<your-gh-username>-jenkins-x-dlncr-1
        
        Watch pipeline activity via:    jx get activity -f jenkins-x-demo -w
        Browse the pipeline log via:    jx get build logs <your-gh-username>/jenkins-x-demo/master
        You can list the pipelines via: jx get pipelines
        When the pipeline is complete:  jx get applications
        
        For more help on available commands see: https://jenkins-x.io/developing/browsing/
        
        
      4. You can now run the following command to follow the pipeline output:

        jx get build logs <yourgithubuser>/jenkins-x-demo/master
        

        The pipeline will take around three or four minutes to complete, as it has to:

        • Compile the project.
        • Create tags in the repository.
        • Build and push the container image to Docker Hub.
        • Package the Helm chart for the application.
      5. In the last step of the pipeline, Jenkins X raises a Pull Request to the repository that holds the configuration of your staging environment (created by default during installation).

        At the end of the pipeline you will see the following output:

          
        Created Pull Request: https://github.com//environment-jenkins-x-lke-staging/pull/1
        
        

        The Pull Request is an automatic promotion to the staging environment. If you merge the Pull Request, the application is automatically promoted to the staging environment.

        You can merge the Pull Request to see the pipeline applying the changes in the staging environment.

        If the promotion is successful, you can inspect the app with:

        jx get applications
        
          
        APPLICATION      STAGING PODS URL
        jenkins-x-demo   0.0.10       http://jenkins-x-staging.178.79.175.247.nip.io
        
        

      It might take some time for your application to start. However, when it’s started, you can visit the app at the URL provided and see it running.

      More Information

      You may wish to consult the following resources for additional information on this topic. While these are provided in the hope that they will be useful, please note that we cannot vouch for the accuracy or timeliness of externally hosted materials.

      This guide is published under a CC BY-ND 4.0 license.



      Source link