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

chore: use go install instead of deprecated go get #8333

Merged
merged 2 commits into from
Feb 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ jobs:
- name: Download Go dependencies
run: |
go mod download
go get github.com/mattn/goreman
go install github.com/mattn/goreman@latest
- name: Install all tools required for building & testing
run: |
make install-test-tools-local
Expand Down
2 changes: 1 addition & 1 deletion .gitpod.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ RUN curl -L https://go.kubebuilder.io/dl/2.3.1/$(go env GOOS)/$(go env GOARCH) |
tar -xz -C /tmp/ && mv /tmp/kubebuilder_2.3.1_$(go env GOOS)_$(go env GOARCH) /usr/local/kubebuilder

RUN apt-get install redis-server -y
RUN go get github.com/mattn/goreman
RUN go install github.com/mattn/goreman@latest

USER gitpod

Expand Down
2 changes: 1 addition & 1 deletion .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ image:
file: .gitpod.Dockerfile

tasks:
- init: make mod-download-local dep-ui-local && GO111MODULE=off go get github.com/mattn/goreman
- init: make mod-download-local dep-ui-local && GO111MODULE=off go install github.com/mattn/goreman@latest
command: make start-test-k8s
2 changes: 1 addition & 1 deletion hack/test.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
set -eux -o pipefail

which go-junit-report || go get github.com/jstemmer/go-junit-report
which go-junit-report || go install github.com/jstemmer/go-junit-report@latest

TEST_RESULTS=${TEST_RESULTS:-test-results}
TEST_FLAGS=
Expand Down
6 changes: 3 additions & 3 deletions test/container/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ RUN ./install.sh ksonnet-linux && \
./install.sh codegen-tools && \
./install.sh codegen-go-tools && \
./install.sh lint-tools && \
go get github.com/mattn/goreman && \
go get github.com/kisielk/godepgraph && \
go get github.com/jstemmer/go-junit-report && \
go install github.com/mattn/goreman@latest && \
go install github.com/kisielk/godepgraph@latest && \
go install github.com/jstemmer/go-junit-report@latest && \
rm -rf /tmp/dl && \
rm -rf /tmp/helm && \
rm -rf /tmp/helm2 && \
Expand Down
4 changes: 2 additions & 2 deletions test/remote/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM golang:1.17.6 AS go

RUN go get github.com/mattn/goreman && \
go get github.com/kisielk/godepgraph
RUN go install github.com/mattn/goreman@latest && \
go install github.com/kisielk/godepgraph@latest

FROM ubuntu:21.10

Expand Down
13 changes: 7 additions & 6 deletions test/remote/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ To build it, run the following. Note that kustomize is required:

```shell
cd test/remote
export IMAGE_NAMESPACE=quay.io/youruser
export IMAGE_NAMESPACE=quay.io/{YOUR USERNAME HERE}
# builds & tags the image
make image
# pushes the image to your repository
Expand All @@ -66,6 +66,8 @@ make manifests > /tmp/e2e-repositories.yaml
If you do not have kustomize installed, you need to manually edit the manifests
at `test/remote/manifests/e2e_repositories.yaml` to point to the correct image.

If you get `make: realpath: Command not found`, install coreutils.

### Deploy the test container and additional permissions

**Note:** The test container requires to be run in privileged mode for now, due
Expand All @@ -83,7 +85,7 @@ Then, apply the manifests for the E2E repositories workload:
kubectl -n argocd-e2e apply -f /tmp/e2e-repositories.yaml
```

Verify that the deployment was succesful:
Verify that the deployment was successful:

```shell
kubectl -n argocd-e2e rollout status deployment argocd-e2e-cluster
Expand All @@ -106,13 +108,13 @@ as the cluster, or the cluster IPs are routed to your host, you can use the
following:

```shell
export ARGOCD_SERVER=$(kubectl get svc argocd-server -o jsonpath='{.spec.clusterIP}')
export ARGOCD_SERVER=$(kubectl -n argocd-e2e get svc argocd-server -o jsonpath='{.spec.clusterIP}')
```

Set the admin password to use:

```shell
export ARGOCD_E2E_ADMIN_PASSWORD=$(kubectl get secrets argocd-initial-admin-secret -o jsonpath='{.data.password}'|base64 -d)
export ARGOCD_E2E_ADMIN_PASSWORD=$(kubectl -n argocd-e2e get secrets argocd-initial-admin-secret -o jsonpath='{.data.password}'|base64 -d)
```

Run the tests
Expand Down Expand Up @@ -204,7 +206,7 @@ Some environment variables can control the behavior of the tests:

Furthermore, you can skip various classes of tests by setting the following to true:

```
```shell
# If you disabled GPG feature, set to true to skip related tests
export ARGOCD_E2E_SKIP_GPG=${ARGOCD_E2E_SKIP_GPG:-false}
# Some tests do not work OOTB with OpenShift
Expand All @@ -215,7 +217,6 @@ export ARGOCD_E2E_SKIP_HELM=${ARGOCD_E2E_SKIP_HELM:-false}
export ARGOCD_E2E_SKIP_HELM2=${ARGOCD_E2E_SKIP_HELM2:-false}
# Skip Ksonnet tests
export ARGOCD_E2E_SKIP_KSONNET=${ARGOCD_E2E_SKIP_KSONNET:-false}

```

## Recording tests that ran successfully and restart at point of fail
Expand Down