Commit Graph

9 Commits

Author SHA1 Message Date
MB
89a028ffd2 fix(gitlab): Prevent nil pointer dereference when HeadPipeline is empty (#3428)
In this particular example `mr.HeadPipeline.SHA` panics on a nil pointer dereference because HeadPipeline is empty.

This seems to be caused by the lack of permission to update the commit status.

```go
runtime.gopanic
        runtime/panic.go:1038
runtime.panicmem
        runtime/panic.go:221
runtime.sigpanic
        runtime/signal_unix.go:735
github.com/runatlantis/atlantis/server/events/vcs.(*GitlabClient).PullIsMergeable
        github.com/runatlantis/atlantis/server/events/vcs/gitlab_client.go:208
github.com/runatlantis/atlantis/server/events/vcs.(*ClientProxy).PullIsMergeable
        github.com/runatlantis/atlantis/server/events/vcs/proxy.go:72
github.com/runatlantis/atlantis/server/events/vcs.(*pullReqStatusFetcher).FetchPullStatus
        github.com/runatlantis/atlantis/server/events/vcs/pull_status_fetcher.go:28
github.com/runatlantis/atlantis/server/events.(*ApplyCommandRunner).Run
        github.com/runatlantis/atlantis/server/events/apply_command_runner.go:105
github.com/runatlantis/atlantis/server/events.(*DefaultCommandRunner).RunCommentCommand
        github.com/runatlantis/atlantis/server/events/command_runner.go:252
```

The least invasive solution is to simply use the commit-hash from pull and guess that the pipeline was "skipped" unless the HeadPipeline is there.

The outcome is:

When mr.HeadPipeline is present:
- use the commit hash and status from the HeadPipeline
When mr.HeadPipeline is NOT present:
- use the commit hash from pull request struct
- assume the pipeline was "skipped"

In cases where GitLab is configured to require a pipeline to pass, this results on a message saying the MR is not mergeable.

More info:
- https://github.com/runatlantis/atlantis/issues/1852
2023-08-04 13:00:47 -04:00
nitrocode
83ca6ad4c1 fix(e2e-deps): fix jq download (#3464)
* fix(e2e-deps): fix jq download

* Update e2e-deps.sh
2023-05-30 19:41:21 -07:00
nitrocode
f5c781400d fix(tests): Pin ngrok to v2 and use https (#3429)
* fix(tests): Pin ngrok to v2 and use https
2023-05-22 11:11:19 -04:00
nitrocode
6f7ee2ef39 Bump to atlantis-base:2022.11.13 and use cimg/go:1.19 (#2673)
* Bump to atlantis-base:2022.11.13

* Use cimg/go back image

* Use correct path of cimg/go binary dir

* e2e: use /usr/bin

* e2e: add set -e

* circleci: use testing-env:2022.11.13

* e2e: use /home/circleci/go/bin

* e2e: revert to testing-env:2021.08.31 image
2022-11-13 14:51:18 -06:00
Anubhav Mishra
d1b414fff0 now copying atlantis binary instead of moving it 2017-08-16 13:35:46 -07:00
Anubhav Mishra
6b55b086cd Adding docker image and release scripts (#123)
* Adding docker image and release scripts

* Using circleci version 2

* now building dumb-init and gosu from source

* trying to fix e2e tests

* fixing working directory for circleci version 2

* start atlantis server and ngrok in the background

* Adding terraform to path and removing old decryption method for circleci

* adding terraform binary to the correct path

* ATLANTIS_URL is now being exported

* using circleci version 2 syntax to export variable

* using circleci version 2 syntax to export variable

* ngrok isnt working now

* Updating CHANGELOG

* Fixes after review and updated README.md
2017-08-16 13:29:51 -07:00
Anubhav Mishra
8581b37a7a fixes after review 2017-06-18 16:44:30 -07:00
Anubhav Mishra
780de9147a make targets now filter e2e tests 2017-06-17 15:23:53 -07:00
Anubhav Mishra
8dd1d6cf46 Adding ci for atlantis 2017-06-17 14:20:51 -07:00