Welcome to mirror list, hosted at ThFree Co, Russian Federation.

packaging-jobs.yml « jobs « templates « .azure-pipelines - github.com/certbot/certbot.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d8904bee0033819ff0dc9b90c8cb504029c2efad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
jobs:
  - job: docker_build
    pool:
      vmImage: ubuntu-18.04
    strategy:
      matrix:
        amd64:
          DOCKER_ARCH: amd64
        # Do not run the heavy non-amd64 builds for test branches
        ${{ if not(startsWith(variables['Build.SourceBranchName'], 'test-')) }}:
          arm32v6:
            DOCKER_ARCH: arm32v6
          arm64v8:
            DOCKER_ARCH: arm64v8
    steps:
      - bash: tools/docker/build.sh $(dockerTag) $DOCKER_ARCH
        displayName: Build the Docker images
      # We don't filter for the Docker Hub organization to continue to allow
      # easy testing of these scripts on forks.
      - bash: |
          DOCKER_IMAGES=$(docker images --filter reference='*/certbot' --filter reference='*/dns-*' --format '{{.Repository}}')
          docker save --output images.tar $DOCKER_IMAGES
        displayName: Save the Docker images
      # If the name of the tar file or artifact changes, the deploy stage will
      # also need to be updated.
      - bash: mv images.tar $(Build.ArtifactStagingDirectory)
        displayName: Prepare Docker artifact
      - task: PublishPipelineArtifact@1
        inputs:
          path: $(Build.ArtifactStagingDirectory)
          artifact: docker_$(DOCKER_ARCH)
        displayName: Store Docker artifact
  - job: installer_build
    pool:
      vmImage: vs2017-win2016
    steps:
      - task: UsePythonVersion@0
        inputs:
          versionSpec: 3.7
          architecture: x86
          addToPath: true
      - script: python windows-installer/construct.py
        displayName: Build Certbot installer
      - task: CopyFiles@2
        inputs:
          sourceFolder: $(System.DefaultWorkingDirectory)/windows-installer/build/nsis
          contents: '*.exe'
          targetFolder: $(Build.ArtifactStagingDirectory)
      - task: PublishPipelineArtifact@1
        inputs:
          path: $(Build.ArtifactStagingDirectory)
          # If we change the artifact's name, it should also be changed in tools/create_github_release.py
          artifact: windows-installer
        displayName: Publish Windows installer
  - job: installer_run
    dependsOn: installer_build
    strategy:
      matrix:
        win2019:
          imageName: windows-2019
        win2016:
          imageName: vs2017-win2016
    pool:
      vmImage: $(imageName)
    steps:
      - powershell: |
          if ($PSVersionTable.PSVersion.Major -ne 5) {
              throw "Powershell version is not 5.x"
          }
        condition: eq(variables['imageName'], 'vs2017-win2016')
        displayName: Check Powershell 5.x is used in vs2017-win2016
      - task: UsePythonVersion@0
        inputs:
          versionSpec: 3.7
          addToPath: true
      - task: DownloadPipelineArtifact@2
        inputs:
          artifact: windows-installer
          path: $(Build.SourcesDirectory)/bin
        displayName: Retrieve Windows installer
      - script: |
          py -3 -m venv venv
          venv\Scripts\python letsencrypt-auto-source\pieces\pipstrap.py
          venv\Scripts\python tools\pip_install.py -e certbot-ci
        displayName: Prepare Certbot-CI
      - script: |
          set PATH=%ProgramFiles(x86)%\Certbot\bin;%PATH%
          venv\Scripts\python -m pytest certbot-ci\windows_installer_integration_tests --allow-persistent-changes --installer-path $(Build.SourcesDirectory)\bin\certbot-beta-installer-win32.exe
        displayName: Run windows installer integration tests
      - script: |
          set PATH=%ProgramFiles(x86)%\Certbot\bin;%PATH%
          venv\Scripts\python -m pytest certbot-ci\certbot_integration_tests\certbot_tests -n 4
        displayName: Run certbot integration tests
  - job: snaps_build
    pool:
      vmImage: ubuntu-18.04
    timeoutInMinutes: 0
    variables:
      # Do not run the heavy non-amd64 builds for test branches
      ${{ if not(startsWith(variables['Build.SourceBranchName'], 'test-')) }}:
        ARCHS: amd64 arm64 armhf
      ${{ if startsWith(variables['Build.SourceBranchName'], 'test-') }}:
        ARCHS: amd64
    steps:
      - script: |
          sudo apt-get update
          sudo apt-get install -y --no-install-recommends snapd
          sudo snap install --classic snapcraft
        displayName: Install dependencies
      - task: UsePythonVersion@0
        inputs:
          versionSpec: 3.8
          addToPath: true
      - task: DownloadSecureFile@1
        name: credentials
        inputs:
          secureFile: launchpad-credentials
      - script: |
          git config --global user.email "$(Build.RequestedForEmail)"
          git config --global user.name "$(Build.RequestedFor)"
          mkdir -p ~/.local/share/snapcraft/provider/launchpad
          cp $(credentials.secureFilePath) ~/.local/share/snapcraft/provider/launchpad/credentials
          python3 tools/snap/build_remote.py ALL --archs ${ARCHS}
        displayName: Build snaps
      - script: |
          mv *.snap $(Build.ArtifactStagingDirectory)
          mv certbot-dns-*/*.snap $(Build.ArtifactStagingDirectory)
        displayName: Prepare artifacts
      - task: PublishPipelineArtifact@1
        inputs:
          path: $(Build.ArtifactStagingDirectory)
          artifact: snaps
        displayName: Store snaps artifacts
  - job: snap_run
    dependsOn: snaps_build
    pool:
      vmImage: ubuntu-18.04
    steps:
      - task: UsePythonVersion@0
        inputs:
          versionSpec: 3.8
          addToPath: true
      - script: |
          sudo apt-get update
          sudo apt-get install -y --no-install-recommends nginx-light snapd
          python3 -m venv venv
          venv/bin/python letsencrypt-auto-source/pieces/pipstrap.py
          venv/bin/python tools/pip_install.py -U tox
        displayName: Install dependencies
      - task: DownloadPipelineArtifact@2
        inputs:
          artifact: snaps
          path: $(Build.SourcesDirectory)/snap
        displayName: Retrieve Certbot snaps
      - script: |
          sudo snap install --dangerous --classic snap/certbot_*_amd64.snap
        displayName: Install Certbot snap
      - script: |
          venv/bin/python -m tox -e integration-external,apacheconftest-external-with-pebble
        displayName: Run tox
  - job: snap_dns_run
    dependsOn: snaps_build
    pool:
      vmImage: ubuntu-18.04
    steps:
      - script: |
          sudo apt-get update
          sudo apt-get install -y --no-install-recommends snapd
        displayName: Install dependencies
      - task: UsePythonVersion@0
        inputs:
          versionSpec: 3.8
          addToPath: true
      - task: DownloadPipelineArtifact@2
        inputs:
          artifact: snaps
          path: $(Build.SourcesDirectory)/snap
        displayName: Retrieve Certbot snaps
      - script: |
          python3 -m venv venv
          venv/bin/python letsencrypt-auto-source/pieces/pipstrap.py
          venv/bin/python tools/pip_install.py -e certbot-ci
        displayName: Prepare Certbot-CI
      - script: |
          sudo -E venv/bin/pytest certbot-ci/snap_integration_tests/dns_tests --allow-persistent-changes --snap-folder $(Build.SourcesDirectory)/snap --snap-arch amd64
        displayName: Test DNS plugins snaps