Commit 38b950df authored by michaelguarino's avatar michaelguarino
Browse files

update artifacts, add artifact push to ci

parent fcafc688
Pipeline #217 passed with stage
in 6 minutes and 25 seconds
Showing with 105 additions and 42 deletions
+105 -42
plural/
.gitlab-ci.yml
Pluralfile
plural.lock
\ No newline at end of file
......@@ -21,11 +21,45 @@ stages:
- gcloud auth configure-docker -q
- docker login -u mjg@plural.sh -p $PLURAL_ACCESS_TOKEN dkr.plural.sh
.ignore-cond: &ignore-cond
except:
variables:
- $CI_COMMIT_MESSAGE =~ /pushed to plural/
build-console:
stage: push
<<: *push-globs
<<: *ignore-cond
except:
variables:
- $CI_COMMIT_MESSAGE =~ /pushed to plural/
only:
- master
script:
- make build
- make push
\ No newline at end of file
- make push
plural-apply:
stage: push
image: gcr.io/pluralsh/golang:1.16-stretch
<<: *ignore-cond
before_script:
- 'which ssh-agent || ( apt-get update -qy && apt-get install openssh-client -qqy )'
- 'which git || ( apt-get update -qy && apt-get install git -qqy )'
- eval `ssh-agent -s`
- echo "${GIT_SSH_KEY}" | tr -d '\r' | ssh-add - > /dev/null # add ssh ke
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- echo "$GIT_SSH_KEY" >> ~/.ssh/id_rsa.pub
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
- mkdir -p ~/.plural
- cp $PLURAL_CONF ~/.plural/config.yml
script:
- make install
- plural apply
- git config --global user.email mjg@plural.sh
- git config --global user.name mjg
- git add .
- git commit -m "pushed to plural"
- git remote rm origin && git remote add origin git@gitlab.plural.sh:$CI_PROJECT_PATH.git
- git push origin HEAD:$CI_COMMIT_REF_NAME # Pushes to the same branch as the trigger
\ No newline at end of file
REPO plural
RUN rm plural/readme.md
RUN echo '```bash' >> plural/readme.md
RUN plural --help >> plural/readme.md
RUN echo '```' >> plural/readme.md
RUN make release GOOS=linux GOARCH=amd64
ARTIFACT plural/plural.yaml linux amd64
RUN make release GOOS=darwin GOARCH=amd64
ARTIFACT plural/plural.yaml mac amd64
RUN make release GOOS=darwin GOARCH=arm64
ARTIFACT plural/plural.yaml mac arm64
\ No newline at end of file
......@@ -4,6 +4,7 @@ import (
"fmt"
"os"
"os/exec"
"strings"
)
type Command struct {
......@@ -21,7 +22,7 @@ func (c *Command) Key() string {
func (c *Command) Push(repo string, sha string) (string, error) {
fmt.Println("")
cmd := exec.Command(c.Command, c.Args...)
cmd := exec.Command("/bin/sh", "-c", fmt.Sprintf("%s %s", c.Command, strings.Join(c.Args, " ")))
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
return "", cmd.Run()
......
......@@ -4,11 +4,13 @@ artifact:
.forge/artifacts/forge.yaml:windows:amd64: qTjr3MV-tEdPuzpUgqR71voMCzVzkESecApbchAwdoY=
.forge/forge.yaml_linux_amd64: f4iS5tsL13U7gDlHVjDV9SaqHKY9KnJWUJkPLZ3frpg=
.forge/forge.yaml_mac_amd64: gxoMfcF9ih9QJOxbJwE-tnuftL4L081UOvM6VjgFeh8=
plural/plural.yaml_linux_amd64: wfMX8ZU-KQH_OlB_E2D6bdLqSw-arbeaR7Y_dRF0Ovs=
plural/plural.yaml_mac_amd64: wDC4lzuP5PXaQ5fV0iruHYrtUUwbxR5VOrn-k-4F9fY=
plural/plural.yaml_linux_amd64: c8qeBb46GahYEr9DbNDhyrPzsfL6KGzQxm7I4N4O_Z4=
plural/plural.yaml_mac_amd64: fg9NhIOpUV_LFGDKZs3JJsCMpVqD7fcB60oCR36OOIQ=
plural/plural.yaml_mac_arm64: tDMSzdzcqL4CtJjSlfFijGJJNEfWXYhFQXUxk5kEXYU=
terraform: {}
helm: {}
recipe: {}
integration: {}
crd: {}
ird: {}
tag: {}
**plural**
cli for managing plural. Includes utilities for creating workspaces, validating dependencies are satisfied and deploying workspaces.
```bash
> plural --help
NAME:
plural - Tooling to manage your installed plural applications
USAGE:
plural [global options] command [command options] [arguments...]
VERSION:
0.0.0
COMMANDS:
build, b builds your workspace
deploy, d deploys the current workspace
validate, v validates your workspace
topsort, d renders a dependency-inferred topological sort of the installations in a workspace
bounce, b redeploys the charts in a workspace
destroy, b iterates through all installations in reverse topological order, deleting helm installations and terraform
init initializes charmart
import imports plural config from another file
test validate a values templace
crypto plural encryption utilities
push utilities for pushing tf or helm packages
api inspect the plural api
config, conf reads/modifies cli configuration
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS:
--help, -h show help
--version, -v print the version
```
\ No newline at end of file
......@@ -2,4 +2,4 @@ name: plural
readme: CLI for building and deploying plural workspaces
type: cli
blob: plural.o
readme: plural/plural-readme.md
\ No newline at end of file
readme: plural/readme.md
\ No newline at end of file
```bash
NAME:
plural - Tooling to manage your installed plural applications
USAGE:
plural [global options] command [command options] [arguments...]
COMMANDS:
build, b builds your workspace
deploy, d deploys the current workspace
diff, df diffs the state of the current workspace with the deployed version and dumps results to diffs/
bounce, b redeploys the charts in a workspace
destroy, b iterates through all installations in reverse topological order, deleting helm installations and terraform
init initializes plural within a git repo
bundle Commands for installing and discovering installation bundles
help, h Shows a list of commands or help for one command
API:
api inspect the forge api
upgrade, up Creates an upgrade for a repository
Debugging:
watch watches applications until they become ready
proxy proxies into running processes in your cluster
logs Commands for tailing logs for specific apps
Publishing:
apply applys the current pluralfile
test validate a values templace
push utilities for pushing tf or helm packages
template, tpl templates a helm chart to be uploaded to plural
User Profile:
login logs into plural and saves credentials to the current config profile
import imports forge config from another file
crypto forge encryption utilities
config, conf reads/modifies cli configuration
profile Commands for managing config profiles for plural
Workspace:
validate, v validates your workspace
topsort, d renders a dependency-inferred topological sort of the installations in a workspace
install installs forge cli dependencies
workspace, wkspace Commands for managing installations in your workspace
output Commands for generating outputs from supported tools
build-context creates a fresh context.yaml for legacy repos
GLOBAL OPTIONS:
--help, -h show help
```
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment