Link Search Menu Expand Document

Pipelines

Add your pipelines with github.


Configure pipeline

alt_text

Authorize pipeline

alt_text

Authorize with your token github pipeline

alt_text

In github, in your project authorize connection with rancher

alt_text alt_text

Put your credential given

Put in rancher your clientId et clientSecret

You have access to yor compte GitHub

alt_text

Your project structure have to be

alt_text

Codes in your project for deploy

Deployment

apiVersion: apps/v1
kind: Deployment
metadata:
  name: laravel
  labels:
    app: laravel
spec:
  replicas: 1
  selector:
    matchLabels:
      app: web
  template:
    metadata:
      labels:
        app: web
    spec:
      imagePullSecrets:
        - name: pipeline-docker-registry
      containers:
        - name: web
          image: ${CICD_IMAGE}:${CICD_EXECUTION_SEQUENCE}
          ports:
            - containerPort: 80
            - containerPort: 6001
              name: websocket-port

Pipeline

stages:
- name: Publish image laravel
  steps:
  - publishImageConfig:
      dockerfilePath: ./.docker/php/Dockerfile.prod
      buildContext: .
      tag: web:${CICD_EXECUTION_SEQUENCE}
- name: Deploy
  steps:
  - applyYamlConfig:
      path: ./.deploy/deployment_php.yml
branch:
  include:
  - production
  exclude:
  - branch
notification: {}

Back to top



Copyright © Jefferson OC. Distributed by an MIT license.