Skip to content

Commit

Permalink
add ricochet-2 CI
Browse files Browse the repository at this point in the history
Signed-off-by: Matthias Gatto <[email protected]>
  • Loading branch information
outscale-mgo committed Nov 23, 2023
1 parent 913755a commit 5952e09
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: pull-request

on:
pull_request:
branches: [ master ]

jobs:
examples-test:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: setup
run: |
sudo apt-get update --fix-missing
sudo apt search pulumi
sudo apt-get install -y -f -o Acquire::Retries=3 pulumi
- name: Local Tests
run: ./local_tests.sh
60 changes: 60 additions & 0 deletions local_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#!/bin/sh

# Copyright (c) Outscale SAS
#
# SPDX-License-Identifier: BSD-3-Clause

export OSC_PASSWORD='ashita wa dochida'
export OSC_LOGIN=joe

export OMI_ID="ami-90067666"

export OSC_SECRET_KEY=0000001111112222223333334444445555555666
export OSC_ACCESS_KEY=11112211111110000000

export OSC_USING_RICOCHET="oui"

if [ "$#" -eq 0 ]; then

if [ ! -d "osc-ricochet-2" ]; then
git clone https://github.com/outscale-mgo/osc-ricochet-2
fi

cd osc-ricochet-2
pkill ricochet

cargo build --profile 'sdks'
cargo run --profile 'sdks' -- ./ricochet-ssl.json &> /dev/null &
cd ..

sleep 5
fi

set -e

#make example-node-create-volumes
export GOPATH=$PWD
# a strong password is important
export PULUMI_CONFIG_PASSPHRASE=wololo
make provider build_python
cd examples/yaml

pulumi stack init staging

pulumi config set outscale:secretKeyId $OSC_SECRET_KEY
pulumi config set outscale:accessKeyId $OSC_ACCESS_KEY
pulumi config set outscale:region "eu-west-2"
pulumi config set outscale:insecure true
pulumi config set outscale:endpoints '[{"api": "127.0.0.1:3000"}]'

set -eE

MSG_BASE="Test"

trap "echo [$MSG_BASE yaml pulumi up FAIL]" ERR
PATH=$PATH:$GOPATH/bin pulumi up --yes
echo "[$MSG_BASE yaml pulumi up OK]"
trap "echo [$MSG_BASE yaml pulumi down FAIL]" ERR
PATH=$PATH:$GOPATH/bin pulumi down --yes
echo "[$MSG_BASE yaml pulumi down OK]"
#make example-node-volumes

0 comments on commit 5952e09

Please sign in to comment.