GithubHelp home page GithubHelp logo

azure-devops-shiny-template's People

Contributors

kellobri avatar

Watchers

 avatar  avatar

Forkers

astream2018

azure-devops-shiny-template's Issues

Function to add a collaborator

Currently we use a technical user which take care of the deployments.
We like to make the person who has done the commit a collaborator to the project. git log --pretty=format:"%an"
Based on the username.

Also instead of creating a new app in RSconnect after every deployment we like to be able to update the last deployed application.

syntax error: unexpected end of file

I'm trying-out your scripts. looks like its failing.
The only changes on the yml is the removal of:

  • vmImage: 'ubuntu-latest'
  • group: 'RStudio Connect Vars'

I'm only using a pool with a RHEL 7.9 agent configured.

##[section]Starting: Create Upload Deploy

Task : Bash
Description : Run a Bash script on macOS, Linux, or Windows
Version : 3.151.1
Author : Microsoft Corporation
Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/bash

Generating script.
Formatted command: . '/opt/tfsagent/_work/1/s/create-upload-deploy.sh' Azure DevOps Deployment Demo App
========================== Starting Command Output ===========================
[command]/bin/bash --noprofile --norc /opt/tfsagent/_work/_temp/6cf1dafd-dcd7-44d0-b302-9a6db5cf32db.sh
/opt/tfsagent/_work/1/s/create-upload-deploy.sh: line 6: $'\r': command not found
/opt/tfsagent/_work/1/s/create-upload-deploy.sh: line 14: $'\r': command not found
/opt/tfsagent/_work/1/s/create-upload-deploy.sh: line 15: set: -
: invalid option
set: usage: set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]
/opt/tfsagent/_work/1/s/create-upload-deploy.sh: line 16: $'\r': command not found
/opt/tfsagent/_work/1/s/create-upload-deploy.sh: line 125: syntax error: unexpected end of file
##[error]Bash exited with code '1'.
##[section]Finishing: Create Upload Deploy

use groupname to set the acl

@kellobri
Currently i set the acl based on the GROUP_GUID. I would like first to get the group name from the yaml as value do a get groups call get the GROUP_GUID based on the name and then call this script to set the acl script below.

#!/usr/bin/env bash

Update the ACL settings for a piece of content on RSC

given the Content GUID and a valid API key

Build the JSON request data for adding a Viewer Group to the content ACL

DATA=$(jq --arg principal_guid "${GROUP_GUID}"
'. | .["principal_guid"]=$principal_guid'
<<<'{"principal_type":"group","role":"owner"}')

echo "${DATA}"

RESULT=$(curl --silent --show-error -L --max-redirs 0 --fail -X POST
-H "Authorization: Key ${CONNECT_API_KEY}"
--data-binary "${DATA}"
"${CONNECT_SERVER}api/v1/content/${CONTENT}/permissions")
RESPONSE=$(echo "$RESULT" | jq -r .id)

echo "ACL permissions: ${RESPONSE} Update Complete."r

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.