The Tools We Use For Ampersand
  • Introduction
  • Tools used in the Ampersand project
  • Version control with Git
  • How to release an Ampersand upgrade
  • Documenting with GitBook
    • Getting started with GitBook
    • Do's and Dont's in Ampersand documentation
  • Building
    • Building an Ampersand Compiler with Stack
    • Baking a Docker image that contains the Ampersand Compiler
    • Testing with Docker on your own laptop
    • Automated builds
  • Prototype framework
  • Automation of releasing (CI/CD)
    • Github packages
  • Installation of RAP
    • Deploying to your own laptop
    • Deploying RAP4 in the Azure cloud
    • Deploying OUNL RAP4
    • Maintaining RAP4
    • Making Docker images
    • Deployment Configuration
    • Details
  • Functionality of RAP4
    • Student
    • Tutor
    • Account Manager
    • Graduate Student
  • Deploying with Kubernetes
  • Authentication and access management with OAuth
  • Ampersand language support
  • Group 1
    • Development using VS Code
Powered by GitBook
On this page
  • Querying packages using Github's GraphQL API
  • Deleting specific packages
Export as PDF
  1. Automation of releasing (CI/CD)

Github packages

Querying packages using Github's GraphQL API

  • The query below returns a list of all packages and package versions pushed to github repo of Ampersand

  • The packages api is still in development, therefore you must include a HTTP Accept header to indicate you want to use this feature

  • Make sure the right access right are set for your personal access token. Inluding read repo + read/write packages

    POST https://api.github.com/graphql

headers: >

Content-Type: application/json
Authorization: bearer [put your personal access token here]
Accept: application/vnd.github.packages-preview+json

body (grapql query):

{
    "query": "query {
        viewer { login }
        repository(name: \"ampersand\", owner: \"ampersandtarski\") {
            id
            packages (first: 10) {
                nodes {
                    id
                    name
                    versions (first: 100) {
                        nodes {
                            id version
                        }
                    }
                }
            }
        }
    }"
}

Deleting specific packages

NOTE! Doesn't work with public packages, like we have

POST https://api.github.com/graphql

headers: >

Content-Type: application/json
Authorization: bearer [put your personal access token here]
Accept: application/vnd.github.package-deletes-preview+json

body (graphql query) >

{ "query" : "mutation { deletePackageVersion(input:{packageVersionId:\"[package-version-id]==\"}) { success }}" }
PreviousAutomation of releasing (CI/CD)NextInstallation of RAP

Last updated 5 years ago