@Library(["downloader-pipeline-helper@master", "ci-pipeline-helper@master"]) _

pipeline {
    agent {
        label 'ci-nix'
    }
    options {
        timestamps()
        ansiColor('xterm')
    }

    stages {
        stage('Prepare environment') {
            steps {
                script { commonHelper.prepareEnvironment() }
            }
        }
        stage('Download deps') {
            steps {
                script { downloader.download_dependencies() }
            }
        }
        stage('Init cyberapp') {
            steps {
                sh('make -B cyberapp-init')
            }
        }
        stage('RAMLx validation') {
            steps {
                sh('make -B cyberapp-test')
            }
        }
    }
}
