Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactored main.go #8

Merged
merged 5 commits into from Jan 7, 2019
Merged

Refactored main.go #8

merged 5 commits into from Jan 7, 2019

Conversation

g4s8
Copy link
Owner

@g4s8 g4s8 commented Jan 7, 2019

PR for #5

  • moved actual logic to gitstrap module
  • moved CLI logic to cmd/gitstrap/main.go
  • removed cfg package
  • using structs instead of global variables
  • added @todos

@0crat 0crat added the scope label Jan 7, 2019
@0crat
Copy link

0crat commented Jan 7, 2019

Job #8 is now in scope, role is REV

@g4s8
Copy link
Owner Author

g4s8 commented Jan 7, 2019

@rultor merge

@rultor
Copy link
Contributor

rultor commented Jan 7, 2019

@rultor merge

@g4s8 OK, I'll try to merge now. You can check the progress of the merge here

@rultor
Copy link
Contributor

rultor commented Jan 7, 2019

@rultor merge

@g4s8 Oops, I failed. You can see the full log here (spent 3min)

++ pwd
++ pwd
+ docker run -t --rm -v /tmp/rultor-o4eO:/main --env=PATH=/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin --env=CGO_ENABLED=0 --env=head=git@github.com:g4s8/gitstrap.git --env=pull_id=8 --env=fork=git@github.com:g4s8/gitstrap.git --env=fork_branch=5 --env=head_branch=master '--env=pull_title=Refactored main.go' --env=author=g4s8 '--env=scripts=( '\''export '\''\'\'''\''PATH=/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''CGO_ENABLED=0'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''head=git@github.com:g4s8/gitstrap.git'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''pull_id=8'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''fork=git@github.com:g4s8/gitstrap.git'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''fork_branch=5'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''head_branch=master'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''pull_title=Refactored main.go'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''author=g4s8'\''\'\'''\'''\'' '\'';'\'' '\''mkdir -pv /home/r/go/src/github.com/g4s8'\'' '\'';'\'' '\''ln -snv $PWD /home/r/go/src/github.com/g4s8/gitstrap'\'' '\'';'\'' '\''go build -o /dev/null .'\'' '\'';'\'' '\''gometalinter .'\'' '\'';'\'' )' --hostname=docker --privileged --memory=6g --memory-swap=16g --oom-kill-disable --cidfile=/tmp/rultor-o4eO/cid -w=/main -v /var/run/docker.sock:/var/run/docker.sock --name=g4s8_gitstrap_8 g4s8/gorultor:latest /main/entry.sh
WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap.
+ set -e
+ set -o pipefail
+ shopt -s dotglob
+ useradd -m -G sudo r
Creating mailbox file: No such file or directory
+ echo '%sudo ALL=(ALL) NOPASSWD:ALL'
+ cp -R /root/.cache /root/empty /home/r
+ cp -R ./cid ./end.sh ./entry.sh ./pid ./repo ./run.sh ./script.sh ./stdout /home/r
+ rm -rf repo
+ chown -R r:r /home/r
+ chmod a+x /home/r/script.sh
+ su --login r --command /home/r/script.sh
+ set -e
+ set -o pipefail
+ shopt -s expand_aliases
+ alias 'sudo=sudo -i'
+ export HOME=/home/r
+ HOME=/home/r
+ cd /home/r/repo
+ export PATH=/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+ PATH=/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+ export CGO_ENABLED=0
+ CGO_ENABLED=0
+ export head=git@github.com:g4s8/gitstrap.git
+ head=git@github.com:g4s8/gitstrap.git
+ export pull_id=8
+ pull_id=8
+ export fork=git@github.com:g4s8/gitstrap.git
+ fork=git@github.com:g4s8/gitstrap.git
+ export fork_branch=5
+ fork_branch=5
+ export head_branch=master
+ head_branch=master
+ export 'pull_title=Refactored main.go'
+ pull_title='Refactored main.go'
+ export author=g4s8
+ author=g4s8
+ mkdir -pv /home/r/go/src/github.com/g4s8
created directory: '/home/r/go/'
created directory: '/home/r/go/src/'
created directory: '/home/r/go/src/github.com/'
created directory: '/home/r/go/src/github.com/g4s8'
+ ln -snv /home/r/repo /home/r/go/src/github.com/g4s8/gitstrap
'/home/r/go/src/github.com/g4s8/gitstrap' -> '/home/r/repo'
+ go build -o /dev/null .
gitstrap.go:7:2: cannot find package "github.com/google/go-github/github" in any of:
	/usr/local/go/src/github.com/google/go-github/github (from $GOROOT)
	/home/r/go/src/github.com/google/go-github/github (from $GOPATH)
gitstrap.go:8:2: cannot find package "golang.org/x/oauth2" in any of:
	/usr/local/go/src/golang.org/x/oauth2 (from $GOROOT)
	/home/r/go/src/golang.org/x/oauth2 (from $GOPATH)
gitstrap.go:9:2: cannot find package "gopkg.in/yaml.v2" in any of:
	/usr/local/go/src/gopkg.in/yaml.v2 (from $GOROOT)
	/home/r/go/src/gopkg.in/yaml.v2 (from $GOPATH)
container 0ae76202f5d5ca6d478a814c873c47dc0bd182afce8116a4762d0042225b4fae is dead
Mon Jan  7 15:10:17 CET 2019

@g4s8
Copy link
Owner Author

g4s8 commented Jan 7, 2019

@rultor merge

@rultor
Copy link
Contributor

rultor commented Jan 7, 2019

@rultor merge

@g4s8 OK, I'll try to merge now. You can check the progress of the merge here

@rultor
Copy link
Contributor

rultor commented Jan 7, 2019

@rultor merge

@g4s8 Oops, I failed. You can see the full log here (spent 2min)

Creating mailbox file: No such file or directory
+ echo '%sudo ALL=(ALL) NOPASSWD:ALL'
+ cp -R /root/.cache /root/empty /home/r
+ cp -R ./cid ./end.sh ./entry.sh ./pid ./repo ./run.sh ./script.sh ./stdout /home/r
+ rm -rf repo
+ chown -R r:r /home/r
+ chmod a+x /home/r/script.sh
+ su --login r --command /home/r/script.sh
+ set -e
+ set -o pipefail
+ shopt -s expand_aliases
+ alias 'sudo=sudo -i'
+ export HOME=/home/r
+ HOME=/home/r
+ cd /home/r/repo
+ export PATH=/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+ PATH=/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+ export CGO_ENABLED=0
+ CGO_ENABLED=0
+ export head=git@github.com:g4s8/gitstrap.git
+ head=git@github.com:g4s8/gitstrap.git
+ export pull_id=8
+ pull_id=8
+ export fork=git@github.com:g4s8/gitstrap.git
+ fork=git@github.com:g4s8/gitstrap.git
+ export fork_branch=5
+ fork_branch=5
+ export head_branch=master
+ head_branch=master
+ export 'pull_title=Refactored main.go'
+ pull_title='Refactored main.go'
+ export author=g4s8
+ author=g4s8
+ mkdir -pv /home/r/go/src/github.com/g4s8
created directory: '/home/r/go/'
created directory: '/home/r/go/src/'
created directory: '/home/r/go/src/github.com/'
created directory: '/home/r/go/src/github.com/g4s8'
+ ln -snv /home/r/repo /home/r/go/src/github.com/g4s8/gitstrap
'/home/r/go/src/github.com/g4s8/gitstrap' -> '/home/r/repo'
+ go get github.com/google/go-github/github
+ go get golang.org/x/oauth2
+ go get gopkg.in/yaml.v2
+ go build -o /dev/null .
+ gometalinter .
+ mv /home/r/repo .
++ whoami
+ chown -R root repo
+ '[' -n '' ']'
++ whoami
+ sudo chown -R rultor repo
+ cd repo
+ git push origin master
remote: error: GH006: Protected branch update failed for refs/heads/master.        
remote: error: Required status check "continuous-integration/travis-ci" is pending.        
To git@github.com:g4s8/gitstrap.git
 ! [remote rejected] master -> master (protected branch hook declined)
error: failed to push some refs to 'git@github.com:g4s8/gitstrap.git'
container 376726379ffea5a31862a3b94dd40345545871400cd9194bfdf258ef71b89531 is dead
Mon Jan  7 15:16:45 CET 2019

@g4s8
Copy link
Owner Author

g4s8 commented Jan 7, 2019

@rultor merge

@rultor
Copy link
Contributor

rultor commented Jan 7, 2019

@rultor merge

@g4s8 OK, I'll try to merge now. You can check the progress of the merge here

@rultor rultor merged commit eb16154 into master Jan 7, 2019
@rultor
Copy link
Contributor

rultor commented Jan 7, 2019

@rultor merge

@g4s8 Done! FYI, the full log is here (took me 2min)

@0crat
Copy link

0crat commented Jan 7, 2019

@g4s8/z everybody who has role REV is banned at #8; I won't be able to assign anyone automatically; consider assigning someone manually (as in §19), or invite more people (as in §51), or remove the job from the scope (as in §14)

@0crat 0crat removed the scope label Jan 7, 2019
@0crat
Copy link

0crat commented Jan 7, 2019

Job gh:g4s8/gitstrap#8 is not assigned, can't get performer

@0crat
Copy link

0crat commented Jan 7, 2019

The job #8 is now out of scope

@g4s8 g4s8 deleted the 5 branch February 4, 2019 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants