Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

Revision 7286247ba7901271e14bcdb1093ac759e51f36c5 authored by Alexey Sergushichev on 06 September 2022, 18:44:17 UTC, committed by Alexey Sergushichev on 06 September 2022, 18:44:17 UTC
update js
1 parent b9a3c55
  • Files
  • Changes
  • 168e88d
  • /
  • .space.kts
Raw File Download

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • revision
  • directory
  • content
revision badge
swh:1:rev:7286247ba7901271e14bcdb1093ac759e51f36c5
directory badge
swh:1:dir:168e88d840cce7a73284da695c7efe2963418137
content badge
swh:1:cnt:e4f9ef6f94d2e6c8c9b3fa7d9ec606e9f077a8f3

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • revision
  • directory
  • content
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
.space.kts
/**
* JetBrains Space Automation
* This Kotlin-script file lets you automate build activities
* For more info, see https://www.jetbrains.com/help/space/automation.html
*/

job("build and test in latest preimage") {
    startOn {
        //push in phantasus repo
        gitPush {
           branchFilter {
                +"refs/heads/master"
           }
        }
    }
    container(displayName = "Build R package and copy to share", image = "ctlab.registry.jetbrains.space/p/phantasus/phantasus-containers/phantasus-preimage") {
    	shellScript {
        	content = """
            	R CMD build .
                FILE=${'$'}(ls -1t *.tar.gz | head -n 1)
                cp  ${'$'}FILE $mountDir/share/
            """
        }
    }
    parallel{
    	sequential{
            container(displayName = "Check builded package", image = "ctlab.registry.jetbrains.space/p/phantasus/phantasus-containers/phantasus-preimage") {
                shellScript {
                    content = """
                			FILE=${'$'}(ls -1t $mountDir/share/*.tar.gz | head -n 1)
                			R CMD check "${'$'}FILE" --no-manual
                    """
                }
            }
            container(displayName = "BioCheck", image = "ctlab.registry.jetbrains.space/p/phantasus/phantasus-containers/phantasus-preimage") {
                shellScript {
                    content = """
                			FILE=${'$'}(ls -1t $mountDir/share/*.tar.gz | head -n 1)
                            Rscript -e "BiocManager::install(\"BiocCheck\")"
                            Rscript -e "library(BiocCheck); BiocCheck(\"${'$'}{FILE}\")"
                    """
                }
            }
            container(displayName = "code covr", image = "ctlab.registry.jetbrains.space/p/phantasus/phantasus-containers/phantasus-preimage") {
                shellScript {
                    content = """
                            Rscript -e "install.packages(\"covr\")"
                            Rscript -e 'covr::package_coverage(quiet = FALSE)'
                     """
                }
            }
        }
        container(displayName = "Check js", image = "ctlab.registry.jetbrains.space/p/phantasus/phantasus-containers/phantasus-preimage") {
            shellScript {
                content = """
		    add-apt-repository -y  ppa:mozillateam/ppa
		    echo '
Package: *
Pin: release o=LP-PPA-mozillateam
Pin-Priority: 1001
' | tee /etc/apt/preferences.d/mozilla-firefox
                    apt-get update && apt-get install -y --no-install-recommends nodejs npm firefox
                    bash inst/test_js.sh
                """
            }
    	}
    }

    
    

    docker {
    	beforeBuildScript {
            // Create an env variable BRANCH,
            // use env var to get full branch name,
            // leave only the branch name without the 'refs/heads/' path
            content = """
                export BRANCH=${'$'}(echo ${'$'}JB_SPACE_GIT_BRANCH | cut -d'/' -f 3)
                export DOCKER_TAG=${'$'}BRANCH-${'$'}JB_SPACE_EXECUTION_NUMBER
                export GITHUB_PAT=${'$'}JB_SPACE_API_URL/${'$'}JB_SPACE_PROJECT_KEY
                case ${'$'}BRANCH in 
                  "master") export LATEST="latest" ;;
                  *)  export LATEST="test" ;;
                esac
            """
        }  
        build {
        	context = "."
            file = "Dockerfile"
            args["PREIMAGE_NAME"] = "ctlab.registry.jetbrains.space/p/phantasus/phantasus-containers/phantasus-preimage"
            args["TARGET_BRANCH"] = "\$BRANCH"
            args["PHANTASUS_BUILD"] = "\$DOCKER_TAG"
            args["GITHUB_PAT"] = "\$GITHUB_PAT"
            labels["vendor"] = "ctlab"
        }
         push("ctlab.registry.jetbrains.space/p/phantasus/phantasus-containers/phantasus") {
            tags("\$DOCKER_TAG", "\$LATEST")
        }
    }
    
}

The diff you're trying to view is too large. Only the first 1000 changed files have been loaded.
Showing with 0 additions and 0 deletions (0 / 0 diffs computed)
swh spinner

Computing file changes ...

back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API