Skip to content
Snippets Groups Projects
Verified Commit e5c3a4d5 authored by Mark's avatar Mark
Browse files

Merge recent changes

parents 364ab21c 8867133d
No related branches found
No related tags found
1 merge request!2Minimal frontend
Pipeline #1097 passed with stages
in 3 minutes and 35 seconds
include:
- remote: https://open.greenhost.net/openappstack/openappstack/raw/master/.gitlab/ci_templates/kaniko.yml
stages:
- build
- test
......@@ -10,6 +13,7 @@ backend:
script:
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --context ${CI_PROJECT_DIR}/backend/ --dockerfile ${CI_PROJECT_DIR}/backend/Dockerfile --destination $CI_REGISTRY_IMAGE/backend:${CI_COMMIT_REF_NAME}
extends: .kaniko_build
only:
changes:
- backend/**/*
......
#!/bin/bash
if [[ $1 == "" ]] || [[ $1 == "-h" ]] || [[ $1 == "--help" ]] || [[ $2 == "" ]]; then
echo "usage: $0 USERNAME ROLE [ SERVER ]";
exit 0;
fi
USERNAME=$1
ROLE=$2
SERVER=$3
PORT=$4
if [[ $USERNAME == "" ]] || [[ $ROLE == "" ]]; then
echo "Please specify username and role"
exit 1
fi
if [[ $SERVER == "" ]]; then
SERVER=localhost
fi
if [[ $PORT == "" ]]; then
PORT=5000
SERVER=http://localhost:5000
fi
echo "Assigning role $ROLE to User $USERNAME"
curl --header "Content-Type: application/json" \
--request POST \
--data "{\"query\": \"mutation {addRoleToUser(username: \\\"$USERNAME\\\", role: \\\"$ROLE\\\"){user{username, roles{edges{node{name}}}}}}\" }" \
http://$SERVER:$PORT/graphql
$SERVER/graphql
#!/bin/bash
if [[ $1 == "" ]] || [[ $1 == "-h" ]] || [[ $1 == "--help" ]]; then
echo "usage: $0 APPLICATION [ SERVER ]";
exit 0;
fi
APPLICATION=$1
SERVER=$2
PORT=$3
if [[ $APPLICATION == "" ]]; then
echo "Please specify an application name"
exit 1
fi
if [[ $SERVER == "" ]]; then
SERVER=localhost
fi
if [[ $PORT == "" ]]; then
PORT=5000
SERVER=http://localhost:5000
fi
echo "Creating application $APPLICATION"
curl --header "Content-Type: application/json" \
--request POST \
--data "{\"query\": \"mutation {createApplication(name: \\\"$APPLICATION\\\"){application{name}}}\" }" \
http://$SERVER:$PORT/graphql
$SERVER/graphql
#!/bin/bash
if [[ $1 == "" ]] || [[ $1 == "-h" ]] || [[ $1 == "--help" ]]; then
echo "usage: $0 ROLE [ SERVER ]";
exit 0;
fi
ROLE=$1
SERVER=$2
PORT=$3
if [[ $ROLE == "" ]]; then
echo "Please specify a role name"
exit 1
fi
if [[ $SERVER == "" ]]; then
SERVER=localhost
fi
if [[ $PORT == "" ]]; then
PORT=5000
SERVER=http://localhost:5000
fi
echo "Creating role $ROLE"
curl --header "Content-Type: application/json" \
--request POST \
--data "{\"query\": \"mutation {createRole(name: \\\"$ROLE\\\"){role{name}}}\" }" \
http://$SERVER:$PORT/graphql
$SERVER/graphql
#!/bin/bash
if [[ $1 == "" ]] || [[ $1 == "-h" ]] || [[ $1 == "--help" ]] || [[ $2 == "" ]] || [[ $3 == "" ]]; then
echo "usage: $0 USERNAME PASSWORD EMAIL [ SERVER ]";
exit 0;
fi
USERNAME=$1
PASSWORD=$2
EMAIL=$3
SERVER=$4
PORT=$5
if [[ $USERNAME == "" ]] || [[ $PASSWORD == "" ]] || [[ $EMAIL == "" ]]; then
echo "Please specify username, password and email address"
exit 1
fi
if [[ $SERVER == "" ]]; then
SERVER=localhost
fi
if [[ $PORT == "" ]]; then
PORT=5000
SERVER=http://localhost:5000
fi
echo "Creating admin user"
echo "Creating user $USERNAME"
curl --header "Content-Type: application/json" \
--request POST \
--data "{\"query\": \"mutation {createUser(username: \\\"$USERNAME\\\", password: \\\"$PASSWORD\\\", email: \\\"$EMAIL\\\"){user{username}}}\" }" \
http://$SERVER:$PORT/graphql
$SERVER/graphql
#!/bin/bash
if [[ $1 == "" ]] || [[ $1 == "-h" ]] || [[ $1 == "--help" ]] || [[ $2 == "" ]]; then
echo "usage: $0 USERNAME APPLICATION [ SERVER ]";
exit 0;
fi
USERNAME=$1
APPLICATION=$2
SERVER=$3
PORT=$4
if [[ $USERNAME == "" ]] || [[ $APPLICATION == "" ]]; then
echo "Please specify username and application"
exit 1
fi
if [[ $SERVER == "" ]]; then
SERVER=localhost
fi
if [[ $PORT == "" ]]; then
PORT=5000
SERVER=http://localhost:5000
fi
echo "Granting access to application $APPLICATION to User $USERNAME"
curl --header "Content-Type: application/json" \
--request POST \
--data "{\"query\": \"mutation {addApplicationToUser(username: \\\"$USERNAME\\\", application: \\\"$APPLICATION\\\"){user{username, applications{edges{node{name}}}}}}\" }" \
http://$SERVER:$PORT/graphql
$SERVER/graphql
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment