Skip to content

Commit

Permalink
night workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
milesstoetzner committed Jul 17, 2023
1 parent d374542 commit ffdc1e3
Show file tree
Hide file tree
Showing 21 changed files with 348 additions and 30 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,19 @@ jobs:
name: Build
runs-on: ubuntu-22.04
steps:
###################################################
#
# Prepare
#
###################################################

- name: (PREPARE) Set up QEMU
uses: docker/setup-qemu-action@v2

- name: (PREPARE) Checkout Repository
uses: actions/checkout@v3
with:
lfs: true

- name: (PREPARE) Setup Node
uses: actions/setup-node@v3
Expand All @@ -22,6 +30,12 @@ jobs:
- name: (PREPARE) Install Dependencies
run: rm -rf node_modules && yarn --frozen-lockfile

###################################################
#
# Build
#
###################################################

- name: (BUILD) Build Project
run: yarn build

Expand Down Expand Up @@ -58,6 +72,12 @@ jobs:
tar -cJf ${BINARY}.xz ${BINARY}
done
###################################################
#
# Release
#
###################################################

- name: (RELEASE) Delete Build Release
run: gh release delete build-${GITHUB_SHA} || true
env:
Expand Down
169 changes: 169 additions & 0 deletions .github/workflows/night.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
# GitHub runner seems not to support ipv6, thus, we can not test on bwCloud.
# See https://github.com/actions/runner-images/issues/668

name: Night
on:
workflow_dispatch:
schedule:
- cron: '20 4 * * 2'
push:
branches:
- fix/night-workflow

concurrency: night
jobs:
night:
name: Night
runs-on: ubuntu-22.04
steps:
###################################################
#
# Prepare
#
###################################################

- name: (PREPARE) Checkout Repository
uses: actions/checkout@v3
with:
lfs: true

- name: (PREPARE) Setup Git
run: |
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR}@users.noreply.${GITHUB_DOMAIN:-"github.com"}"
- name: (PREPARE) Setup gcloud CLI
uses: google-github-actions/setup-gcloud@v1
with:
version: 438.0.0

- name: (PREPARE) Setup GCP credentials
uses: actions/github-script@v3
with:
script: |
if (!process.env.GCP_CREDENTIALS) throw 'GCP_CREDENTIALS undefined'
const fs = require('fs')
const file = 'gcp-credentials.json'
const content = new Buffer.from(process.env.GCP_CREDENTIALS, 'base64').toString('utf-8')
fs.writeFileSync(file, content)
env:
GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }}

- name: (PREPARE) Setup Terraform
uses: actions/github-script@v3
with:
script: |
if (!process.env.TERRAFORM_API_TOKEN) throw 'TERRAFORM_TOKEN undefined'
const fs = require('fs')
const path = require('path')
const dir = path.resolve(process.env.HOME, '.terraform.d')
const file = path.resolve(dir, 'credentials.tfrc.json')
const content = JSON.stringify({
"credentials": {
"app.terraform.io": {
"token": process.env.TERRAFORM_API_TOKEN
}
}
}, null, 4)
fs.mkdirSync(dir)
fs.writeFileSync(file, content)
env:
TERRAFORM_API_TOKEN: ${{ secrets.TERRAFORM_API_TOKEN }}

- name: (PREPARE) Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.x
cache: pip

- name: (PREPARE) Install xOpera
run: pip install opera==0.6.9

- name: (PREPARE) Cache Unfurl
uses: actions/cache@v3
with:
path: /home/runner/.unfurl_home
key: unfurl-home

- name: (PREPARE) Install Unfurl
run: |
pip install unfurl==0.7.1
yes | unfurl home --init
###################################################
#
# Installation
#
###################################################

- name: (INSTALLATION) Install vintner
run: curl -fsSL https://vintner.opentosca.org/install.sh | sudo bash -

- name: (INSTALLATION) Verify signature
run: |
curl https://vintner.opentosca.org/vintner-release.gpg | gpg --import
wget https://github.com/opentosca/opentosca-vintner/releases/download/latest/vintner-linux-x64.asc
gpg --verify vintner-linux-x64.asc /usr/bin/vintner
- name: (INSTALLATION) Test setup
run: |
vintner --version
vintner setup init
vintner setup benchmark --seeds 10 250
###################################################
#
# xOpera Motivation
#
###################################################

- name: (XOPERA-MOTIVATION) Deploy the production variant of xopera-motivation on GCP
run: |
vintner setup clean
vintner setup init
vintner orchestrators init xopera --no-venv
vintner orchestrators enable --orchestrator xopera
vintner templates import --template motivation --path examples/xopera-motivation
vintner instances create --instance motivation --template motivation
vintner instances resolve --instance motivation --presets prod
cp examples/xopera-motivation/deployment-inputs.example.yaml examples/xopera-motivation/deployment-inputs.ignored.yaml
sed -i "/gcp_service_account_file:/c\gcp_service_account_file: $(pwd)/gcp-credentials.json" examples/xopera-motivation/deployment-inputs.ignored.yaml
vintner instances deploy --instance motivation --inputs examples/xopera-motivation/deployment-inputs.ignored.yaml
- name: (XOPERA-MOTIVATION) Test the production variant of xopera-motivation on GCP
run: curl https://application-dot-stoetzms-387808.ey.r.appspot.com

- name: (XOPERA-MOTIVATION) Undeploy the production variant of xopera-motivation on GCP
run: vintner instances undeploy --instance motivation
if: always()

###################################################
#
# Unfurl Artifacts
#
###################################################

- name: (UNFURL-ARTIFACTS) Deploy the enterprise plan of unfurl-artifacts on GCP
run: |
vintner setup clean
vintner setup init
vintner orchestrators init unfurl --no-venv
vintner orchestrators enable --orchestrator unfurl
vintner templates import --template artifacts --path examples/unfurl-artifacts
vintner instances create --instance artifacts --template artifacts
vintner instances resolve --instance artifacts --inputs examples/unfurl-artifacts/tests/enterprise/inputs.yaml
echo "gcp_credentials: $(pwd)/gcp-credentials.json" > examples/unfurl-artifacts/deployment-inputs.ignored.yaml
vintner instances deploy --instance artifacts --inputs examples/unfurl-artifacts/deployment-inputs.ignored.yaml
- name: (UNFURL-ARTIFACTS) Test the enterprise plan of unfurl-artifacts on GCP
run: curl https://shop-dot-stoetzms-387808.ey.r.appspot.com

- name: (UNFURL-ARTIFACTS) Undeploy the enterprise plan of unfurl-artifacts on GCP
run: vintner instances undeploy --instance artifacts
if: always()
35 changes: 33 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,26 @@ on:
push:
branches:
- main
- fix/workflow
- fix/release-workflow

jobs:
release:
name: Release
runs-on: ubuntu-22.04
steps:
###################################################
#
# Prepare
#
###################################################

- name: (PREPARE) Set up QEMU
uses: docker/setup-qemu-action@v2

- name: (PREPARE) Checkout Repository
uses: actions/checkout@v3
with:
lfs: true
fetch-depth: 0

- name: (PREPARE) Setup Apt Packages
Expand All @@ -40,7 +47,13 @@ jobs:
cache: pip

- name: (PREPARE) Install xOpera
run: pip install opera
run: pip install opera==0.6.9

###################################################
#
# Test
#
###################################################

- name: (TEST) Check ESLint
run: yarn lint:check
Expand All @@ -57,6 +70,12 @@ jobs:
- name: (TEST) Run Tests
run: yarn test

###################################################
#
# Build
#
###################################################

- name: (BUILD) Build Project
run: yarn build

Expand Down Expand Up @@ -93,6 +112,12 @@ jobs:
tar -cJf ${BINARY}.xz ${BINARY}
done
###################################################
#
# Release
#
###################################################

- name: (RELEASE) Delete Latest Release
run: gh release delete latest || true
env:
Expand Down Expand Up @@ -128,6 +153,12 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

###################################################
#
# Docs
#
###################################################

- name: (DOCS) Setup Git
run: |
git config --global user.name "${GITHUB_ACTOR}"
Expand Down
28 changes: 27 additions & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,19 @@ jobs:
name: Tests
runs-on: ubuntu-22.04
steps:
###################################################
#
# Prepare
#
###################################################

- name: (PREPARE) Set up QEMU
uses: docker/setup-qemu-action@v2

- name: (PREPARE) Checkout Repository
uses: actions/checkout@v3
with:
lfs: true

- name: (PREPARE) Setup Node
uses: actions/setup-node@v3
Expand All @@ -32,7 +40,13 @@ jobs:
cache: pip

- name: (PREPARE) Install xOpera
run: pip install opera
run: pip install opera==0.6.9

###################################################
#
# Test
#
###################################################

- name: (TEST) Check ESLint
run: yarn lint:check
Expand All @@ -49,6 +63,12 @@ jobs:
- name: (TEST) Run Tests
run: yarn test

###################################################
#
# Build
#
###################################################

- name: (BUILD) Build Project
run: yarn build

Expand All @@ -64,6 +84,12 @@ jobs:
- name: (BUILD) Package Binaries
run: yarn package

###################################################
#
# Docs
#
###################################################

- name: (DOCS) Install Dependencies
run: yarn docs:install

Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# OpenTOSCA Vintner

> Check out the [step-by-step guide](https://vintner.opentosca.org/variability4tosca/guides/artifacts) for the publication submitted at _CoopIS 2023_. Additional links are [below](#step-by-step-guides).
> Check out the [step-by-step guide](https://vintner.opentosca.org/variability4tosca/guides/artifacts) for the publication submitted at _CoopIS 2023_. Additional links are [below](#stoetzner-2023-VDMMv2).
[![release](https://github.com/opentosca/opentosca-vintner/actions/workflows/release.yaml/badge.svg?branch=main)](https://github.com/opentosca/opentosca-vintner/actions/workflows/release.yaml)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/acec5103cf9b4f1bb1fa25bc5a99076d)](https://www.codacy.com/gh/OpenTOSCA/opentosca-vintner/dashboard?utm_source=github.com&utm_medium=referral&utm_content=OpenTOSCA/opentosca-vintner&utm_campaign=Badge_Grade)
[![Release](https://github.com/opentosca/opentosca-vintner/actions/workflows/release.yaml/badge.svg?branch=main)](https://github.com/opentosca/opentosca-vintner/actions/workflows/release.yaml)
[![Night](https://github.com/OpenTOSCA/opentosca-vintner/actions/workflows/night.yaml/badge.svg)](https://github.com/OpenTOSCA/opentosca-vintner/actions/workflows/night.yaml)
[![Codacy Static Code Analysis Badge](https://app.codacy.com/project/badge/Grade/acec5103cf9b4f1bb1fa25bc5a99076d)](https://www.codacy.com/gh/OpenTOSCA/opentosca-vintner/dashboard?utm_source=github.com&utm_medium=referral&utm_content=OpenTOSCA/opentosca-vintner&utm_campaign=Badge_Grade)
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.0-4baaaa.svg)](https://vintner.opentosca.org/code-of-conduct)
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![Platforms](https://img.shields.io/badge/Platforms-Linux%20%7C%20Windows-606c38.svg)](https://vintner.opentosca.org)
Expand All @@ -28,14 +29,15 @@ This repository holds the following specifications and profiles.

This repository holds the step-by-step guides of the following publications.

<a id="stoetzner-2023-VDMMv2"></a>
- **Managing the Variability of Component Implementations and Their Deployment Configurations Across Heterogeneous Deployment Technologies**
- CoopIS 2023
- _Currently under Review_
- [Step-by-Step Guide](https://vintner.opentosca.org/variability4tosca/guides/artifacts)
- [Model of the Motivating Scenario](examples/unfurl-artifacts)
- [Models of the Complexity Evaluation](examples/unfurl-artifacts/stats)


<a id="stoetzner-2022-VDMM"></a>
- **Modeling Different Deployment Variants of a Composite Application in a Single Declarative Deployment Model**
- Algorithms 2022
- https://doi.org/10.3390/a15100382
Expand Down
Loading

0 comments on commit ffdc1e3

Please sign in to comment.