rhd-gitops-example / services

Intra-Git repository promotions for GitOps.
Apache License 2.0
7 stars 8 forks source link

Check Travis set up for pushed tags results in releases now #63

Closed a-roberts closed 4 years ago

a-roberts commented 4 years ago

It should now be possible that on pushing a tag starting with v, a release is made with binaries uploaded as assets, the job currently relies on GH_TOKEN being set.

a-roberts commented 4 years ago

Update, I did push a tag just for testing, https://github.com/rhd-gitops-example/services/releases/tag/v0.0.1 - no binaries and the job can be seen at https://travis-ci.org/github/rhd-gitops-example/services/jobs/678603395, not the results I expected!

The command "$GOPATH/bin/golangci-lint run" exited with 0.
42.55s$ go test ./...
?       github.com/rhd-gitops-example/services/cmd/services [no test files]
ok      github.com/rhd-gitops-example/services/pkg/avancement   0.020s
--- FAIL: TestCopyWithMissingSource (32.70s)
    repository_test.go:271: exit status 128
FAIL
FAIL    github.com/rhd-gitops-example/services/pkg/git  36.857s
ok      github.com/rhd-gitops-example/services/pkg/git/mock 0.003s [no tests to run]
ok      github.com/rhd-gitops-example/services/pkg/local    0.007s
ok      github.com/rhd-gitops-example/services/pkg/util 0.001s
?       github.com/rhd-gitops-example/services/test [no test files]
FAIL
The command "go test ./..." exited with 1.

hmm

a-roberts commented 4 years ago

I have access to the Travis settings, now seeing bad token errors as expected, so I'm gonna go through https://docs.travis-ci.com/user/deployment/releases/ information here and https://developer.github.com/v3/guides/managing-deploy-keys/#machine-users to get this passing.

Recommends a shared GitHub account, so may need to pester @bigkevmcd 😄 that we'll add as a collaborator to the org.

a-roberts commented 4 years ago
root@de917a495135:/# curl -O -L -k https://github.com/rhd-gitops-example/services/releases/download/v0.0.1/services_linux
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   627  100   627    0     0   4679      0 --:--:-- --:--:-- --:--:--  4679
100 11.2M  100 11.2M    0     0  3941k      0  0:00:02  0:00:02 --:--:-- 5531k
root@de917a495135:/# ./services_linux promote
NAME:
   services - A new cli application

USAGE:
   services_linux [global options] command [command options] [arguments...]

DESCRIPTION:
   manage services lifecycle via GitOps

COMMANDS:
   promote  promote from one environment to another
   help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --github-token value  oauth access token to authenticate the request [$GITHUB_TOKEN]
   --help, -h            show help (default: false)
2020/04/27 14:00:07 Required flag "github-token" not set

All sorted now, green Travis build and checked binary is ok on both platforms, lemme know if you want more details around the IDs please privately