Skip to content
Snippets Groups Projects
Commit d75707c1 authored by Nathan Bockisch's avatar Nathan Bockisch
Browse files

Added modification to go code to test CI building

parent afa14f52
No related branches found
No related tags found
2 merge requests!904Added local building of go modules,!903WS-702 Added yaml and sh scripts to build go modules via CI
Checking pipeline status
......@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License
* along with Workspaces. If not, see <https://www.gnu.org/licenses/>.
*/
/* TEST */
package main
import (
......
#!/bin/bash
#!/bin/sh
# Copyright (C) 2022 Associated Universities, Inc. Washington DC, USA.
#
# This file is part of NRAO Workspaces.
......@@ -47,5 +47,5 @@ do
# echo "PEX build impossible in $PWD because there is no setup.py file"
# fi
# cd ..
go build
CGO_ENABLED=0 go build -a -ldflags "-w -s" -o $BUILD_DIR/$module
done
......@@ -44,9 +44,14 @@ go-{go_name}-build:
image: golang:1.18.0-alpine3.15
variables:
GIT_SUBMODULE_STRATEGY: recursive
before_script:
- apk add git curl
script:
- echo "Building module - {go_name}"
- ./ci/bin/build-go.sh {go_name}
- /builds/ssa/workspaces/ci/bin/build-go.sh {go_name}
- pwd
- ls go/
- ls
- |
curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file go/{go_name} "$CI_API_V4_URL/projects/$CI_PROJECT_ID/packages/generic/{go_name}/0.0.1/{go_name}"
rules:
......@@ -98,7 +103,7 @@ def main(argv):
deploy_env = os.environ["DEPLOY_ENV"]
go_changes = []
rule = "$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH"
rule = "$CI_MERGE_REQUEST_ID"
changes_rule = ""
if deploy_env == "dev":
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment