Skip to content

Instantly share code, notes, and snippets.

View gmlewis's full-sized avatar

Glenn Lewis gmlewis

View GitHub Profile
@gmlewis
gmlewis / server.go
Last active June 19, 2023 16:03
Mechanism to perform OAuth2 dance (e.g. with Keycloak) in a wails production build
// Copyright (C) 2023 Omics Data Automation, Inc. - All Rights Reserved
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@gmlewis
gmlewis / azure.go
Created March 10, 2023 18:37
Work-in-progress building container and publishing to Azure
package common
import (
"context"
"log"
"dagger.io/dagger"
)
// PublishToAzure performs a Dockerfile build on the provided repo and pushes to the
@gmlewis
gmlewis / helm-upgrade.go
Created February 11, 2023 01:23
Work in progress - perform "helm upgrade" to deploy chart to Azure dev cluster
package common
import (
"context"
"fmt"
"log"
"os"
"strings"
"dagger.io/dagger"
@gmlewis
gmlewis / on-push-to-develop.yml
Created February 11, 2023 01:21
Work in progress - Dagger Go Workflow to deploy to Azure dev cluster
name: On push to develop
on:
push:
paths:
- '.env.test'
- '.**.js'
- '**.js'
- '**.json'
- '**.lock'
- 'public/**'
@gmlewis
gmlewis / build.go
Created February 3, 2023 00:58
Work in progress - build step using Dagger.io
package common
import (
"context"
"fmt"
"log"
"path/filepath"
"runtime"
"dagger.io/dagger"
@gmlewis
gmlewis / on-push-to-develop.yml
Created February 3, 2023 00:49
Work in progress - GitHub Action - pushing image to Azure Container Registry using Dagger.io
name: On push to develop
on:
push:
paths:
- '.env.test'
- '.**.js'
- '**.js'
- '**.json'
- '**.lock'
- 'public/**'
@gmlewis
gmlewis / azure.go
Last active February 3, 2023 01:32
Work in progress - pushing image to Azure Container Registry using Dagger.io
package common
import (
"context"
"log"
"dagger.io/dagger"
)
// PublishToAzure performs a Dockerfile build on the provided repo and pushes to the
@gmlewis
gmlewis / example.go
Last active January 25, 2023 21:43
Work in progress to bump the version in a repo and push back to repo
func main() {
ctx := context.Background()
if _, err := common.Build(ctx); err != nil {
log.Fatal(err)
}
if err := bumpMinorVersion(ctx); err != nil {
log.Fatal(err)
}
@gmlewis
gmlewis / main.go
Last active January 25, 2023 15:36
Dagger newbie troubleshooting first Go SDK pipeline
// on-push-or-pull-request executes the Dagger CI/CD pipeline
// for every push or pull request to any branch within this repo.
//
// Usage:
// go run cicd/go-on-push-or-pull-request/main.go
//
// It performs the following steps:
// - yarn install
// - yarn test:unit
// - yarn lint
@gmlewis
gmlewis / grain-compile-error.log
Created May 7, 2021 15:09
grain compile error on Linux
~/src/github.com/grain-lang $ git clone git@github.com:grain-lang/grain
Cloning into 'grain'...
remote: Enumerating objects: 15460, done.
remote: Counting objects: 100% (935/935), done.
remote: Compressing objects: 100% (459/459), done.
remote: Total 15460 (delta 578), reused 730 (delta 451), pack-reused 14525
Receiving objects: 100% (15460/15460), 6.32 MiB | 15.93 MiB/s, done.
Resolving deltas: 100% (10045/10045), done.
~/src/github.com/grain-lang $ cd grain
~/src/github.com/grain-lang/grain (main) $ ls