Created
January 14, 2021 01:35
-
-
Save colearendt/35fdec0f8a5ea37606e4c7ceef653595 to your computer and use it in GitHub Desktop.
Build Connect Programmatically
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(connectapi) | |
# TODO: use a real password. This user will _actually_ get created on your instance | |
# you can delete the user afterwards using the Connect usermanager CLI if you want | |
client <- connectapi:::create_first_admin("http://localhost:55011", "admin", "admin0", "admin@example.com", provider = "password") | |
# a directory with a manifest.json | |
bnd <- bundle_dir("./tests/testthat/examples/static") | |
content1 <- client %>% | |
deploy(bnd, name = "application-1", title = "Awesome Application", access_type = "all") | |
content1 %>% | |
set_vanity_url("/awesome-application") %>% | |
set_image_path("./test.png") | |
# in case you do not want parallelism in the builds. this will wait for the deployment to complete | |
content1 %>% poll_task() | |
# add additional content... | |
# create R markdown reports and schedule them... | |
# set ACLs... | |
# etc. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment