Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ sudo: required
dist: xenial
language: go
go:
- 1.18.3
- 1.19.1
before_install:
- sudo apt-get update -yq || true
- sudo apt-get install go-md2man -y
Expand All @@ -21,7 +21,7 @@ script:
export DOCKER_HUB_STORK_TEST_TAG=`git rev-parse --short HEAD`
export DOCKER_HUB_CMD_EXECUTOR_TAG=`git rev-parse --short HEAD`
fi
travis_wait 30 make -j 2 && make test && make container && make integration-test && make integration-test-container &&
travis_wait 45 make -j 2 && make test && make container && make integration-test && make integration-test-container &&
if [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then
docker login -u "${DOCKER_USER}" -p "${DOCKER_PASSWORD}";
make deploy;
Expand Down
25 changes: 18 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ test:

integration-test:
@echo "Building stork integration tests"
@cd test/integration_test && GOOS=linux go test -tags integrationtest $(BUILD_OPTIONS) -v -c -o stork.test
docker run --rm -v $(shell pwd):/go/src/github.com/libopenstorage/stork $(DOCK_BUILD_CNT) \
/bin/bash -c 'cd /go/src/github.com/libopenstorage/stork/test/integration_test && \
GOOS=linux go test -tags integrationtest $(BUILD_OPTIONS) -v -c -o stork.test;'

integration-test-container:
@echo "Building container: docker build --tag $(STORK_TEST_IMG) -f Dockerfile ."
Expand All @@ -130,21 +132,30 @@ codegen:

stork:
@echo "Building the stork binary"
@cd cmd/stork && CGO_ENABLED=0 GOOS=linux go build $(BUILD_OPTIONS) -o $(BIN)/stork
docker run --rm -v $(shell pwd):/go/src/github.com/libopenstorage/stork $(DOCK_BUILD_CNT) \
/bin/bash -c 'cd /go/src/github.com/libopenstorage/stork/cmd/stork && \
CGO_ENABLED=0 GOOS=linux go build $(BUILD_OPTIONS) -o /go/src/github.com/libopenstorage/stork/bin/stork;'

cmdexecutor:
@echo "Building command executor binary"
@cd cmd/cmdexecutor && GOOS=linux go build $(BUILD_OPTIONS) -o $(BIN)/cmdexecutor
docker run --rm -v $(shell pwd):/go/src/github.com/libopenstorage/stork $(DOCK_BUILD_CNT) \
/bin/bash -c 'cd /go/src/github.com/libopenstorage/stork/cmd/cmdexecutor && \
GOOS=linux go build $(BUILD_OPTIONS) -o /go/src/github.com/libopenstorage/stork/bin/cmdexecutor;'

storkctl:
@echo "Building storkctl"
@cd cmd/storkctl && CGO_ENABLED=0 GOOS=linux go build $(BUILD_OPTIONS) -o $(BIN)/linux/storkctl
@cd cmd/storkctl && CGO_ENABLED=0 GOOS=darwin go build $(BUILD_OPTIONS) -o $(BIN)/darwin/storkctl
@cd cmd/storkctl && CGO_ENABLED=0 GOOS=windows go build $(BUILD_OPTIONS) -o $(BIN)/windows/storkctl.exe
docker run --rm -v $(shell pwd):/go/src/github.com/libopenstorage/stork $(DOCK_BUILD_CNT) \
/bin/bash -c 'cd /go/src/github.com/libopenstorage/stork/cmd/storkctl; \
CGO_ENABLED=0 GOOS=linux go build $(BUILD_OPTIONS) -o /go/src/github.com/libopenstorage/stork/bin/linux/storkctl; \
CGO_ENABLED=0 GOOS=darwin go build $(BUILD_OPTIONS) -o /go/src/github.com/libopenstorage/stork/bin/darwin/storkctl; \
CGO_ENABLED=0 GOOS=windows go build $(BUILD_OPTIONS) -o /go/src/github.com/libopenstorage/stork/bin/windows/storkctl.exe;'

px-statfs:
@echo "Building px_statfs.so"
@cd drivers/volume/portworx/px-statfs && gcc -g -shared -fPIC -o $(BIN)/px_statfs.so px_statfs.c -ldl -D__USE_LARGEFILE64
docker run --rm -v $(shell pwd):/go/src/github.com/libopenstorage/stork $(DOCK_BUILD_CNT) \
/bin/bash -c 'cd /go/src/github.com/libopenstorage/stork/drivers/volume/portworx/px-statfs && \
gcc -g -shared -fPIC -o /go/src/github.com/libopenstorage/stork/bin/px_statfs.so px_statfs.c -ldl -D__USE_LARGEFILE64;'


container: help
@echo "Building container: docker build --build-arg VERSION=$(DOCKER_HUB_STORK_TAG) --build-arg RELEASE=$(DOCKER_HUB_STORK_TAG) --tag $(STORK_IMG) -f Dockerfile . "
Expand Down
2 changes: 1 addition & 1 deletion cmd/stork/stork.go
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ func run(c *cli.Context) {
EventRecorder: recorder,
}
resourceLock, err := resourcelock.New(
resourcelock.ConfigMapsResourceLock,
resourcelock.ConfigMapsLeasesResourceLock,
lockObjectNamespace,
lockObjectName,
k8sClient.CoreV1(),
Expand Down
4 changes: 2 additions & 2 deletions drivers/volume/azure/azure.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"encoding/json"
"fmt"
"io/ioutil"
"io"
"net/http"
"time"

Expand Down Expand Up @@ -127,7 +127,7 @@ func (a *azure) getMetadata() (map[string]string, error) {
if resp.StatusCode != 200 {
return nil, fmt.Errorf("error querying Azure metadata: Code %d returned for url %s", resp.StatusCode, req.URL)
}
body, err := ioutil.ReadAll(resp.Body)
body, err := io.ReadAll(resp.Body)
if err != nil {
return nil, fmt.Errorf("error querying Azure metadata: %v", err)
}
Expand Down
3 changes: 1 addition & 2 deletions drivers/volume/portworx/portworx.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"encoding/csv"
"encoding/json"
"fmt"
"io/ioutil"
"math"
"os"
"path"
Expand Down Expand Up @@ -4158,7 +4157,7 @@ func (p *portworx) getVirtLauncherPatches(podNamespace string, pod *v1.Pod) ([]k

func (p *portworx) createStatfsConfigMap(cmNamespace string) error {
soPath := path.Join(statfsSODirInStork, statfsSOName)
statfsSOContents, err := ioutil.ReadFile(soPath)
statfsSOContents, err := os.ReadFile(soPath)
if err != nil {
logrus.Errorf("Failed to read %s: %v", soPath, err)
return err
Expand Down
Loading