aboutsummaryrefslogblamecommitdiffstats
path: root/.drone.yml
blob: 65cfbb47d14f5341de6cb76381ccbedff03ecb45 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
   

              
            

      



                             
                                                       
 
              
                              

                
                        
               
                        
                                    
             
             
                                                                  
                                                                                                                                                  
                                                                     
                                                                                                                                                                                                     
 
                 


                        
                        
               
                        
                                    
             
                                                                     
                                              







                                                                                

































                                                                                                                                                                                                                                               
                      
                                        
                   




                        
                

                                                
                                                                                                                                                                                                                     
                                                                                                                                                                    



                 
 

               
                                                                      

   
---
kind: pipeline
type: docker
name: docker

steps:
  - name: docker
    image: docker:stable-dind
    privileged: true
    detach: true
    command: [ "dockerd", "--host=tcp://0.0.0.0:2375" ]

  - name: test
    image: ezkrg/buildx:latest
    environment:
      USER:
        from_secret: DHU
      PASSWORD:
        from_secret: DHP
      DOCKER_HOST: tcp://docker:2375
    commands:
    - sleep 5
    - docker run --rm --privileged tonistiigi/binfmt --install all
    - docker buildx create --use --name docker --node docker --platform linux/amd64,linux/arm64,linux/armhf --driver docker-container $DOCKER_HOST
    - echo $PASSWORD | docker login --username $USER --password-stdin
    - docker buildx build --push --cache-from ezkrg/bitlbee-libpurple:cache --cache-to ezkrg/bitlbee-libpurple:cache -t ezkrg/bitlbee-libpurple:test --platform linux/amd64,linux/arm64,linux/armhf .

  - name: release
    image: docker:stable
    environment:
      USER:
        from_secret: DHU
      PASSWORD:
        from_secret: DHP
      DOCKER_HOST: tcp://docker:2375
    commands:
    - echo $PASSWORD | docker login --username $USER --password-stdin
    - docker pull ezkrg/bitlbee-libpurple:test
    - docker tag ezkrg/bitlbee-libpurple:test ezkrg/bitlbee-libpurple:$DRONE_TAG
    - docker push ezkrg/bitlbee-libpurple:$DRONE_TAG
    - docker tag ezkrg/bitlbee-libpurple:test ezkrg/bitlbee-libpurple:latest
    - docker push ezkrg/bitlbee-libpurple:latest
    when:
      event:
      - tag

  - name: debian-test
    image: ezkrg/buildx:latest
    environment:
      USER:
        from_secret: DHU
      PASSWORD:
        from_secret: DHP
      DOCKER_HOST: tcp://docker:2375
    commands:
    - sleep 5
    - docker run --rm --privileged tonistiigi/binfmt --install all
    - docker buildx create --use --name docker --node docker --platform linux/amd64,linux/arm64,linux/armhf --driver docker-container $DOCKER_HOST
    - echo $PASSWORD | docker login --username $USER --password-stdin
    - docker buildx build --push --cache-from ezkrg/bitlbee-libpurple:debian-cache --cache-to ezkrg/bitlbee-libpurple:debian-cache -t ezkrg/bitlbee-libpurple:debian-test --platform linux/amd64,linux/arm64,linux/armhf -f Dockerfile.debian .

  - name: debian-release
    image: docker:stable
    environment:
      USER:
        from_secret: DHU
      PASSWORD:
        from_secret: DHP
      DOCKER_HOST: tcp://docker:2375
    commands:
    - echo $PASSWORD | docker login --username $USER --password-stdin
    - docker pull ezkrg/bitlbee-libpurple:debian-test
    - docker tag ezkrg/bitlbee-libpurple:debian-test ezkrg/bitlbee-libpurple:debian-$DRONE_TAG
    - docker push ezkrg/bitlbee-libpurple:debian-$DRONE_TAG
    - docker tag ezkrg/bitlbee-libpurple:debian-test ezkrg/bitlbee-libpurple:debian-latest
    - docker push ezkrg/bitlbee-libpurple:debian-latest
    when:
      event:
      - tag

  - name: notification
    image: appleboy/drone-telegram:1.3.4
    failure: ignore
    settings:
      token:
        from_secret: TT
      to:
        from_secret: TID
      message: |
        *{{commit.author}} ({{commit.email}})*  
        *{{repo.namespace}}/{{repo.name}}*  
        [Pipeline #{{build.number}} has {{#success build.status}}passed{{else}}failed{{/success}} in {{duration build.started build.finished}}]({{build.link}}) {{#success build.status}}✅{{else}}❌{{/success}}  
        *Branch:* [{{commit.branch}}](https://github.com/{{repo.namespace}}/{{repo.name}}/commits/{{commit.branch}}) *Commit:* [{{commit.message}}]({{commit.link}})
    when:
      status:
        - success
        - failure

---
kind: signature
hmac: 1e71b1fcd0f0cf3b5bb9742137a2897f6c9596568c7fe355e64db686cdceb4d4

...