-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathazure-pipelines-deploy.yaml
67 lines (61 loc) · 2.46 KB
/
azure-pipelines-deploy.yaml
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
trigger: # don't trigger automatically for now
- none
jobs:
- job: build
displayName: build gcpedia site code
pool:
vmImage: ubuntu-latest
steps:
- bash: |
php --version
composer --version
git --version
curl --version
git submodule init && git submodule update --recursive --init
cd extensions/OpenIDConnect && composer install --no-dev --no-interaction
cd ../PluggableAuth && composer install --no-dev --no-interaction
cd ../TimedMediaHandler && composer install --no-dev --no-interaction
cd ../Widgets && composer install --no-dev --no-interaction
mkdir -p /tmp/gcpedia_build/gcwiki && cd /tmp/gcpedia_build/gcwiki
MEDIAWIKI_MAJOR_VERSION=1.40 && MEDIAWIKI_VERSION=1.40.2
curl -fSL "https://releases.wikimedia.org/mediawiki/${MEDIAWIKI_MAJOR_VERSION}/mediawiki-${MEDIAWIKI_VERSION}.tar.gz" -o mediawiki.tar.gz
curl -fSL "https://releases.wikimedia.org/mediawiki/${MEDIAWIKI_MAJOR_VERSION}/mediawiki-${MEDIAWIKI_VERSION}.tar.gz.sig" -o mediawiki.tar.gz.sig
export GNUPGHOME="$(mktemp -d)"
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys \
D7D6767D135A514BEB86E9BA75682B08E8A3FEC4 \
441276E9CCD15F44F6D97D18C119E1A64D70938E \
F7F780D82EBFB8A56556E7EE82403E59F9F8CD79 \
1D98867E82982C8FE0ABC25F9B69B3109D3BB7B0
gpg --batch --verify mediawiki.tar.gz.sig mediawiki.tar.gz
tar -x --strip-components=1 -f mediawiki.tar.gz
gpgconf --kill all
rm -r "$GNUPGHOME" mediawiki.tar.gz.sig mediawiki.tar.gz
cp -r $(Pipeline.Workspace)/s/* ./
cp -r $(Pipeline.Workspace)/s/.azure ./
ls -la
displayName: prepare gcpedia code build environment
- task: ArchiveFiles@2
displayName: 'Archive files'
inputs:
rootFolderOrFile: '/tmp/gcpedia_build/gcwiki'
includeRootFolder: true
archiveType: zip
archiveFile: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip
replaceExistingArchive: true
- upload: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip
displayName: 'Upload package'
artifact: drop
- job: deploy
displayName: deploy gcpedia site code
pool: $(deployPool)
dependsOn: build
condition: succeeded()
steps:
- download: current
artifact: drop
- task: AzureWebApp@1
displayName: 'Deploy Azure Web App gcpedia code'
inputs:
azureSubscription: $(azSubServiceConnection)
appName: $(appName)
package: $(Pipeline.Workspace)/drop/$(Build.BuildId).zip