1
0
mirror of https://github.com/openshift/installer.git synced 2026-02-06 00:48:45 +01:00
Commit Graph

172 Commits

Author SHA1 Message Date
Andrea Fasano
410a39687c disabling test timeout 2023-10-17 20:24:34 +00:00
Andrea Fasano
88d8c5bd79 Enforcing the serial execution of the integration tests 2023-10-17 20:24:34 +00:00
Richard Su
72275500cf AGENT-678: Fix concurrency issue in agent integration tests
Force the integration tests to run in serial until the function
extractFileFromImage in pkg/asset/agent/image/oc.go has been
fixed.

Signed-off-by: Richard Su <rwsu@redhat.com>
2023-07-07 16:56:10 -04:00
Richard Su
5f99df589b Update /hack/go-test.sh to golang 1.20
It was previously set to 1.18 and needed to be bumped to match
move to golang 1.20.
2023-06-22 10:59:12 +08:00
Patrick Dillon
33109b7034 Bump to Go 1.20
Bumps core Installer to Go v1.20. Terraform and providers will be
updated separately.
2023-06-01 11:44:20 -04:00
Pierre Prinetti
8801811574 openstack-manifests: Export JUnit results
Expose test results as JUnit to let Prow parse them.
2023-03-14 11:11:16 +01:00
Pierre Prinetti
34b53ca9d3 openstack-manifests: Refactor 2023-03-12 17:39:56 +01:00
OpenShift Merge Robot
6fde21d5b8 Merge pull request #6935 from Juneezee/refactor/yaml
refactor: replace `github.com/ghodss/yaml` with `sigs.k8s.io/yaml`
2023-03-10 00:03:48 -05:00
Eng Zer Jun
66a8a2abd4 refactor: replace github.com/ghodss/yaml with sigs.k8s.io/yaml
At the time of making this commit, the package `github.com/ghodss/yaml`
is no longer actively maintained.

`sigs.k8s.io/yaml` is a permanent fork of `ghodss/yaml` and is actively
maintained by Kubernetes SIG.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2023-03-05 16:13:33 +08:00
Pierre Prinetti
1b03f46088 openstack-manifest: Show assets dir if persisted
Ease manual runs.
2023-03-03 09:35:32 +01:00
OpenShift Merge Robot
41e436eecc Merge pull request #6908 from shiftstack/manifest_test_run
openstack-manifests: Option to run selected test cases
2023-02-28 17:10:46 +01:00
Pierre Prinetti
0c67140ae8 openstack-manifests: Option to run selected test cases
Add a `-r <regexp>` to `test-manifests.sh` to optionally only run test
cases with a matching name.
2023-02-28 11:15:40 +01:00
Vadim Rutkovsky
8db73f591f hack/build-coreos-manifest: support OKD
If TAGS env var contains "okd" CoreOS manifest script should use
FCOS json. This is necessary for OKD clusters to be installable via
Hypershift
2023-02-27 16:35:54 +01:00
OpenShift Merge Robot
2659252502 Merge pull request #6859 from r4f4/go-lint-1.48
linter: bump version to sync with CI
2023-02-16 07:07:56 -05:00
Rafael Fonseca
c3f8ad75b4 linter: bump version to sync with CI
CI now has golangci-lint 1.48 which supports Golang 1.19. Let's make
sure our hack/ tool uses the same version.
2023-02-15 16:45:55 +01:00
OpenShift Merge Robot
a4f98fced7 Merge pull request #6835 from jcpowermac/add-debugging-to-builds
installer dev build settings to enable delve
2023-02-13 22:44:28 -05:00
OpenShift Merge Robot
e901621f40 Merge pull request #6839 from shiftstack/manifest_test_persist_option
openstack-manifests: Add a debug option
2023-02-10 19:00:51 -05:00
Joseph Callen
e24b0255c7 installer dev build settings to enable delve
Using MODE=dev ./hack/build.shwith this PR will allow the use
of Delve (and rr). It disables:

compiler optimizations
inlining
DWARF stripping

MODE=release remains unchanged.
2023-02-09 09:18:46 -05:00
Pierre Prinetti
03da672b8f openstack-manifests: Beautify output 2023-02-09 15:08:21 +01:00
Pierre Prinetti
62ed473dfd openstack-manifests: Add a debug option
Add the `-p` (Persist) option to prevent the automated cleanup of
generated manifests.
2023-02-09 12:25:23 +01:00
Rafael Fonseca
3243c88cdf hack: go-genmock: also generate mock for destroy pkg 2023-02-03 16:04:08 +01:00
Rafael Fonseca
83d0a6a2dd CORS-2340: hack: replace deprecated go-lint
Use golangci-lint instead, which is an aggregator of linters.

Resolves https://issues.redhat.com/browse/CORS-2340
2022-12-15 17:52:21 +01:00
Rafael Fonseca
6039d415ec tooling: add gci tool to standardize import order
The imports are ordered in 4 sections:
 - standard lib
 - default imports
 - prefix(github.com/openshift)
 - blank imports (_ <import_path>)
2022-12-13 15:40:57 +01:00
Andrea Fasano
55d450ad37 agent: add integration tests
This patch adds an initial set of integration test for the agent installer, based on the testscript package
2022-12-06 08:31:21 -05:00
Rafael Fonseca
428688c9cd Replace deprecated io/ioutil package
`io/ioutil` has been deprecated since go-1.16 [1]. We should use `io`
and `os` instead.

[1] https://github.com/golang/go/issues/42026
2022-11-18 20:08:57 +01:00
aleskandro
23ac03a61b Static linking the terraform and providers binaries 2022-11-02 11:50:22 +01:00
Sandhya Dasu
7202c95d1d Fix go fmt errors after golang version upgrade to 1.19 2022-10-13 14:25:17 -04:00
ERAMOTO Masaya
f28ecc6662 hack: Disable GOFLAGS temporarily to install golint
In Ci, go-lint.sh runs with -mod=vendor and fails to install golint. For local
test, GOFLAGS is not set.
Thus, GOFLAGS is temporarily unset with installing golint.

Signed-off-by: ERAMOTO Masaya <eramoto.masaya@jp.fujitsu.com>
2022-09-22 13:51:37 +00:00
ERAMOTO Masaya
5a50237800 hack: Install golint on docker.io/golang image
go-lint.sh outputs the following errors:
```
$ hack/go-lint.sh $(go list -f '{{ .ImportPath }}' ./...)
./hack/go-lint.sh: 5: golint: not found
```

AFAIK, golint does not exist in docker.io/golang-1.15 or later.
So, the script installs golint.

Signed-off-by: ERAMOTO Masaya <eramoto.masaya@jp.fujitsu.com>
2022-09-20 03:54:41 +00:00
Rafael Fonseca
8d6187cd7f Use golang 1.18 2022-08-02 15:25:31 +02:00
Yaakov Selkowitz
62107af8c2 Add GOOS_GOARCH to all terraform build paths
This avoids the wrong binaries from the previous build being included in
the installer binary when (cross-)compiling locally for multiple targets
in sequence.
2022-05-12 18:16:06 -04:00
Yaakov Selkowitz
540ec958a1 Always run go generate natively
go generate always needs to be run natively, even when cross-compiling.
Handling that in build.sh simplifies cross-compiling both manually and
in installer-artifacts.
2022-05-12 18:16:06 -04:00
Christoph Stäbler
2c09bc5276 Use golang 1.17
Signed-off-by: Christoph Stäbler <cstabler@redhat.com>
2022-05-06 09:03:58 +02:00
staebler
fb18dab8c6 terraform: add terraform verification to ./hack/verify-vendor.sh
Add verification that the vendoring of the terraform sub-modules is
in-sync with what is needed for building the sub-modules.

https://issues.redhat.com/browse/CORS-1909
2022-03-23 23:09:03 -04:00
staebler
75ac8baad3 hack: update go version used in hack/verify-vendor.sh
Update the go version used for verifying vendoring from 1.16 to 1.17.
The CI job uses its own image and does not use the image specified
in the script. Therefore, the go version in the script must match
the go version in the CI job, particularly when there are breaking
changes between go versions (as there are between 1.16 and 1.17
when it comes to modules).
2022-03-15 14:22:11 -04:00
staebler
352b913780 terraform: only build binaries when go.mod changes
To reduce the time to build the installer binary, let's change the terraform
Makefile so that it only builds the binaries when there are changes to the
respective go.mod. For example, the aws terraform provider will only be
re-built when there is a change to the go.mod file in the aws sub-module.
2022-03-02 20:45:11 -05:00
staebler
76eb1eae49 terraform: allow for building terraform locally
Create a sub-module for building the terraform binary locally.
2022-02-28 22:52:30 -05:00
staebler
0394dba1d1 terraform: remove downloading of terraform binary
Remove the script for downloading the terraform binary. Since terraform
does not officially support some of the architectures that the installer
targets, the terraform binary needs to be built locally rather than
downloaded.
2022-02-28 22:52:29 -05:00
staebler
3fbc693815 terraform: zip terraform providers
To reduce the size of the installer binary, zip each terraform provider
after building it. Terraform can use the zip directly without requiring
the installer to unzip the provider first.
2022-02-28 22:52:29 -05:00
staebler
d0c440d58a terraform: remove the use of remote providers
Remove the code that supports pulling the terraform providers from
public registries.
2022-02-28 22:52:28 -05:00
staebler
2164afd71d terrafrom: add support for FreeBSD
* Add "freebsd_amd64" to the target OS/arches downloaded by the
./hack/download-terraform.sh script.
* Download terraform and providers for FreeBSD.
2022-02-24 08:31:21 -05:00
staebler
09cd3f503b terraform: unpack providers from binary data
Unpack the providers needed for completing a stage from the embedded
data in the installer's binary. This replaces the previous method of
creating symlinks to the installer binary, where the installer binary
masqueraded as each of the terraform providers.
2022-02-21 10:31:34 -05:00
staebler
6a89a46f3c terraform: allow for downloading remote providers individually
This will download remote terraform providers individually. The remote terraform
providers are the providers that can be used as-is from a public registry.

This will also grab the terraform binary to embed in the installer from the
same terraform image used to download the terraform providers.

Use the latest version available for all of the remote providers.
2022-02-21 10:30:58 -05:00
John Hixson
9c77d6a437 terraform: allow for building local providers individually
This will build local terraform providers individually. The local terraform
providers are the providers that either (1) are not published in a public
regisrty or (2) require patches.

azureprivatedns: private to the installer repo
azurestack: requires patches
ibm: arm build is not published
ignition: arm buid is not published
ironic: not published
ovirt: not published
vsphere: requires patches
vsphereprivate: private to the installer repo

Building these has been added hack/build.sh. In the future a better way of
handling the vendoring in the individual directories will be necessary.

co-authored: staebler
2022-02-21 10:30:46 -05:00
staebler
ce3169772c hack: use go 1.17 for verifying codegen
The hack/verify-codegen.sh script was using an image that included
go 1.16. However, the updated k8s.io/json module calls the
`(reflect.StructField) IsExported` function, which is new in go 1.17.
Consequently, the script needs to be updated to use an image that
include go 1.17 rather than 1.16.
2022-01-21 16:55:13 -05:00
staebler
abca904596 rhcos: ami regions from rhcos stream at runtime
Currently, the installer relies on a generated go file for determining
the AWS region in which the RHCOS image is published. The `go generate`
directive was inadvertently removed in https://github.com/openshift/installer/pull/4582.
Rather than resurrecting the directive, this commit removes the generated
code in favor of gathering the regions directly from the rhcos stream
data when needed.

https://issues.redhat.com/browse/CORS-1838
2021-12-09 15:19:54 -05:00
Christy Norman
421e1e20c6 close a verify-codegen ci failure loophole
if the go codegen commands failed, the the hack/verify-codegen.sh script
continued and the CI check passed. see #5406 for an example. the script
was not set to fail on a non-zero return code. this pr adds the bash e
option to the set builtin to catch errors and exit on failure.

Signed-off-by: Christy Norman <christy@linux.vnet.ibm.com>
2021-12-08 17:37:03 -06:00
Yaakov Selkowitz
1456b5e7e5 Require golang 1.17
This is the version being used in OpenShift 4.10, but the code still
compiles for now with golang 1.16.
2021-11-24 02:01:13 -05:00
Yaakov Selkowitz
7ec510fecb Revert "Workaround golang linux/arm64 link error"
golang 1.17 fixed the underlying bug.

This reverts commit 801ece6513.
2021-11-24 02:01:13 -05:00
Colin Walters
61605bdcac Move CoreOS stream metadata to data/data/coreos, add OWNERS
It's more logically owned by the CoreOS team and this will
allow us to have a separate `OWNERS` file.

The `OWNERS` file is copied from the current one in openshift/os.
2021-10-27 16:37:52 -04:00