How to enable / setup Dependency Caches for apt-get on BitBucket Pipelines

前端 未结 3 1220
时光说笑
时光说笑 2021-01-01 15:09

I am using the following code in my bitbucket-pipelines.yml files to remotely deply code to a staging server.

image: php:7.1.1

pipelines:
  def         


        
3条回答
  •  鱼传尺愫
    2021-01-01 15:19

    I am using a similar configuration, but in my case I want to cache the gettext package, came here for the same reason (to find how to cache gettext).

    if you don't have that dependency, you can use the bitbucket provided ssh pipe pipe: atlassian/ssh-run. don't have to create custom docker image.

    image: atlassian/default-image:2
    
    pipelines:
      branches:
        develop:
          - step:
              deployment: staging
              script:
                  - apt update && apt install -y gettext
                  - envsubst < scripts/deploy.sh > deploy-out.sh
                  - pipe: atlassian/ssh-run:0.2.6
                    variables:
                      SSH_USER: $STAGE_USER
                      SERVER: $STAGE_SERVER
                      COMMAND: 'deploy-out.sh'
                      MODE: 'script'
    

提交回复
热议问题