Skip to content

Commit

Permalink
fix s3_local script; add docker init to CI on all platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
telamonian committed Apr 1, 2020
1 parent 648c1a1 commit 8b0fddb
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 16 deletions.
54 changes: 39 additions & 15 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ trigger:
- '*' # must quote since "*" is a YAML reserved character; we want a string

parameters:
- name: initializationSteps
- name: initSteps
type: stepList
default:
- task: UsePythonVersion@0
Expand Down Expand Up @@ -37,27 +37,47 @@ parameters:
- bash: env
displayName: "List all environment variables"
- name: s3proxySteps

- name: initDockerSteps
type: stepList
default:
- task: DockerInstaller@0
displayName: Docker Installer
inputs:
dockerVersion: 19.03.8
releaseType: stable

- name: initDockerStepsMac
type: stepList
default:
- script: |
ci/install_docker_desktop_mac.sh
ci/start_docker_desktop_mac.sh
displayName: 'Install/start up Docker Desktop Mac'
- name: initS3proxySteps
type: stepList
default:
- bash: nohup ci/s3_local.sh
- bash: |
nohup ci/s3_local.sh -d
sleep 5
displayName: "Start up local S3 server"
- script: curl http://127.0.0.1:9000/
displayName: 'Test local S3 server'
- name: s3proxyMacSteps

- name: initS3proxyStepsMac
type: stepList
default:
- script: |
ci/install_docker_desktop_mac.sh
ci/start_docker_desktop_mac.sh
docker pull andrewgaul/s3proxy
nohup sudo docker run -p 9000:80 --env S3PROXY_AUTHORIZATION=none andrewgaul/s3proxy &
sleep 5
sudo docker run --detach -p 9000:80 --env S3PROXY_AUTHORIZATION=none andrewgaul/s3proxy
sleep 15
displayName: 'Start s3proxy in a docker'
- script: curl http://127.0.0.1:9000/
displayName: 'Test local S3 server'

- name: testSteps
type: stepList
default:
Expand All @@ -72,6 +92,7 @@ parameters:

- script: make testjs
displayName: 'Test JS'

- name: publishSteps
type: stepList
default:
Expand All @@ -97,8 +118,9 @@ jobs:
python.version: '3.7'

steps:
- ${{ parameters.initializationSteps }}
- ${{ parameters.s3proxySteps }}
- ${{ parameters.initDockerSteps }}
- ${{ parameters.initS3proxySteps }}
- ${{ parameters.initSteps }}
- ${{ parameters.testSteps }}
- ${{ parameters.publishSteps }}

Expand All @@ -112,22 +134,24 @@ jobs:
python.version: '3.7'

steps:
- ${{ parameters.s3proxyMacSteps }}
- ${{ parameters.initializationSteps }}
- ${{ parameters.initDockerStepsMac }}
- ${{ parameters.initS3proxyStepsMac }}
- ${{ parameters.initSteps }}
- ${{ parameters.testSteps }}
- ${{ parameters.publishSteps }}

- job: 'Windows'
pool:
vmImage: 'vs2017-win2016'
vmImage: 'windows-2019'

strategy:
matrix:
Python37:
python.version: '3.7'

steps:
- ${{ parameters.initializationSteps }}
- ${{ parameters.s3proxySteps }}
- ${{ parameters.initDockerSteps }}
- ${{ parameters.initS3proxySteps }}
- ${{ parameters.initSteps }}
- ${{ parameters.testSteps }}
- ${{ parameters.publishSteps }}
1 change: 0 additions & 1 deletion ci/s3_local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ EOT
# s3proxy.credential=s3_local

# get built s3proxy jar
command -v java -jar s3proxy >/dev/null 2>&1 || \
curl -L https://github.com/gaul/s3proxy/releases/download/s3proxy-${S3PROXY_VERSION}/s3proxy -o s3proxy

# run s3proxy as a background job
Expand Down

0 comments on commit 8b0fddb

Please sign in to comment.